Wiki.Pnikuczanie
http://wiki.pnikut.net/Strona_g%C5%82%C3%B3wna
MediaWiki 1.22.13
first-letter
Media
Specjalna
Dyskusja
Użytkownik
Dyskusja użytkownika
My wiki
Dyskusja My wiki
Plik
Dyskusja pliku
MediaWiki
Dyskusja MediaWiki
Szablon
Dyskusja szablonu
Pomoc
Dyskusja pomocy
Kategoria
Dyskusja kategorii
Portal
Dyskusja portalu
Wikiprojekt
Dyskusja Wikiprojektu
WikiPnikuczanie
Dyskusja WikiPnikuczanie
Franciszka Głogowska
0
605
1099
1098
2019-11-16T21:34:02Z
Ffkapa
2
/* Dzieje rodziny */
wikitext
text/x-wiki
'''Franciszka Głogowska'''- [[Mapa dawnego Pnikuta|dom nr. 5]]
== Dzieje rodziny ==
* Głogowska Franciszka, siostra Józefa (przyd. „Kramarze”) i ich siostra Zofia z synem Czesławem (nie ma wiadomości o jej mężu Kieczkowskim) – wyjechali do Polski, Przemyśl.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Głogowscy]]
024471415881730343e4f17735d1c5aa8680d468
1098
1097
2019-11-16T21:33:30Z
Ffkapa
2
removed [[Category:Głogowscy]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
'''Franciszka Głogowska'''- [[Mapa dawnego Pnikuta|dom nr. 5]]
== Dzieje rodziny ==
* Głogowska Franciszka, siostra Józefa (przyd. „Kramarze”) i ich siostra Zofia z synem Czesławem (nie ma wiadomości o jej mężu Kieczkowskim) – wyjechali do Polski, Przemyśl.
[[Kategoria:Urodzeni w Pnikucie]]
22cc1605d25aab49812a9aa6924e232492318031
1097
2019-11-16T21:33:24Z
Ffkapa
2
Utworzono nową stronę "'''Franciszka Głogowska'''- [[Mapa dawnego Pnikuta|dom nr. 5]] == Dzieje rodziny == * Głogowska Franciszka, siostra Józefa (przyd. „Kramarze”) i ich siostra Zofia..."
wikitext
text/x-wiki
'''Franciszka Głogowska'''- [[Mapa dawnego Pnikuta|dom nr. 5]]
== Dzieje rodziny ==
* Głogowska Franciszka, siostra Józefa (przyd. „Kramarze”) i ich siostra Zofia z synem Czesławem (nie ma wiadomości o jej mężu Kieczkowskim) – wyjechali do Polski, Przemyśl.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Głogowscy]]
024471415881730343e4f17735d1c5aa8680d468
Hryńko (Grzegorz) Mańdziak
0
614
1111
1108
2019-11-16T23:26:04Z
Ffkapa
2
removed [[Category:Hryńko]]; added [[Category:Mańdziak]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
'''Mańdziak Hryńko (Grzegorz)'''
== Rodzina ==
Hryńko Mańdziak , bardzo dobry kowal, żona Zofia
== Dzieci ==
Eugeniusz, Jan, Maria
== Dzieje rodziny ==
* Pozostali w Pnikucie.
[[Kategoria:Mańdziak]]
cdd9244f05d6f12fead4107feefe155f9c3f3333
1108
2019-11-16T23:16:01Z
Ffkapa
2
Utworzono nową stronę "'''Mańdziak Hryńko (Grzegorz)''' == Rodzina == Hryńko Mańdziak , bardzo dobry kowal, żona Zofia == Dzieci == Eugeniusz, Jan, Maria == Dzieje rodziny == * Pozostali ..."
wikitext
text/x-wiki
'''Mańdziak Hryńko (Grzegorz)'''
== Rodzina ==
Hryńko Mańdziak , bardzo dobry kowal, żona Zofia
== Dzieci ==
Eugeniusz, Jan, Maria
== Dzieje rodziny ==
* Pozostali w Pnikucie.
[[Kategoria:Hryńko]]
132f53d125e5e8e156e20a79921129bcf644c4b7
Jakub Pietruszczak
0
596
1092
1084
2019-11-16T21:10:22Z
Ffkapa
2
wikitext
text/x-wiki
'''Jakub Pietruszczak''' - [[Mapa dawnego Pnikuta|dom nr. 2]]
== Rodzina ==
Pieruszczak Jakub (1882 – 1955), żona Ludwika (1891) z domu Dorosz.
== Dzieci ==
Stefania (1913), Władysław (1917), Mieczysław (1919), Jan (1921), Paulina (1924), Bronisław (1927), Stanisław (1930).
== Dzieje rodziny ==
* Jakub w I Wojnie Światowej był na froncie włoskim w stopniu porucznika (wojsko austriackie), potem w Wojsku Polskim.
* Stefania wyszła za mąż za Michała Piwowara (przyd. „Grabarz”) ze Średniego i zamieszkała w jego domu niedaleko Starego Cmentarza za rzeką, mieli 2 córki Kazimierę i Janinę i 2 synów bliźniaków Mieczysława i Henryka.
* Władysław ożenił się w 1947 r. po powrocie z wojny z Marią Lech (1928), córką Józefa (1901) i Zofii z domu Wiącek (1906), mieli 2 córki Zofia (1949) i Kazimiera (1953); Wyjechali do Polski, do Dłużyny koło Zgorzelca w 1957, tam urodził się syn Zbigniew (1958). Zbigniew ożenił się z Elżbietą i mają syna Bartka.
* Paulina wyszła za mąż za Ludwika Dorosza (przyd. „Stryczek”).
* Mieczysław zginął w 1944r. w wojnie koło Lublina (wcześniej był w partyzantce).
* Jan osiadł w Węglińcu, ożenił się i mieli córkę i 2 synów.
* Bronisław zamieszkał w Zgorzelcu i miał 2 synów, zmarł w 2006r. (był w partyzantce).
* Stanisław zamieszkał w Zgorzelcu, miał 1 syna i 1 córkę, zmarł w 1992r.
* Ludwika ich matka przyjechała wraz z nimi do Polski do Dłużyny, Jakub ojciec zmarł w 1955r. w Pnikucie i tam został pochowany.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Pietruszczakowie]]
[[Kategoria:Urodzeni w 1882]]
[[Kategoria:Zmarli w 1955]]
81a443c8500292a8ded4f031ad77962b75214ae6
1084
1080
2019-11-16T20:20:14Z
Ffkapa
2
wikitext
text/x-wiki
'''Jakub Pietruszczak''' - [[Mapa dawnego Pnikuta|dom nr. 2]]
== Rodzina ==
Pieruszczak Jakub (1882 – 1955), żona Ludwika (1891) z domu Dorosz.
== Dzieci ==
Stefania (1913), Władysław (1917), Mieczysław (1919), Jan (1921), Paulina (1924), Bronisław (1927), Stanisław (1930).
== Dzieje rodziny ==
Jakub w I Wojnie Światowej był na froncie włoskim w stopniu porucznika (wojsko austriackie), potem w Wojsku Polskim.
Stefania wyszła za mąż za Michała Piwowara (przyd. „Grabarz”) ze Średniego i zamieszkała w jego domu niedaleko Starego Cmentarza za rzeką, mieli 2 córki Kazimierę i Janinę i 2 synów bliźniaków Mieczysława i Henryka.
Władysław ożenił się w 1947 r. po powrocie z wojny z Marią Lech (1928) , córką Józefa (1901) i Zofii z d. Wiącek (1906), mieli 2 córki Zofia (1949) i Kazimiera (1953) ; wyjechali do Polski, do Dłużyny k. Zgorzelca w 1957r. , tam urodził się syn Zbigniew (1958) Zbigniew ożenił się z Elżbietą i mają syna Bartka.
Paulina wyszła za mąż za Ludwika Dorosza (przyd. „Stryczek”).
Mieczysław zginął w 1944r. w wojnie koło Lublina (wcześniej był w partyzantce).
Jan osiadł w Węglińcu, ożenił się i mieli córkę i 2 synów.
Bronisław zamieszkał w Zgorzelcu i miał 2 synów, zmarł w 2006r. (był w partyzantce).
Stanisław zamieszkał w Zgorzelcu, miał 1 syna i 1 córkę, zmarł w 1992r.
Ludwika ich matka przyjechała wraz z nimi do Polski do Dłużyny, Jakub ojciec zmarł w 1955r. w Pnikucie i tam został pochowany.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Pietruszczakowie]]
[[Kategoria:Urodzeni w 1882]]
[[Kategoria:Zmarli w 1955]]
e99ee823c019fcf6935bfed536c6e0058a57651f
1080
1079
2019-10-31T22:57:44Z
Ffkapa
2
wikitext
text/x-wiki
'''Jakub Pietruszczak''' - [[Mapa dawnego Pnikuta|dom nr. 2]]
== Rodzina ==
Pieruszczak Jakub (1882 – 1955), żona Ludwika (1891) z domu Dorosz.
== Dzieci ==
Stefania (1913), Władysław (1917), Mieczysław (1919), Jan (1921), Paulina (1924), Bronisław (1927), Stanisław (1930).
== Dzieje rodziny ==
Jakub w I Wojnie Światowej był na froncie włoskim w stopniu porucznika (wojsko austriackie), potem w Wojsku Polskim.
Stefania wyszła za mąż za Michała Piwowara (przyd. „Grabarz”) ze Średniego i zamieszkała w jego domu niedaleko Starego Cmentarza za rzeką, mieli 2 córki Kazimierę i Janinę i 2 synów bliźniaków Mieczysława i Henryka.
Władysław ożenił się w 1947 r. po powrocie z wojny z Marią Lech (1928) , córką Józefa (1901) i Zofii z d. Wiącek (1906), mieli 2 córki Zofia (1949) i Kazimiera (1953) ; wyjechali do Polski, do Dłużyny k. Zgorzelca w 1957r. , tam urodził się syn Zbigniew (1958) Zbigniew ożenił się z Elżbietą i mają syna Bartka.
Paulina wyszła za mąż za Ludwika Dorosza (przyd. „Stryczek”).
Mieczysław zginął w 1944r. w wojnie koło Lublina (wcześniej był w partyzantce).
Jan osiadł w Węglińcu, ożenił się i mieli córkę i 2 synów.
Bronisław zamieszkał w Zgorzelcu i miał 2 synów, zmarł w 2006r. (był w partyzantce).
Stanisław zamieszkał w Zgorzelcu, miał 1 syna i 1 córkę, zmarł w 1992r.
Ludwika ich matka przyjechała wraz z nimi do Polski do Dłużyny, Jakub ojciec zmarł w 1955r. w Pnikucie i tam został pochowany.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Ludzie związani z Pnikutem]]
[[Kategoria:Urodzeni w 1882]]
[[Kategoria:Zmarli w 1955]]
edf45240e6e401a82a3bf8bc7400555d35c3b814
1079
2019-10-31T22:55:02Z
Ffkapa
2
Utworzono nową stronę "'''Jakub Pietruszczak''' - [[Mapa dawnego Pnikuta|dom nr. 2]] == Rodzina == Pieruszczak Jakub (1882 – 1955), żona Ludwika (1891) z domu Dorosz. == Dzieci == Stefania..."
wikitext
text/x-wiki
'''Jakub Pietruszczak''' - [[Mapa dawnego Pnikuta|dom nr. 2]]
== Rodzina ==
Pieruszczak Jakub (1882 – 1955), żona Ludwika (1891) z domu Dorosz.
== Dzieci ==
Stefania (1913), Władysław (1917), Mieczysław (1919), Jan (1921), Paulina (1924), Bronisław (1927), Stanisław (1930).
== Dzieje rodziny ==
Jakub w I Wojnie Światowej był na froncie włoskim w stopniu porucznika (wojsko austriackie), potem w Wojsku Polskim.
Stefania wyszła za mąż za Michała Piwowara (przyd. „Grabarz”) ze Średniego i zamieszkała w jego domu niedaleko Starego Cmentarza za rzeką, mieli 2 córki Kazimierę i Janinę i 2 synów bliźniaków Mieczysława i Henryka.
Władysław ożenił się w 1947 r. po powrocie z wojny z Marią Lech (1928) , córką Józefa (1901) i Zofii z d. Wiącek (1906), mieli 2 córki Zofia (1949) i Kazimiera (1953) ; wyjechali do Polski, do Dłużyny k. Zgorzelca w 1957r. , tam urodził się syn Zbigniew (1958) Zbigniew ożenił się z Elżbietą i mają syna Bartka.
Paulina wyszła za mąż za Ludwika Dorosza (przyd. „Stryczek”).
Mieczysław zginął w 1944r. w wojnie koło Lublina (wcześniej był w partyzantce).
Jan osiadł w Węglińcu, ożenił się i mieli córkę i 2 synów.
Bronisław zamieszkał w Zgorzelcu i miał 2 synów, zmarł w 2006r. (był w partyzantce).
Stanisław zamieszkał w Zgorzelcu, miał 1 syna i 1 córkę, zmarł w 1992r.
Ludwika ich matka przyjechała wraz z nimi do Polski do Dłużyny, Jakub ojciec zmarł w 1955r. w Pnikucie i tam został pochowany.
e55266a0df2b2b37a42d7f94c493d8a53e31f5d6
Jan Barbara
0
619
1123
1116
2019-11-26T22:52:41Z
Ffkapa
2
removed [[Category:Barbara]]; added [[Category:Barbarowie]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
'''Jan Barbara'''– zarządcą młyna - [[Mapa dawnego Pnikuta|dom nr. 11]]
== Rodzina ==
Jan Barbara z żoną.
== Dzieci ==
Zofia, Marian, Bolesław
== Dzieje rodziny ==
* Zarządcą młyna był Jan Barbara z żoną. Mieszkali w dużym domu obok Młyna.
* Mieli córkę Zosię, która pobierała naukę gry na skrzypcach. Sąsiedzi długo po jej tragicznej śmierci wspominali piękną grę skrzypiec rozlegającą się wieczorami nad wodami rzeki i błonia. Zosia utonęła w głębokich wodach zbiornika zwanego Dużym Upustem kilkanaście metrów od domu.
* Miała ona jeszcze 2 braci Mariana i Bolesława. Byli oni porównywalnie w wieku Janiny Piwowar ur. w 1920r., czyli z roku w przedziale 1920-24. Janina uczęszczała z nimi w dzieciństwie do starej ochronki koło młyna, zapamiętała ich jako bardzo ułożonych, koleżeńskich i uprzejmych chłopaków (słowa Pani Janiny zamieszkałej w Tychach, ul. Niepodległości 36/20, zmarła w 2014 r.).
* Cała rodzina Jana Barbary wyjechała z Pnikuta zaraz w pierwszych dniach wojny 1.09.1939r.
* Młyn drewniany na palach wraz zabudowaniami. Na nurcie rzeki Sieczna płynącej wzdłuż wioski na wysokości Górniego Dworu została zbudowana tama ze śluzą i powstał duży zbiornik wodny obwałowany z obu stron, który służył jako kąpielisko dla umiejących już pływać, a także uczących się tej sztuki. Ze zbiornika zwanego Dużym Upustem nurt rzeki został skierowany w dwóch przeciwnych kierunkach
* 1 - na turbinę, napędzającą urządzenia i walce Młyna. Woda wyrzucana z turbiny wpadała do pogłębionego dawnego potoku, tworząc lewy nurt rzeki, biegnący obok ulicy gminnej, który ostrym zakrętem skierował się między domami Kosowskich, Furmanów i Rogały w ogrody i tam w Kącie Ogrodu Mikołaja Dorosz wpadał do starej rzeki;
* 2 - skierowany ze zbiornika kilkanaście metrów dalej do starego koryta przez śluzę podzieloną trzema za- stawkami podnoszonymi za pomocą łańcuchów. Spadająca woda z wysokości śluzy wyżłobiła tuż za drewnianą podłogą Śluzy mały ale głęboki zbiornik odpływu Nazwany Małym Upustem. Odważni chłopaki urządzali skoki z najwyższej belki śluzy do wody Małego Upustu. Trzeba było trafić w to najgłębsze miejsce 5x5 m, by nie skoczyć po raz ostatni. Najbardziej odważnym i pierwszym był podziwiany Zdzisław Czerwiński. Strach było patrzeć na jego lot, kiedy z dłońmi wyciągniętymi przed głową wpadał w dół prosto do wody i czekać, czy między rozchodzącymi się kręgami fal za chwilę wypłynie. Wypływał!
[[Kategoria:Barbarowie]]
2c2f1ea77228df477821d5ba44f66a9d6fac13c6
1116
1115
2019-11-17T00:06:53Z
Ffkapa
2
wikitext
text/x-wiki
'''Jan Barbara'''– zarządcą młyna - [[Mapa dawnego Pnikuta|dom nr. 11]]
== Rodzina ==
Jan Barbara z żoną.
== Dzieci ==
Zofia, Marian, Bolesław
== Dzieje rodziny ==
* Zarządcą młyna był Jan Barbara z żoną. Mieszkali w dużym domu obok Młyna.
* Mieli córkę Zosię, która pobierała naukę gry na skrzypcach. Sąsiedzi długo po jej tragicznej śmierci wspominali piękną grę skrzypiec rozlegającą się wieczorami nad wodami rzeki i błonia. Zosia utonęła w głębokich wodach zbiornika zwanego Dużym Upustem kilkanaście metrów od domu.
* Miała ona jeszcze 2 braci Mariana i Bolesława. Byli oni porównywalnie w wieku Janiny Piwowar ur. w 1920r., czyli z roku w przedziale 1920-24. Janina uczęszczała z nimi w dzieciństwie do starej ochronki koło młyna, zapamiętała ich jako bardzo ułożonych, koleżeńskich i uprzejmych chłopaków (słowa Pani Janiny zamieszkałej w Tychach, ul. Niepodległości 36/20, zmarła w 2014 r.).
* Cała rodzina Jana Barbary wyjechała z Pnikuta zaraz w pierwszych dniach wojny 1.09.1939r.
* Młyn drewniany na palach wraz zabudowaniami. Na nurcie rzeki Sieczna płynącej wzdłuż wioski na wysokości Górniego Dworu została zbudowana tama ze śluzą i powstał duży zbiornik wodny obwałowany z obu stron, który służył jako kąpielisko dla umiejących już pływać, a także uczących się tej sztuki. Ze zbiornika zwanego Dużym Upustem nurt rzeki został skierowany w dwóch przeciwnych kierunkach
* 1 - na turbinę, napędzającą urządzenia i walce Młyna. Woda wyrzucana z turbiny wpadała do pogłębionego dawnego potoku, tworząc lewy nurt rzeki, biegnący obok ulicy gminnej, który ostrym zakrętem skierował się między domami Kosowskich, Furmanów i Rogały w ogrody i tam w Kącie Ogrodu Mikołaja Dorosz wpadał do starej rzeki;
* 2 - skierowany ze zbiornika kilkanaście metrów dalej do starego koryta przez śluzę podzieloną trzema za- stawkami podnoszonymi za pomocą łańcuchów. Spadająca woda z wysokości śluzy wyżłobiła tuż za drewnianą podłogą Śluzy mały ale głęboki zbiornik odpływu Nazwany Małym Upustem. Odważni chłopaki urządzali skoki z najwyższej belki śluzy do wody Małego Upustu. Trzeba było trafić w to najgłębsze miejsce 5x5 m, by nie skoczyć po raz ostatni. Najbardziej odważnym i pierwszym był podziwiany Zdzisław Czerwiński. Strach było patrzeć na jego lot, kiedy z dłońmi wyciągniętymi przed głową wpadał w dół prosto do wody i czekać, czy między rozchodzącymi się kręgami fal za chwilę wypłynie. Wypływał!
[[Kategoria:Barbara]]
ed07f0c49d40a6c5e3117fe764af6e10ac17a0ce
1115
2019-11-17T00:04:31Z
Ffkapa
2
Utworzono nową stronę "'''Jan Barbara'''– zarządcą młyna - [[Mapa dawnego Pnikuta|dom nr. 11]] == Rodzina == Jan Barbara z żoną. == Dzieci == Zofia, Marian, Bolesław == Dzieje rodziny ..."
wikitext
text/x-wiki
'''Jan Barbara'''– zarządcą młyna - [[Mapa dawnego Pnikuta|dom nr. 11]]
== Rodzina ==
Jan Barbara z żoną.
== Dzieci ==
Zofia, Marian, Bolesław
== Dzieje rodziny ==
* Zarządcą młyna był Jan Barbara z żoną. Mieszkali w dużym domu obok Młyna.
* Mieli córkę Zosię, która pobierała naukę gry na skrzypcach. Sąsiedzi długo po jej tragicznej śmierci wspominali piękną grę skrzypiec rozlegającą się wieczorami nad wodami rzeki i błonia. Zosia utonęła w głębokich wodach zbiornika zwanego Dużym Upustem kilkanaście metrów od domu.
* Miała ona jeszcze 2 braci Mariana i Bolesława. Byli oni porównywalnie w wieku Janiny Piwowar ur. w 1920r., czyli z roku w przedziale 1920-24. Janina uczęszczała z nimi w dzieciństwie do starej ochronki koło młyna, zapamiętała ich jako bardzo ułożonych, koleżeńskich i uprzejmych chłopaków (słowa Pani Janiny zamieszkałej w Tychach, ul. Niepodległości 36/20, zmarła w 2014 r.).
* Cała rodzina Jana Barbary wyjechała z Pnikuta zaraz w pierwszych dniach wojny 1.09.1939r.
* Młyn drewniany na palach wraz zabudowaniami. Na nurcie rzeki Sieczna płynącej wzdłuż wioski na wysokości Górniego Dworu została zbudowana tama ze śluzą i powstał duży zbiornik wodny obwałowany z obu stron, który służył jako kąpielisko dla umiejących już pływać, a także uczących się tej sztuki. Ze zbiornika zwanego Dużym Upustem nurt rzeki został skierowany w dwóch przeciwnych kierunkach
* 1 - na turbinę, napędzającą urządzenia i walce Młyna. Woda wyrzucana z turbiny wpadała do pogłębionego dawnego potoku, tworząc lewy nurt rzeki, biegnący obok ulicy gminnej, który ostrym zakrętem skierował się między domami Kosowskich, Furmanów i Rogały w ogrody i tam w Kącie Ogrodu Mikołaja Dorosz wpadał do starej rzeki;
* 2 - skierowany ze zbiornika kilkanaście metrów dalej do starego koryta przez śluzę podzieloną trzema za- stawkami podnoszonymi za pomocą łańcuchów. Spadająca woda z wysokości śluzy wyżłobiła tuż za drewnianą podłogą Śluzy mały ale głęboki zbiornik odpływu Nazwany Małym Upustem. Odważni chłopaki urządzali skoki z najwyższej belki śluzy do wody Małego Upustu. Trzeba było trafić w to najgłębsze miejsce 5x5 m, by nie skoczyć po raz ostatni. Najbardziej odważnym i pierwszym był podziwiany Zdzisław Czerwiński. Strach było patrzeć na jego lot, kiedy z dłońmi wyciągniętymi przed głową wpadał w dół prosto do wody i czekać, czy między rozchodzącymi się kręgami fal za chwilę wypłynie. Wypływał!
65be4323cb617a8a3c16a4bf350f282139f9d399
Jan Czuryło
0
621
1120
1119
2019-11-17T00:35:31Z
Ffkapa
2
wikitext
text/x-wiki
'''Jan Czuryło''' - [[Mapa dawnego Pnikuta|dom nr. 12]]
== Rodzina ==
Jan Czuryło (przyd. „Leśny”), żona Rozalia córka Mateusza
== Dzieci ==
Szymon, Katarzyna (1897), Aniela (1907), Kazimiera (żołnierz AK), Czesława, Julian (1903-1991), Władysław
== Dzieje rodziny ==
* Szymon z żoną Marią z d. Dorosz. Szymon zginął wywieziony przez Sowietów w 1939 r.
* Katarzyna wyszła za mąż za Muszaka Piotra i zamieszkała w jego domu.
* Aniela wyszła za mąż za Stanisława Rogała i zamieszkała w jego domu na Średnim.
* Kazimiera wyjechała do Polski w 1945 r., wyszła za mąż za Żółkiewicza Józefa, zamieszkali w Medyce, tam zmarła.
*Czesława wstąpiła do zakonu w Bochni w 1938 r.
* Julian ukończył Politechnikę Lwowską, ożenił się z nauczycielką Ożóg, zamieszkali we Lwowie.
* Władysław, ożenił się z Heleną Dorosz, dzieci nie mieli. Wyjechali do Polski do Polanicy Zdroju, zabierając ze sobą Marię Czuryło z d. Dorosz, żonę Szymona, który zginął w sowieckich łagrach. Dom ich stoi do dziś.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Czuryłowie]]
7e686b55c7e53563d639943b0e3206a86e5bd107
1119
1118
2019-11-17T00:33:51Z
Ffkapa
2
wikitext
text/x-wiki
'''Jan Czuryło''' - [[Mapa dawnego Pnikuta|dom nr. 12]]
== Rodzina ==
Jan Czuryło (przyd. „Leśny”), żona Rozalia córka Mateusza
== Dzieci ==
Szymon, Katarzyna (1897), Aniela (1907), Kazimiera (żołnierz AK), Czesława, Julian (1903-1991), Władysław
== Dzieje rodziny ==
* Szymon z żoną Marią z d. Dorosz. Szymon zginął wywieziony przez Sowietów w 1939 r.
* Katarzyna wyszła za mąż za Muszaka Piotra i zamieszkała w jego domu.
* Aniela wyszła za mąż za Stanisława Rogała i zamieszkała w jego domu na Średnim.
* Kazimiera wyjechała do Polski w 1945 r., wyszła za mąż za Żółkiewicza Józefa, zamieszkali w Medyce, tam zmarła.
*Czesława wstąpiła do zakonu w Bochni w 1938 r.
* Julian ukończył Politechnikę Lwowską, ożenił się z nauczycielką Ożóg, zamieszkali we Lwowie.
* Władysław, ożenił się z Heleną Dorosz, dzieci nie mieli. Wyjechali do Polski do Polanicy Zdroju, zabierając ze sobą Marię Czuryło z d. Dorosz, żonę Szymona, który zginął w sowieckich łagrach. Dom ich stoi do dziś.
75c2b12183ef91ab9d1e0607001fabeaada27320
1118
2019-11-17T00:32:49Z
Ffkapa
2
Utworzono nową stronę "'''Jan Czuryło''' - [[Mapa dawnego Pnikuta|dom nr. 12]] Jan Czuryło (przyd. „Leśny”), żona Rozalia córka Mateusza == Dzieci == Szymon, Katarzyna (1897), Aniela..."
wikitext
text/x-wiki
'''Jan Czuryło''' - [[Mapa dawnego Pnikuta|dom nr. 12]]
Jan Czuryło (przyd. „Leśny”), żona Rozalia córka Mateusza
== Dzieci ==
Szymon, Katarzyna (1897), Aniela (1907), Kazimiera (żołnierz AK), Czesława, Julian (1903-1991), Władysław
== Dzieje rodziny ==
* Szymon z żoną Marią z d. Dorosz. Szymon zginął wywieziony przez Sowietów w 1939 r.
* Katarzyna wyszła za mąż za Muszaka Piotra i zamieszkała w jego domu.
* Aniela wyszła za mąż za Stanisława Rogała i zamieszkała w jego domu na Średnim.
* Kazimiera wyjechała do Polski w 1945 r., wyszła za mąż za Żółkiewicza Józefa, zamieszkali w Medyce, tam zmarła.
*Czesława wstąpiła do zakonu w Bochni w 1938 r.
* Julian ukończył Politechnikę Lwowską, ożenił się z nauczycielką Ożóg, zamieszkali we Lwowie.
* Władysław, ożenił się z Heleną Dorosz, dzieci nie mieli. Wyjechali do Polski do Polanicy Zdroju, zabierając ze sobą Marię Czuryło z d. Dorosz, żonę Szymona, który zginął w sowieckich łagrach. Dom ich stoi do dziś.
8658aadc12881c5a02012802e82136cd5cbb2c2e
Jan Miśniak
0
15
1087
1061
2019-11-16T20:35:48Z
Ffkapa
2
removed [[Category:Ludzie związani z Pnikutem]]; added [[Category:Miśniakowie]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
[[Plik:Pnikut, Jan Miśniak.jpg|thumb|upright|Portret Jana Miśniaka]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi [[Pnikut]], zamordowany 5 października 1940 w Mauthausen-Gusen).
== Biografia ==
Ukończył seminarium nauczycielskie (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości.
[[Plik:Pnikut, nagrobek Jana Miđniaka.jpg|thumb|left|Pnikut,symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu II Wojny Światowej, odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do KL Dachau, a następnie do KL Mauthausen-Gusen, gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* Krzyż Wojskowy Karola
* Odznaka Honorowa "Orlęta"
* Gwiazda Przemyśla
* Medal Dziesięciolecia Odzyskanej Niepodległości
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Miśniakowie]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
[[Kategoria:Urodzeni w 1888]]
[[Kategoria:Zmarli w 1940]]
7e31fb30c9f73b33bcfffb46b9720b84aa8494d3
1061
655
2018-04-03T08:08:29Z
Ffkapa
2
drobne redakcyjne
wikitext
text/x-wiki
[[Plik:Pnikut, Jan Miśniak.jpg|thumb|upright|Portret Jana Miśniaka]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi [[Pnikut]], zamordowany 5 października 1940 w Mauthausen-Gusen).
== Biografia ==
Ukończył seminarium nauczycielskie (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości.
[[Plik:Pnikut, nagrobek Jana Miđniaka.jpg|thumb|left|Pnikut,symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu II Wojny Światowej, odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do KL Dachau, a następnie do KL Mauthausen-Gusen, gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* Krzyż Wojskowy Karola
* Odznaka Honorowa "Orlęta"
* Gwiazda Przemyśla
* Medal Dziesięciolecia Odzyskanej Niepodległości
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Ludzie związani z Pnikutem]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
[[Kategoria:Urodzeni w 1888]]
[[Kategoria:Zmarli w 1940]]
e6eaa8cb673fa640f2b619239cc46711a2e83893
655
650
2014-03-13T22:24:07Z
Ffkapa
2
added [[Category:Zmarli w 1940]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
[[File:Pnikut, Jan Miśniak.jpg|thumb|Pnikut, Jan Miśniak]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we wsi [[Pnikut]], zamordowany [[5 października]][[1940]] w Mauthausen-Gusen).
== Biografia ==
Ukończył seminarium nauczycielskie (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości.
[[File:Pnikut, nagrobek Jana Miđniaka.jpg|thumb|left|Pnikut,symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu II Wojny Światowej, odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do KL Dachau, a następnie do KL Mauthausen-Gusen, gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* Krzyż Wojskowy Karola
* Odznaka Honorowa "Orlęta"
* Gwiazda Przemyśla
* Medal Dziesięciolecia Odzyskanej Niepodległości
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Ludzie związani z Pnikutem]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
[[Kategoria:Urodzeni w 1888]]
[[Kategoria:Zmarli w 1940]]
21fcccedfc98f4d3c618c812831243b4d4ae1982
650
647
2014-03-13T22:17:55Z
Ffkapa
2
added [[Category:Urodzeni w 1888]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
[[File:Pnikut, Jan Miśniak.jpg|thumb|Pnikut, Jan Miśniak]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we wsi [[Pnikut]], zamordowany [[5 października]][[1940]] w Mauthausen-Gusen).
== Biografia ==
Ukończył seminarium nauczycielskie (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości.
[[File:Pnikut, nagrobek Jana Miđniaka.jpg|thumb|left|Pnikut,symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu II Wojny Światowej, odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do KL Dachau, a następnie do KL Mauthausen-Gusen, gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* Krzyż Wojskowy Karola
* Odznaka Honorowa "Orlęta"
* Gwiazda Przemyśla
* Medal Dziesięciolecia Odzyskanej Niepodległości
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Ludzie związani z Pnikutem]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
[[Kategoria:Urodzeni w 1888]]
a75e92e2eda4ba925ec049f75db8662615c9da4d
647
646
2014-03-13T22:12:56Z
Ffkapa
2
removed [[Category:Związani z Pnikutem]]; added [[Category:Ludzie związani z Pnikutem]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
[[File:Pnikut, Jan Miśniak.jpg|thumb|Pnikut, Jan Miśniak]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we wsi [[Pnikut]], zamordowany [[5 października]][[1940]] w Mauthausen-Gusen).
== Biografia ==
Ukończył seminarium nauczycielskie (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości.
[[File:Pnikut, nagrobek Jana Miđniaka.jpg|thumb|left|Pnikut,symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu II Wojny Światowej, odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do KL Dachau, a następnie do KL Mauthausen-Gusen, gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* Krzyż Wojskowy Karola
* Odznaka Honorowa "Orlęta"
* Gwiazda Przemyśla
* Medal Dziesięciolecia Odzyskanej Niepodległości
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Ludzie związani z Pnikutem]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
779bec7ccd2134a67dce04edf5fdc9c63fd25cd6
646
526
2014-03-13T22:12:23Z
Ffkapa
2
removed [[Category:Urodzeni na Kresach II Rzeczypospolitej]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
[[File:Pnikut, Jan Miśniak.jpg|thumb|Pnikut, Jan Miśniak]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we wsi [[Pnikut]], zamordowany [[5 października]][[1940]] w Mauthausen-Gusen).
== Biografia ==
Ukończył seminarium nauczycielskie (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości.
[[File:Pnikut, nagrobek Jana Miđniaka.jpg|thumb|left|Pnikut,symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu II Wojny Światowej, odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do KL Dachau, a następnie do KL Mauthausen-Gusen, gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* Krzyż Wojskowy Karola
* Odznaka Honorowa "Orlęta"
* Gwiazda Przemyśla
* Medal Dziesięciolecia Odzyskanej Niepodległości
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Związani z Pnikutem]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
9fc1c58151e8cd72c7c28d7de1ce196ed199a095
526
525
2014-02-28T23:16:29Z
Ffkapa
2
dewikizacja
wikitext
text/x-wiki
[[File:Pnikut, Jan Miśniak.jpg|thumb|Pnikut, Jan Miśniak]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we wsi [[Pnikut]], zamordowany [[5 października]][[1940]] w Mauthausen-Gusen).
== Biografia ==
Ukończył seminarium nauczycielskie (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości.
[[File:Pnikut, nagrobek Jana Miđniaka.jpg|thumb|left|Pnikut,symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu II Wojny Światowej, odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do KL Dachau, a następnie do KL Mauthausen-Gusen, gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* Krzyż Wojskowy Karola
* Odznaka Honorowa "Orlęta"
* Gwiazda Przemyśla
* Medal Dziesięciolecia Odzyskanej Niepodległości
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Związani z Pnikutem]]
[[Kategoria:Urodzeni na Kresach II Rzeczypospolitej]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
4777d5dec2575392bbf9e2fde92c11ba9821efdf
525
362
2014-02-28T23:14:46Z
Ffkapa
2
wikitext
text/x-wiki
[[File:Pnikut, Jan Miśniak.jpg|thumb|Pnikut, Jan Miśniak]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we [[Wieś|wsi]] [[Pnikut]], zamordowany [[5 października]][[1940]] w [[Mauthausen-Gusen]]).
== Biografia ==
Ukończył seminarium nauczycielskie (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości.
[[File:Pnikut, nagrobek Jana Miđniaka.jpg|thumb|left|Pnikut,symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu II Wojny Światowej, odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do KL Dachau, a następnie do KL Mauthausen-Gusen, gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* [[Krzyż Wojskowy Karola]]
* [[Odznaka Honorowa "Orlęta"]]
* Gwiazda Przemyśla
* [[Medal Dziesięciolecia Odzyskanej Niepodległości]]
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Związani z Pnikutem]]
[[Kategoria:Urodzeni na Kresach II Rzeczypospolitej]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
bc447bfe837d145b83528bc005677756461dbb8c
362
361
2014-01-18T01:11:21Z
Ffkapa
2
wikitext
text/x-wiki
[[File:Pnikut, Jan Miśniak.jpg|thumb|Pnikut, Jan Miśniak]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we [[Wieś|wsi]] [[Pnikut]], zamordowany [[5 października]][[1940]] w [[Mauthausen-Gusen]]).
== Biografia ==
Ukończył [[Seminaria nauczycielskie|seminarium nauczycielskie]] (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie [[I wojna światowa|I Wojny Światowej]] walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go [[Krzyż Wojskowy Karola|Krzyżem Wojskowym Karola]] i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień [[podporucznik]]a. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z [[Bolszewicy|Bolszewikami]] trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu [[porucznik]]a.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w [[Zawiercie|Zawierciu]]<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje [[Medal Dziesięciolecia Odzyskanej Niepodległości|Medalem Dziesięciolecia Odzyskanej Niepodległości]].
[[File:Pnikut, nagrobek Jana Miđniaka.jpg|thumb|left|Pnikut,symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu [[II wojna światowa|II Wojny Światowej]], odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do [[Dachau (KL)|KL Dachau]], a następnie do [[Mauthausen-Gusen|KL Mauthausen-Gusen]], gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* [[Krzyż Wojskowy Karola]]
* [[Odznaka Honorowa "Orlęta"]]
* Gwiazda Przemyśla
* [[Medal Dziesięciolecia Odzyskanej Niepodległości]]
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Związani z Pnikutem]]
[[Kategoria:Urodzeni na Kresach II Rzeczypospolitej]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
c0b63dd4eade9b441cafbb28f15e685bebcb35c4
361
350
2014-01-18T01:05:12Z
Ffkapa
2
wikitext
text/x-wiki
[[File:Pnikut, Jan Miśniak.jpg|thumb|Pnikut, Jan Miśniak]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we [[Wieś|wsi]] [[Pnikut]], zamordowany [[5 października]][[1940]] w [[Mauthausen-Gusen]]).
== Biografia ==
Ukończył [[Seminaria nauczycielskie|seminarium nauczycielskie]] (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie [[I wojna światowa|I Wojny Światowej]] walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go [[Krzyż Wojskowy Karola|Krzyżem Wojskowym Karola]] i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień [[podporucznik]]a. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z [[Bolszewicy|Bolszewikami]] trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu [[porucznik]]a.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w [[Zawiercie|Zawierciu]]<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje [[Medal Dziesięciolecia Odzyskanej Niepodległości|Medalem Dziesięciolecia Odzyskanej Niepodległości]].
[[File:Pnikut, nagrobek Jana Misniaka.jpg|thumb|left|Symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu [[II wojna światowa|II Wojny Światowej]], odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do [[Dachau (KL)|KL Dachau]], a następnie do [[Mauthausen-Gusen|KL Mauthausen-Gusen]], gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* [[Krzyż Wojskowy Karola]]
* [[Odznaka Honorowa "Orlęta"]]
* Gwiazda Przemyśla
* [[Medal Dziesięciolecia Odzyskanej Niepodległości]]
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Związani z Pnikutem]]
[[Kategoria:Urodzeni na Kresach II Rzeczypospolitej]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
4777ce4c17593cf97e06253220e59bd65e52c763
350
349
2014-01-17T13:12:37Z
Ffkapa
2
removed [[Category:Zmarli w 1940]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
[[Plik:Pnikut, Jan Misniak.jpg|thumb|upright|Portret Jana Miśniaka]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we [[Wieś|wsi]] [[Pnikut]], zamordowany [[5 października]][[1940]] w [[Mauthausen-Gusen]]).
== Biografia ==
Ukończył [[Seminaria nauczycielskie|seminarium nauczycielskie]] (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie [[I wojna światowa|I Wojny Światowej]] walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go [[Krzyż Wojskowy Karola|Krzyżem Wojskowym Karola]] i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień [[podporucznik]]a. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z [[Bolszewicy|Bolszewikami]] trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu [[porucznik]]a.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w [[Zawiercie|Zawierciu]]<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje [[Medal Dziesięciolecia Odzyskanej Niepodległości|Medalem Dziesięciolecia Odzyskanej Niepodległości]].
[[Plik:Pnikut, nagrobek Jana Misniaka.jpg|thumb|left|Symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu [[II wojna światowa|II Wojny Światowej]], odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do [[Dachau (KL)|KL Dachau]], a następnie do [[Mauthausen-Gusen|KL Mauthausen-Gusen]], gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* [[Krzyż Wojskowy Karola]]
* [[Odznaka Honorowa "Orlęta"]]
* Gwiazda Przemyśla
* [[Medal Dziesięciolecia Odzyskanej Niepodległości]]
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Związani z Pnikutem]]
[[Kategoria:Urodzeni na Kresach II Rzeczypospolitej]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
d91206450ea81a0bf2f0565a7382c00dd93c505a
349
347
2014-01-17T13:12:19Z
Ffkapa
2
removed [[Category:Urodzeni w 1888]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
[[Plik:Pnikut, Jan Misniak.jpg|thumb|upright|Portret Jana Miśniaka]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we [[Wieś|wsi]] [[Pnikut]], zamordowany [[5 października]][[1940]] w [[Mauthausen-Gusen]]).
== Biografia ==
Ukończył [[Seminaria nauczycielskie|seminarium nauczycielskie]] (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie [[I wojna światowa|I Wojny Światowej]] walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go [[Krzyż Wojskowy Karola|Krzyżem Wojskowym Karola]] i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień [[podporucznik]]a. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z [[Bolszewicy|Bolszewikami]] trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu [[porucznik]]a.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w [[Zawiercie|Zawierciu]]<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje [[Medal Dziesięciolecia Odzyskanej Niepodległości|Medalem Dziesięciolecia Odzyskanej Niepodległości]].
[[Plik:Pnikut, nagrobek Jana Misniaka.jpg|thumb|left|Symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu [[II wojna światowa|II Wojny Światowej]], odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do [[Dachau (KL)|KL Dachau]], a następnie do [[Mauthausen-Gusen|KL Mauthausen-Gusen]], gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* [[Krzyż Wojskowy Karola]]
* [[Odznaka Honorowa "Orlęta"]]
* Gwiazda Przemyśla
* [[Medal Dziesięciolecia Odzyskanej Niepodległości]]
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Związani z Pnikutem]]
[[Kategoria:Urodzeni na Kresach II Rzeczypospolitej]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
[[Kategoria:Zmarli w 1940]]
1284031aa3c9090426113bfdcfebba26486e90a2
347
185
2014-01-17T00:49:46Z
Ffkapa
2
Reverted to revision 82 by [[Special:Contributions/Ffkapa|Ffkapa]] ([[User talk:Ffkapa|talk]]): Kiepski link. ([[WP:TW|TW]])
wikitext
text/x-wiki
[[Plik:Pnikut, Jan Misniak.jpg|thumb|upright|Portret Jana Miśniaka]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we [[Wieś|wsi]] [[Pnikut]], zamordowany [[5 października]][[1940]] w [[Mauthausen-Gusen]]).
== Biografia ==
Ukończył [[Seminaria nauczycielskie|seminarium nauczycielskie]] (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie [[I wojna światowa|I Wojny Światowej]] walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go [[Krzyż Wojskowy Karola|Krzyżem Wojskowym Karola]] i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień [[podporucznik]]a. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z [[Bolszewicy|Bolszewikami]] trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu [[porucznik]]a.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w [[Zawiercie|Zawierciu]]<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje [[Medal Dziesięciolecia Odzyskanej Niepodległości|Medalem Dziesięciolecia Odzyskanej Niepodległości]].
[[Plik:Pnikut, nagrobek Jana Misniaka.jpg|thumb|left|Symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu [[II wojna światowa|II Wojny Światowej]], odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do [[Dachau (KL)|KL Dachau]], a następnie do [[Mauthausen-Gusen|KL Mauthausen-Gusen]], gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* [[Krzyż Wojskowy Karola]]
* [[Odznaka Honorowa "Orlęta"]]
* Gwiazda Przemyśla
* [[Medal Dziesięciolecia Odzyskanej Niepodległości]]
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Związani z Pnikutem]]
[[Kategoria:Urodzeni na Kresach II Rzeczypospolitej]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
[[Kategoria:Urodzeni w 1888]]
[[Kategoria:Zmarli w 1940]]
7ab290b3573b7d2da5a343a54574ef6d7100af53
185
82
2014-01-16T16:25:16Z
Ffkapa
2
wikitext
text/x-wiki
[[Plik:Pnikut, Jan Misniak.jpg|thumb|upright|Portret Jana Miśniaka]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we [[Wieś|wsi]] [[Pnikut]], zamordowany [[5 października]][[1940]] w [[Mauthausen-Gusen]]).
== Biografia ==
Ukończył [[Seminaria nauczycielskie|seminarium nauczycielskie]] (prawdopodobnie w [[Andrzejak|Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie [[I wojna światowa|I Wojny Światowej]] walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go [[Krzyż Wojskowy Karola|Krzyżem Wojskowym Karola]] i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień [[podporucznik]]a. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z [[Bolszewicy|Bolszewikami]] trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu [[porucznik]]a.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w [[Zawiercie|Zawierciu]]<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje [[Medal Dziesięciolecia Odzyskanej Niepodległości|Medalem Dziesięciolecia Odzyskanej Niepodległości]].
[[Plik:Pnikut, nagrobek Jana Misniaka.jpg|thumb|left|Symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu [[II wojna światowa|II Wojny Światowej]], odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do [[Dachau (KL)|KL Dachau]], a następnie do [[Mauthausen-Gusen|KL Mauthausen-Gusen]], gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* [[Krzyż Wojskowy Karola]]
* [[Odznaka Honorowa "Orlęta"]]
* Gwiazda Przemyśla
* [[Medal Dziesięciolecia Odzyskanej Niepodległości]]
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Związani z Pnikutem]]
[[Kategoria:Urodzeni na Kresach II Rzeczypospolitej]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
[[Kategoria:Urodzeni w 1888]]
[[Kategoria:Zmarli w 1940]]
dee311db5b751f33d811eef2f34821c55237bfe7
82
65
2014-01-16T00:07:03Z
Ffkapa
2
foto
wikitext
text/x-wiki
[[Plik:Pnikut, Jan Misniak.jpg|thumb|upright|Portret Jana Miśniaka]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we [[Wieś|wsi]] [[Pnikut]], zamordowany [[5 października]][[1940]] w [[Mauthausen-Gusen]]).
== Biografia ==
Ukończył [[Seminaria nauczycielskie|seminarium nauczycielskie]] (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie [[I wojna światowa|I Wojny Światowej]] walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go [[Krzyż Wojskowy Karola|Krzyżem Wojskowym Karola]] i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień [[podporucznik]]a. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z [[Bolszewicy|Bolszewikami]] trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu [[porucznik]]a.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w [[Zawiercie|Zawierciu]]<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje [[Medal Dziesięciolecia Odzyskanej Niepodległości|Medalem Dziesięciolecia Odzyskanej Niepodległości]].
[[Plik:Pnikut, nagrobek Jana Misniaka.jpg|thumb|left|Symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu [[II wojna światowa|II Wojny Światowej]], odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do [[Dachau (KL)|KL Dachau]], a następnie do [[Mauthausen-Gusen|KL Mauthausen-Gusen]], gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* [[Krzyż Wojskowy Karola]]
* [[Odznaka Honorowa "Orlęta"]]
* Gwiazda Przemyśla
* [[Medal Dziesięciolecia Odzyskanej Niepodległości]]
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Związani z Pnikutem]]
[[Kategoria:Urodzeni na Kresach II Rzeczypospolitej]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
[[Kategoria:Urodzeni w 1888]]
[[Kategoria:Zmarli w 1940]]
7ab290b3573b7d2da5a343a54574ef6d7100af53
65
64
2014-01-15T21:55:59Z
Ffkapa
2
kat, szablon
wikitext
text/x-wiki
[[Plik:Pnikut, Jan Miśniak.jpg|thumb|upright|Portret Jana Miśniaka]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we [[Wieś|wsi]] [[Pnikut]], zamordowany [[5 października]][[1940]] w [[Mauthausen-Gusen]]).
== Biografia ==
Ukończył [[Seminaria nauczycielskie|seminarium nauczycielskie]] (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie [[I wojna światowa|I Wojny Światowej]] walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go [[Krzyż Wojskowy Karola|Krzyżem Wojskowym Karola]] i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień [[podporucznik]]a. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z [[Bolszewicy|Bolszewikami]] trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu [[porucznik]]a.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w [[Zawiercie|Zawierciu]]<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje [[Medal Dziesięciolecia Odzyskanej Niepodległości|Medalem Dziesięciolecia Odzyskanej Niepodległości]].
[[Plik:Pnikut, nagrobek Jana Miđniaka.jpg|thumb|upright|Symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu [[II wojna światowa|II Wojny Światowej]], odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do [[Dachau (KL)|KL Dachau]], a następnie do [[Mauthausen-Gusen|KL Mauthausen-Gusen]], gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* [[Krzyż Wojskowy Karola]]
* [[Odznaka Honorowa "Orlęta"]]
* Gwiazda Przemyśla
* [[Medal Dziesięciolecia Odzyskanej Niepodległości]]
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Związani z Pnikutem]]
[[Kategoria:Urodzeni na Kresach II Rzeczypospolitej]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
[[Kategoria:Urodzeni w 1888]]
[[Kategoria:Zmarli w 1940]]
1d458f90a27abc1dc11515185e2e9a5d2e4891bc
64
62
2014-01-15T21:46:54Z
Ffkapa
2
wikitext
text/x-wiki
[[Plik:Pnikut, Jan Miśniak.jpg|thumb|upright|Portret Jana Miśniaka]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we [[Wieś|wsi]] [[Pnikut]], zamordowany [[5 października]][[1940]] w [[Mauthausen-Gusen]]).
== Biografia ==
Ukończył [[Seminaria nauczycielskie|seminarium nauczycielskie]] (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie [[I wojna światowa|I Wojny Światowej]] walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go [[Krzyż Wojskowy Karola|Krzyżem Wojskowym Karola]] i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień [[podporucznik]]a. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z [[Bolszewicy|Bolszewikami]] trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu [[porucznik]]a.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w [[Zawiercie|Zawierciu]]<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje [[Medal Dziesięciolecia Odzyskanej Niepodległości|Medalem Dziesięciolecia Odzyskanej Niepodległości]].
[[Plik:Pnikut, nagrobek Jana Miđniaka.jpg|thumb|upright|Symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu [[II wojna światowa|II Wojny Światowej]], odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do [[Dachau (KL)|KL Dachau]], a następnie do [[Mauthausen-Gusen|KL Mauthausen-Gusen]], gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* [[Krzyż Wojskowy Karola]]
* [[Odznaka Honorowa "Orlęta"]]
* Gwiazda Przemyśla
* [[Medal Dziesięciolecia Odzyskanej Niepodległości]]
{{Przypisy}}
{{Cytuj Wiki}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Polacy - żołnierze Cesarskiej i Królewskiej Armii]]
[[Kategoria:Polacy odznaczeni Krzyżem Wojskowym Karola]]
[[Kategoria:Uczestnicy wojny polsko-bolszewickiej]]
[[Kategoria:Porucznicy II Rzeczypospolitej]]
[[Kategoria:Odznaczeni Odznaką Honorową "Orlęta"]]
[[Kategoria:Odznaczeni Medalem Dziesięciolecia Odzyskanej Niepodległości]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
[[Kategoria:Urodzeni w 1888]]
[[Kategoria:Zmarli w 1940]]
02b06fbf8f8aa45b9e00eeacf5f2167562ce4aae
62
28
2014-01-15T21:42:58Z
Ffkapa
2
wikitext
text/x-wiki
{{Cytuj Wiki}}
[[Plik:Pnikut, Jan Miśniak.jpg|thumb|upright|Portret Jana Miśniaka]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we [[Wieś|wsi]] [[Pnikut]], zamordowany [[5 października]][[1940]] w [[Mauthausen-Gusen]]).
== Biografia ==
Ukończył [[Seminaria nauczycielskie|seminarium nauczycielskie]] (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie [[I wojna światowa|I Wojny Światowej]] walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go [[Krzyż Wojskowy Karola|Krzyżem Wojskowym Karola]] i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień [[podporucznik]]a. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z [[Bolszewicy|Bolszewikami]] trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu [[porucznik]]a.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w [[Zawiercie|Zawierciu]]<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje [[Medal Dziesięciolecia Odzyskanej Niepodległości|Medalem Dziesięciolecia Odzyskanej Niepodległości]].
[[Plik:Pnikut, nagrobek Jana Miđniaka.jpg|thumb|upright|Symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu [[II wojna światowa|II Wojny Światowej]], odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do [[Dachau (KL)|KL Dachau]], a następnie do [[Mauthausen-Gusen|KL Mauthausen-Gusen]], gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* [[Krzyż Wojskowy Karola]]
* [[Odznaka Honorowa "Orlęta"]]
* Gwiazda Przemyśla
* [[Medal Dziesięciolecia Odzyskanej Niepodległości]]
{{Przypisy}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Polacy - żołnierze Cesarskiej i Królewskiej Armii]]
[[Kategoria:Polacy odznaczeni Krzyżem Wojskowym Karola]]
[[Kategoria:Uczestnicy wojny polsko-bolszewickiej]]
[[Kategoria:Porucznicy II Rzeczypospolitej]]
[[Kategoria:Odznaczeni Odznaką Honorową "Orlęta"]]
[[Kategoria:Odznaczeni Medalem Dziesięciolecia Odzyskanej Niepodległości]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
[[Kategoria:Urodzeni w 1888]]
[[Kategoria:Zmarli w 1940]]
1b15830584bf45d06fb256e4aa4422b8d8fe360c
28
2014-01-15T15:23:39Z
Ffkapa
2
Nowa strona
wikitext
text/x-wiki
[[Plik:Pnikut, Jan Miśniak.jpg|thumb|upright|Portret Jana Miśniaka]]
'''Jan Miśniak''' (ur. [[13 maja]] [[1888]] we [[Wieś|wsi]] [[Pnikut]], zamordowany [[5 października]][[1940]] w [[Mauthausen-Gusen]]).
== Biografia ==
Ukończył [[Seminaria nauczycielskie|seminarium nauczycielskie]] (prawdopodobnie w [[Przemyśl]]u). 15 lipca 1910 r. wcielony do C.K. armii, na froncie [[I wojna światowa|I Wojny Światowej]] walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go [[Krzyż Wojskowy Karola|Krzyżem Wojskowym Karola]] i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień [[podporucznik]]a. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o [[Przemyśl]]. W 1920 roku ranny w walkach z [[Bolszewicy|Bolszewikami]] trafia do szpitala w [[Przemyśl]]u. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu [[porucznik]]a.
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w [[Zawiercie|Zawierciu]]<ref>[http://g1zawiercie.pl/historia/postaci.html Strona Gimnazjum nr. 1 w Zawierciu].</ref>. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku<ref>Słownik nauczycieli tajnego nauczania – uczestników ruchu oporu 1939-1945 (województwo świętokrzyskie). Tablice i pomniki, Wydawnictwo Pedagogiczne ZNP, 2012, s. 319.</ref>. W 1928 uhonorowany zostaje [[Medal Dziesięciolecia Odzyskanej Niepodległości|Medalem Dziesięciolecia Odzyskanej Niepodległości]].
[[Plik:Pnikut, nagrobek Jana Miđniaka.jpg|thumb|upright|Symboliczny grób Jana i Walentego Miśniaków]]
Po wybuchu [[II wojna światowa|II Wojny Światowej]], odmawiając współpracy zostaje aresztowany (kwiecień 1940 rok) i trafia najpierw do [[Dachau (KL)|KL Dachau]], a następnie do [[Mauthausen-Gusen|KL Mauthausen-Gusen]], gdzie ginie zakatowany przez jednego ze strażników obozowych 5 – go października 1940 roku. Symboliczny nagrobek Jana Miśniaka znajduje się na cmentarzu w Pnikucie<ref name=":0">[http://dolinasanu.org.pl/wiadomosci/258-uroczystosci-w-pnikucie-na-ukrainie.html Wspólnota Samorządowa Dolina Sanu].</ref>.
== Odznaczenia ==
* [[Krzyż Wojskowy Karola]]
* [[Odznaka Honorowa "Orlęta"]]
* Gwiazda Przemyśla
* [[Medal Dziesięciolecia Odzyskanej Niepodległości]]
{{Przypisy}}
{{DEFAULTSORT:Miśniak, Jan}}
[[Kategoria:Polacy - żołnierze Cesarskiej i Królewskiej Armii]]
[[Kategoria:Polacy odznaczeni Krzyżem Wojskowym Karola]]
[[Kategoria:Uczestnicy wojny polsko-bolszewickiej]]
[[Kategoria:Porucznicy II Rzeczypospolitej]]
[[Kategoria:Odznaczeni Odznaką Honorową "Orlęta"]]
[[Kategoria:Odznaczeni Medalem Dziesięciolecia Odzyskanej Niepodległości]]
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
[[Kategoria:Więźniowie KL Dachau]]
[[Kategoria:Więźniowie KL Mauthausen-Gusen]]
[[Kategoria:Ludzie związani z Zawierciem]]
[[Kategoria:Urodzeni w 1888]]
[[Kategoria:Zmarli w 1940]]
0976133a4c1534cabcf95d03d9a83e1d117faf50
Jan Muszak
0
611
1105
2019-11-16T23:05:42Z
Ffkapa
2
Utworzono nową stronę "'''Jan Muszak''' - [[Mapa dawnego Pnikuta|dom nr. 9]] == Dzieje rodziny == Jan Muszak (1931, przyd. „Siko”), żona Janina z domu Nizińska == Dzieci == córka Zofia ..."
wikitext
text/x-wiki
'''Jan Muszak''' - [[Mapa dawnego Pnikuta|dom nr. 9]]
== Dzieje rodziny ==
Jan Muszak (1931, przyd. „Siko”), żona Janina z domu Nizińska
== Dzieci ==
córka Zofia
== Dzieje rodziny ==
* Wyjechali do Polski, Piekary, Nakło.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Muszakowie]]
[[Kategoria:Urodzeni w 1931]]
21664ca06d37f69668f3a5805c818993bd04c0f7
Jerzy Ablewicz
0
176
1070
664
2018-04-03T09:12:15Z
Kazik
1
drobne merytoryczne
wikitext
text/x-wiki
{{Spis treści}}
'''Jerzy Karol Ablewicz''' (ur. 1 listopada 1919 w Krośnie, zm. 31 marca 1990 w Tarnowie) – polski biskup rzymskokatolicki, arcybiskup ad personam, biskup diecezjalny tarnowski w latach 1962–1990.
== Życiorys ==
Urodził się 1 listopada 1919 w Krośnie jako syn Aleksandra Ablewicza, urzędnika, i Emilii z domu Ekiert. Do szkoły podstawowej i gimnazjum uczęszczał w rodzinnym mieście. 5 marca 1943 przyjął w Przemyślu święcenia kapłańskie. Następnie pracował jako duszpasterz w parafiach, m.in. był wikariuszem we wsi [[Trzcieniec]], a w latach 1945–1946 administratorem parafii w [[Pnikut|Pnikucie]]{{r|Historia Parafii}}. Studiował w Lublinie. Związał się z Seminarium Duchownym w Przemyślu, gdzie był profesorem i wicerektorem.
26 lutego 1962 został mianowany przez papieża Jana XXIII biskupem diecezjalnym diecezji tarnowskiej. Sakrę biskupią przyjął 20 maja 1962, a 26 maja objął stanowisko w diecezji. W 1974 był delegatem Episkopatu Polski na IV sesję zwyczajną Światowego Synodu Biskupów. W latach 1981–1986 przeprowadził synod diecezjalny. Utworzył 132 nowe parafie, sporo rektoratów. Mimo przeszkód czynionych ze strony władz państwowych podjęto budowę kilkuset kościołów, domów katechetycznych, plebanii. Wydał 50 listów pasterskich, około 50 przemówień, 33 kazania, kilka homilii, kilkanaście orędzi i odezw, kilka artykułów naukowych. 10 czerwca 1987 w czasie pobytu Jana Pawła II w Tarnowie został promowany na arcybiskupa ad personam (bez podnoszenia diecezji do rangi metropolii). Przyczynił się do beatyfikacji Karoliny Kózkówny w 1987.
Zmarł 31 marca 1990 w Tarnowie. Został pochowany w podziemiach bazyliki katedralnej w Tarnowie.
== Publikacje ==
* Jerzy Ablewicz, ''Będziecie moimi świadkami'', Éditions du Dialogue, Paris 1983, ss. 316, ISBN 2-85316-042-4.
== Przypisy ==
{{Przypisy-lista|l. kolumn=2|
* <ref name="Historia Parafii">{{cytuj stronę|url=https://pnikut.org/?page_id=26|tytuł=Historia Parafii|opublikowany=|data dostępu=2018-04-03}}</ref>
}}
== Linki zewnętrzne ==
* [http://www.diecezja.tarnow.pl/index.php/start/o-diecezji/biskupi-tarnowscy/2908.html Nota biograficzna Jerzego Ablewicza na stronie diecezji tarnowskiej] [dostęp 2013-07-13]
{{Cytuj_Wiki}}
{{DEFAULTSORT:Ablewicz, Jerzy}}
[[Kategoria:Urodzeni w 1919]]
[[Kategoria:Zmarli w 1990]]
[[Kategoria:Ludzie związani z Pnikutem]]
0e084eb8130c6a874d86e595b39b728b731cb7de
664
645
2014-03-13T23:09:14Z
Ffkapa
2
red
wikitext
text/x-wiki
{{Spis treści}}
'''Jerzy Karol Ablewicz''' (ur. 1 listopada 1919 w Krośnie, zm. 31 marca 1990 w Tarnowie) – polski biskup rzymskokatolicki, arcybiskup ad personam, biskup diecezjalny tarnowski w latach 1962–1990.
== Życiorys ==
Urodził się 1 listopada 1919 w Krośnie jako syn Aleksandra Ablewicza, urzędnika, i Emilii z domu Ekiert. Do szkoły podstawowej i gimnazjum uczęszczał w rodzinnym mieście. 5 marca 1943 przyjął w Przemyślu święcenia kapłańskie. Następnie pracował jako duszpasterz w parafiach, m.in. był wikariuszem we wsi [[Trzcieniec]], a w latach 1945–1946 administratorem parafii w [[Pnikut|Pnikucie]]{{r|Historia Parafii}}. Studiował w Lublinie. Związał się z Seminarium Duchownym w Przemyślu, gdzie był profesorem i wicerektorem.
26 lutego 1962 został mianowany przez papieża Jana XXIII biskupem diecezjalnym diecezji tarnowskiej. Sakrę biskupią przyjął 20 maja 1962, a 26 maja objął stanowisko w diecezji. W 1974 był delegatem Episkopatu Polski na IV sesję zwyczajną Światowego Synodu Biskupów. W latach 1981–1986 przeprowadził synod diecezjalny. Utworzył 132 nowe parafie, sporo rektoratów. Mimo przeszkód czynionych ze strony władz państwowych podjęto budowę kilkuset kościołów, domów katechetycznych, plebanii. Wydał 50 listów pasterskich, około 50 przemówień, 33 kazania, kilka homilii, kilkanaście orędzi i odezw, kilka artykułów naukowych. 10 czerwca 1987 w czasie pobytu Jana Pawła II w Tarnowie został promowany na arcybiskupa ad personam (bez podnoszenia diecezji do rangi metropolii). Przyczynił się do beatyfikacji Karoliny Kózkówny w 1987.
Zmarł 31 marca 1990 w Tarnowie. Został pochowany w podziemiach bazyliki katedralnej w Tarnowie.
== Publikacje ==
* Jerzy Ablewicz, ''Będziecie moimi świadkami'', Éditions du Dialogue, Paris 1983, ss. 316, ISBN 2-85316-042-4.
== Przypisy ==
{{Przypisy-lista|l. kolumn=2|
* <ref name="Historia Parafii">{{cytuj stronę|url=http://www.pnikut.com/index.php?option=com_content&view=article&id=4&Itemid=4|tytuł=Historia Parafii|opublikowany=pnikut.com|data dostępu=2013-09-28}}</ref>
}}
== Linki zewnętrzne ==
* [http://www.diecezja.tarnow.pl/index.php/start/o-diecezji/biskupi-tarnowscy/2908.html Nota biograficzna Jerzego Ablewicza na stronie diecezji tarnowskiej] [dostęp 2013-07-13]
{{Cytuj_Wiki}}
{{DEFAULTSORT:Ablewicz, Jerzy}}
[[Kategoria:Urodzeni w 1919]]
[[Kategoria:Zmarli w 1990]]
[[Kategoria:Ludzie związani z Pnikutem]]
456885b095998219c5c50b0a28d8b09092e21564
645
527
2014-03-13T22:11:26Z
Ffkapa
2
added [[Category:Ludzie związani z Pnikutem]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
{{Spis treści}}
'''Jerzy Karol Ablewicz''' (ur. [[1 listopada]] [[1919]] w [[Krosno|Krośnie]], zm. [[31 marca]] [[1990]] w [[Tarnów|Tarnowie]]) – polski biskup rzymskokatolicki, arcybiskup ad personam, biskup diecezjalny tarnowski w latach 1962–1990.
== Życiorys ==
Urodził się 1 listopada 1919 w Krośnie jako syn Aleksandra Ablewicza, urzędnika, i Emilii z domu Ekiert. Do szkoły podstawowej i gimnazjum uczęszczał w rodzinnym mieście. 5 marca 1943 przyjął w Przemyślu święcenia kapłańskie. Następnie pracował jako duszpasterz w parafiach, m.in. był wikariuszem we wsi [[Trzcieniec]], a w latach 1945–1946 administratorem parafii w [[Pnikut|Pnikucie]]{{r|Historia Parafii}}. Studiował w Lublinie. Związał się z Seminarium Duchownym w Przemyślu, gdzie był profesorem i wicerektorem.
26 lutego 1962 został mianowany przez papieża Jana XXIII biskupem diecezjalnym diecezji tarnowskiej. Sakrę biskupią przyjął 20 maja 1962, a 26 maja objął stanowisko w diecezji. W 1974 był delegatem Episkopatu Polski na IV sesję zwyczajną Światowego Synodu Biskupów. W latach 1981–1986 przeprowadził synod diecezjalny. Utworzył 132 nowe parafie, sporo rektoratów. Mimo przeszkód czynionych ze strony władz państwowych podjęto budowę kilkuset kościołów, domów katechetycznych, plebanii. Wydał 50 listów pasterskich, około 50 przemówień, 33 kazania, kilka homilii, kilkanaście orędzi i odezw, kilka artykułów naukowych. 10 czerwca 1987 w czasie pobytu Jana Pawła II w Tarnowie został promowany na arcybiskupa ad personam (bez podnoszenia diecezji do rangi metropolii). Przyczynił się do beatyfikacji Karoliny Kózkówny w 1987.
Zmarł 31 marca 1990 w Tarnowie. Został pochowany w podziemiach bazyliki katedralnej w Tarnowie.
== Publikacje ==
* Jerzy Ablewicz, ''Będziecie moimi świadkami'', Éditions du Dialogue, Paris 1983, ss. 316, ISBN 2-85316-042-4.
== Przypisy ==
{{Przypisy-lista|l. kolumn=2|
* <ref name="Historia Parafii">{{cytuj stronę|url=http://www.pnikut.com/index.php?option=com_content&view=article&id=4&Itemid=4|tytuł=Historia Parafii|opublikowany=pnikut.com|data dostępu=2013-09-28}}</ref>
}}
== Linki zewnętrzne ==
* [http://www.diecezja.tarnow.pl/index.php/start/o-diecezji/biskupi-tarnowscy/2908.html Nota biograficzna Jerzego Ablewicza na stronie diecezji tarnowskiej] [dostęp 2013-07-13]
{{Cytuj_Wiki}}
{{DEFAULTSORT:Ablewicz, Jerzy}}
[[Kategoria:Urodzeni w 1919]]
[[Kategoria:Zmarli w 1990]]
[[Kategoria:Ludzie związani z Pnikutem]]
8a5e98f2a5b41cbc47f3feb8ae8bef0e6245318a
527
518
2014-03-01T22:49:52Z
Użytkownik usunięty
9
dewikizacja
wikitext
text/x-wiki
{{Spis treści}}
'''Jerzy Karol Ablewicz''' (ur. [[1 listopada]] [[1919]] w [[Krosno|Krośnie]], zm. [[31 marca]] [[1990]] w [[Tarnów|Tarnowie]]) – polski biskup rzymskokatolicki, arcybiskup ad personam, biskup diecezjalny tarnowski w latach 1962–1990.
== Życiorys ==
Urodził się 1 listopada 1919 w Krośnie jako syn Aleksandra Ablewicza, urzędnika, i Emilii z domu Ekiert. Do szkoły podstawowej i gimnazjum uczęszczał w rodzinnym mieście. 5 marca 1943 przyjął w Przemyślu święcenia kapłańskie. Następnie pracował jako duszpasterz w parafiach, m.in. był wikariuszem we wsi [[Trzcieniec]], a w latach 1945–1946 administratorem parafii w [[Pnikut|Pnikucie]]{{r|Historia Parafii}}. Studiował w Lublinie. Związał się z Seminarium Duchownym w Przemyślu, gdzie był profesorem i wicerektorem.
26 lutego 1962 został mianowany przez papieża Jana XXIII biskupem diecezjalnym diecezji tarnowskiej. Sakrę biskupią przyjął 20 maja 1962, a 26 maja objął stanowisko w diecezji. W 1974 był delegatem Episkopatu Polski na IV sesję zwyczajną Światowego Synodu Biskupów. W latach 1981–1986 przeprowadził synod diecezjalny. Utworzył 132 nowe parafie, sporo rektoratów. Mimo przeszkód czynionych ze strony władz państwowych podjęto budowę kilkuset kościołów, domów katechetycznych, plebanii. Wydał 50 listów pasterskich, około 50 przemówień, 33 kazania, kilka homilii, kilkanaście orędzi i odezw, kilka artykułów naukowych. 10 czerwca 1987 w czasie pobytu Jana Pawła II w Tarnowie został promowany na arcybiskupa ad personam (bez podnoszenia diecezji do rangi metropolii). Przyczynił się do beatyfikacji Karoliny Kózkówny w 1987.
Zmarł 31 marca 1990 w Tarnowie. Został pochowany w podziemiach bazyliki katedralnej w Tarnowie.
== Publikacje ==
* Jerzy Ablewicz, ''Będziecie moimi świadkami'', Éditions du Dialogue, Paris 1983, ss. 316, ISBN 2-85316-042-4.
== Przypisy ==
{{Przypisy-lista|l. kolumn=2|
* <ref name="Historia Parafii">{{cytuj stronę|url=http://www.pnikut.com/index.php?option=com_content&view=article&id=4&Itemid=4|tytuł=Historia Parafii|opublikowany=pnikut.com|data dostępu=2013-09-28}}</ref>
}}
== Linki zewnętrzne ==
* [http://www.diecezja.tarnow.pl/index.php/start/o-diecezji/biskupi-tarnowscy/2908.html Nota biograficzna Jerzego Ablewicza na stronie diecezji tarnowskiej] [dostęp 2013-07-13]
{{Cytuj_Wiki}}
{{DEFAULTSORT:Ablewicz, Jerzy}}
[[Kategoria:Urodzeni w 1919]]
[[Kategoria:Zmarli w 1990]]
60cc614e5d4231e090b7c28998f20339865ea959
518
517
2014-02-17T20:27:32Z
Ffkapa
2
removed [[Category:Biskupi tarnowscy]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
{{Spis treści}}
'''Jerzy Karol Ablewicz''' (ur. [[1 listopada]] [[1919]] w [[Krosno|Krośnie]], zm. [[31 marca]] [[1990]] w [[Tarnów|Tarnowie]]) – [[Polska|polski]] [[biskup]] [[Kościół łaciński|rzymskokatolicki]], [[arcybiskup ad personam]], [[biskupi tarnowscy|biskup diecezjalny tarnowski]] w latach 1962–1990.
== Życiorys ==
Urodził się 1 listopada 1919 w Krośnie jako syn Aleksandra Ablewicza, urzędnika, i Emilii z domu Ekiert. Do szkoły podstawowej i gimnazjum uczęszczał w rodzinnym mieście. 5 marca 1943 przyjął w Przemyślu [[sakrament święceń|święcenia kapłańskie]]. Następnie pracował jako duszpasterz w parafiach, m.in. był wikariuszem we wsi [[Trzcieniec]], a w latach 1945–1946 administratorem parafii w [[Pnikut|Pnikucie]]{{r|Historia Parafii}}. Studiował w Lublinie. Związał się z [[Wyższe Seminarium Duchowne w Przemyślu|Seminarium Duchownym w Przemyślu]], gdzie był profesorem i wicerektorem.
26 lutego 1962 został mianowany przez papieża [[Jan XXIII|Jana XXIII]] [[biskup diecezjalny|biskupem diecezjalnym]] [[diecezja tarnowska|diecezji tarnowskiej]]. [[sakra|Sakrę biskupią]] przyjął 20 maja 1962, a 26 maja objął stanowisko w diecezji. W 1974 był delegatem [[Konferencja Episkopatu Polski|Episkopatu Polski]] na IV sesję zwyczajną Światowego [[Synod Biskupów|Synodu Biskupów]]. W latach 1981–1986 przeprowadził [[synod|synod diecezjalny]]. Utworzył 132 nowe [[parafia|parafie]], sporo rektoratów. Mimo przeszkód czynionych ze strony władz państwowych podjęto budowę kilkuset kościołów, domów katechetycznych, plebanii. Wydał 50 listów pasterskich, około 50 przemówień, 33 kazania, kilka homilii, kilkanaście orędzi i odezw, kilka artykułów naukowych. 10 czerwca 1987 w czasie pobytu [[Jan Paweł II|Jana Pawła II]] w Tarnowie został promowany na [[arcybiskup ad personam|arcybiskupa ad personam]] (bez podnoszenia diecezji do rangi metropolii). Przyczynił się do [[beatyfikacja|beatyfikacji]] [[Karolina Kózka|Karoliny Kózkówny]] w 1987.
Zmarł 31 marca 1990 w Tarnowie. Został pochowany w podziemiach [[bazylika katedralna Narodzenia Najświętszej Maryi Panny w Tarnowie|bazyliki katedralnej w Tarnowie]].
== Publikacje ==
* Jerzy Ablewicz, ''Będziecie moimi świadkami'', [[Éditions du Dialogue]], [[Paryż|Paris]] 1983, ss. 316, ISBN 2-85316-042-4.
== Przypisy ==
{{Przypisy-lista|l. kolumn=2|
* <ref name="Historia Parafii">{{cytuj stronę|url=http://www.pnikut.com/index.php?option=com_content&view=article&id=4&Itemid=4|tytuł=Historia Parafii|opublikowany=pnikut.com|data dostępu=2013-09-28}}</ref>
}}
== Linki zewnętrzne ==
* [http://www.diecezja.tarnow.pl/index.php/start/o-diecezji/biskupi-tarnowscy/2908.html Nota biograficzna Jerzego Ablewicza na stronie diecezji tarnowskiej] [dostęp 2013-07-13]
{{Cytuj_Wiki}}
{{DEFAULTSORT:Ablewicz, Jerzy}}
[[Kategoria:Urodzeni w 1919]]
[[Kategoria:Zmarli w 1990]]
12210e4b1fdd4e233d71d207b402ff2ec9c81bc7
517
512
2014-02-17T20:26:14Z
Ffkapa
2
info
wikitext
text/x-wiki
{{Spis treści}}
'''Jerzy Karol Ablewicz''' (ur. [[1 listopada]] [[1919]] w [[Krosno|Krośnie]], zm. [[31 marca]] [[1990]] w [[Tarnów|Tarnowie]]) – [[Polska|polski]] [[biskup]] [[Kościół łaciński|rzymskokatolicki]], [[arcybiskup ad personam]], [[biskupi tarnowscy|biskup diecezjalny tarnowski]] w latach 1962–1990.
== Życiorys ==
Urodził się 1 listopada 1919 w Krośnie jako syn Aleksandra Ablewicza, urzędnika, i Emilii z domu Ekiert. Do szkoły podstawowej i gimnazjum uczęszczał w rodzinnym mieście. 5 marca 1943 przyjął w Przemyślu [[sakrament święceń|święcenia kapłańskie]]. Następnie pracował jako duszpasterz w parafiach, m.in. był wikariuszem we wsi [[Trzcieniec]], a w latach 1945–1946 administratorem parafii w [[Pnikut|Pnikucie]]{{r|Historia Parafii}}. Studiował w Lublinie. Związał się z [[Wyższe Seminarium Duchowne w Przemyślu|Seminarium Duchownym w Przemyślu]], gdzie był profesorem i wicerektorem.
26 lutego 1962 został mianowany przez papieża [[Jan XXIII|Jana XXIII]] [[biskup diecezjalny|biskupem diecezjalnym]] [[diecezja tarnowska|diecezji tarnowskiej]]. [[sakra|Sakrę biskupią]] przyjął 20 maja 1962, a 26 maja objął stanowisko w diecezji. W 1974 był delegatem [[Konferencja Episkopatu Polski|Episkopatu Polski]] na IV sesję zwyczajną Światowego [[Synod Biskupów|Synodu Biskupów]]. W latach 1981–1986 przeprowadził [[synod|synod diecezjalny]]. Utworzył 132 nowe [[parafia|parafie]], sporo rektoratów. Mimo przeszkód czynionych ze strony władz państwowych podjęto budowę kilkuset kościołów, domów katechetycznych, plebanii. Wydał 50 listów pasterskich, około 50 przemówień, 33 kazania, kilka homilii, kilkanaście orędzi i odezw, kilka artykułów naukowych. 10 czerwca 1987 w czasie pobytu [[Jan Paweł II|Jana Pawła II]] w Tarnowie został promowany na [[arcybiskup ad personam|arcybiskupa ad personam]] (bez podnoszenia diecezji do rangi metropolii). Przyczynił się do [[beatyfikacja|beatyfikacji]] [[Karolina Kózka|Karoliny Kózkówny]] w 1987.
Zmarł 31 marca 1990 w Tarnowie. Został pochowany w podziemiach [[bazylika katedralna Narodzenia Najświętszej Maryi Panny w Tarnowie|bazyliki katedralnej w Tarnowie]].
== Publikacje ==
* Jerzy Ablewicz, ''Będziecie moimi świadkami'', [[Éditions du Dialogue]], [[Paryż|Paris]] 1983, ss. 316, ISBN 2-85316-042-4.
== Przypisy ==
{{Przypisy-lista|l. kolumn=2|
* <ref name="Historia Parafii">{{cytuj stronę|url=http://www.pnikut.com/index.php?option=com_content&view=article&id=4&Itemid=4|tytuł=Historia Parafii|opublikowany=pnikut.com|data dostępu=2013-09-28}}</ref>
}}
== Linki zewnętrzne ==
* [http://www.diecezja.tarnow.pl/index.php/start/o-diecezji/biskupi-tarnowscy/2908.html Nota biograficzna Jerzego Ablewicza na stronie diecezji tarnowskiej] [dostęp 2013-07-13]
{{Cytuj_Wiki}}
{{DEFAULTSORT:Ablewicz, Jerzy}}
[[Kategoria:Biskupi tarnowscy]]
[[Kategoria:Urodzeni w 1919]]
[[Kategoria:Zmarli w 1990]]
09e9c75787d362a86277ff126f6e49034002c48c
512
508
2014-02-16T08:49:54Z
Ffkapa
2
wikitext
text/x-wiki
{{Spis treści}}
'''Jerzy Karol Ablewicz''' (ur. [[1 listopada]] [[1919]] w [[Krosno|Krośnie]], zm. [[31 marca]] [[1990]] w [[Tarnów|Tarnowie]]) – [[Polska|polski]] [[biskup]] [[Kościół łaciński|rzymskokatolicki]], [[arcybiskup ad personam]], [[biskupi tarnowscy|biskup diecezjalny tarnowski]] w latach 1962–1990.
== Życiorys ==
Urodził się 1 listopada 1919 w Krośnie jako syn Aleksandra Ablewicza, urzędnika, i Emilii z domu Ekiert. Do szkoły podstawowej i gimnazjum uczęszczał w rodzinnym mieście. 5 marca 1943 przyjął w Przemyślu [[sakrament święceń|święcenia kapłańskie]]. Następnie pracował jako duszpasterz w parafiach, m.in. był wikariuszem we wsi [[Trzcieniec]], a w latach 1945–1946 administratorem parafii w [[Pnikut|Pnikucie]]{{r|Historia Parafii}}. Studiował w Lublinie. Związał się z [[Wyższe Seminarium Duchowne w Przemyślu|Seminarium Duchownym w Przemyślu]], gdzie był profesorem i wicerektorem.
26 lutego 1962 został mianowany przez papieża [[Jan XXIII|Jana XXIII]] [[biskup diecezjalny|biskupem diecezjalnym]] [[diecezja tarnowska|diecezji tarnowskiej]]. [[sakra|Sakrę biskupią]] przyjął 20 maja 1962, a 26 maja objął stanowisko w diecezji. W 1974 był delegatem [[Konferencja Episkopatu Polski|Episkopatu Polski]] na IV sesję zwyczajną Światowego [[Synod Biskupów|Synodu Biskupów]]. W latach 1981–1986 przeprowadził [[synod|synod diecezjalny]]. Utworzył 132 nowe [[parafia|parafie]], sporo rektoratów. Mimo przeszkód czynionych ze strony władz państwowych podjęto budowę kilkuset kościołów, domów katechetycznych, plebanii. Wydał 50 listów pasterskich, około 50 przemówień, 33 kazania, kilka homilii, kilkanaście orędzi i odezw, kilka artykułów naukowych. 10 czerwca 1987 w czasie pobytu [[Jan Paweł II|Jana Pawła II]] w Tarnowie został promowany na [[arcybiskup ad personam|arcybiskupa ad personam]] (bez podnoszenia diecezji do rangi metropolii). Przyczynił się do [[beatyfikacja|beatyfikacji]] [[Karolina Kózka|Karoliny Kózkówny]] w 1987.
Zmarł 31 marca 1990 w Tarnowie. Został pochowany w podziemiach [[bazylika katedralna Narodzenia Najświętszej Maryi Panny w Tarnowie|bazyliki katedralnej w Tarnowie]].
== Publikacje ==
* Jerzy Ablewicz, ''Będziecie moimi świadkami'', [[Éditions du Dialogue]], [[Paryż|Paris]] 1983, ss. 316, ISBN 2-85316-042-4.
== Przypisy ==
{{Przypisy-lista|l. kolumn=2|
* <ref name="Historia Parafii">{{cytuj stronę|url=http://www.pnikut.com/index.php?option=com_content&view=article&id=4&Itemid=4|tytuł=Historia Parafii|opublikowany=pnikut.com|data dostępu=2013-09-28}}</ref>
}}
== Linki zewnętrzne ==
* [http://www.diecezja.tarnow.pl/index.php/start/o-diecezji/biskupi-tarnowscy/2908.html Nota biograficzna Jerzego Ablewicza na stronie diecezji tarnowskiej] [dostęp 2013-07-13]
{{DEFAULTSORT:Ablewicz, Jerzy}}
[[Kategoria:Biskupi tarnowscy]]
[[Kategoria:Urodzeni w 1919]]
[[Kategoria:Zmarli w 1990]]
e3d910e59115cc661d8e49f18cfe7e775997aedb
508
2014-02-16T08:41:56Z
Ffkapa
2
nowa
wikitext
text/x-wiki
a
86f7e437faa5a7fce15d1ddcb9eaeaea377667b8
Józef Telatyński
0
609
1103
2019-11-16T22:55:09Z
Ffkapa
2
Utworzono nową stronę "'''Józef Telatyński''' - [[Mapa dawnego Pnikuta|dom nr. 7]] == Rodzina == Józef Telatyński, żona Katarzyna == Dzieci == córka Zofia == Dzieje rodziny == * pozostal..."
wikitext
text/x-wiki
'''Józef Telatyński''' - [[Mapa dawnego Pnikuta|dom nr. 7]]
== Rodzina ==
Józef Telatyński, żona Katarzyna
== Dzieci ==
córka Zofia
== Dzieje rodziny ==
* pozostali w Pnikucie
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Telatyńscy]]
eea36c48e75ce69c442a65583cc3ad24e35795a2
Kazimierz Wiącek
0
603
1094
2019-11-16T21:23:45Z
Ffkapa
2
Utworzono nową stronę "'''Kazimierz Wiącek''' - [[Mapa dawnego Pnikuta|dom nr. 4]] == Rodzina == Wiącek Kazimierz, żona Helena (przyd. „Barteczki”) == Dzieci == Ryszard, Teresa == D..."
wikitext
text/x-wiki
'''Kazimierz Wiącek''' - [[Mapa dawnego Pnikuta|dom nr. 4]]
== Rodzina ==
Wiącek Kazimierz, żona Helena (przyd. „Barteczki”)
== Dzieci ==
Ryszard, Teresa
== Dzieje rodziny ==
* Ryszard, Teresa – wyjechali do Polski, Białogórze (Lubań – Zgorzelec).
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Wiąckowie]]
244fa773822e7c20615b055366ff1d206408fdb7
Licencje Creative Commons
0
24
669
589
2014-03-21T22:04:05Z
Ffkapa
2
Ffkapa przeniósł stronę [[WikiPnikuczanie:Licencje Creative Commons]] do [[Licencje Creative Commons]]: cofnij
wikitext
text/x-wiki
[[Plik:CC some rights reserved.svg|thumb|300px|Grafika często używana w opisie plików udostępnionych na licencjach CC]]
'''Licencje Creative Commons (CC) ''' – zestaw [[licencja (prawo)|licencji]], na mocy których można udostępniać [[utwór|utwory]] objęte [[prawo autorskie|prawami autorskimi]]. Licencje te są tworzone i utrzymywane przez organizację [[Creative Commons]].
Licencje Creative Commons pozwalają twórcom utworów zachować własne prawa i jednocześnie dzielić się swoją twórczością z innymi. Zasada „wszelkie prawa zastrzeżone” zostaje zastąpiona zasadą “pewne prawa zastrzeżone”.
Szacuje się, że na licencjach CC udostępnia się obecnie co najmniej 100 milionów utworów. Licencje CC są w chwili obecnej najpopularniejszymi wolnymi licencjami stosowanymi do licencjonowania treści innych niż [[oprogramowanie]].
== Zastosowanie ==
Licencje CC można stosować dla dowolnego utworu, który podlega ochronie [[prawo autorskie|prawa autorskiego]] – na przykład tekstu, obrazu, dźwięku czy utworu audiowizualnego.
Licencje CC nie są przeznaczone do licencjonowania oprogramowania, CC do tego celu poleca licencje oferowane przez [[Free Software Foundation]] lub [[Open Source Initiative]].
Licencje CC są dostępne w wersji ogólnej („Unported”) – dostosowanej do prawodawstwa międzynarodowego oraz w ponad 40 wersjach dostosowanych do [[jurysdykcja|jurysdykcji]] lokalnych. W szczególności istnieją wersje polskie licencji, zgodne z [[polskie prawo|polskim systemem prawnym]].
Teksty licencji są dostępne za darmo na stronie projektu Creative Commons.
== Rodzaje licencji ==
Istnieją cztery warunki udostępniania utworów, z czego pierwszy pojawia się we wszystkich licencjach:
; [[Plik:Cc-by new white.svg|32px|Creative Commons Attribution new icon]] Uznanie Autorstwa ([[język angielski|ang.]] Attribution (BY)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie dzieła i wszelkich jego pochodnych pod warunkiem umieszczenia informacji o twórcy.
; [[Plik:Cc-nc white.svg|32px|Creative Commons Noncommercial icon]] Użycie Niekomercyjne ([[język angielski|ang.]] Noncommercial (NC)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie dzieła i wszelkich jego pochodnych tylko w celach niekomercyjnych.
; [[Plik:Cc-nd white.svg|32px|Creative Commons No Derivative Works icon]] Bez Utworów Zależnych ([[język angielski|ang.]] No Derivative Works (ND)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie tylko dokładnych (dosłownych) kopii dzieła, niedozwolone jest jego zmienianie i tworzenie na jego bazie pochodnych.
; [[Plik:Cc-sa white.svg|32px|Creative Commons Share Alike icon]] Na Tych Samych Warunkach ([[język angielski|ang.]] Share Alike (SA)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie pochodnych dzieł, pod warunkiem że będą one opublikowane na takiej samej licencji.
Sześć podstawowych licencji, stanowiących kombinacje tych warunków, to:
* Uznanie Autorstwa (CC-BY)<ref>[http://creativecommons.org/licenses/by/3.0/deed.pl warunki licencji CC-BY 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne (CC-BY-NC)<ref>[http://creativecommons.org/licenses/by-nc/3.0/deed.pl warunki licencji CC-BY-NC 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne – Na Tych Samych Warunkach (CC-BY-NC-SA)<ref>[http://creativecommons.org/licenses/by-nc-sa/3.0/deed.pl warunki licencji CC-BY-NC-SA 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne – Bez Utworów Zależnych (CC-BY-NC-ND)<ref>[http://creativecommons.org/licenses/by-nc-nd/3.0/deed.pl warunki licencji CC-BY-NC-ND 3.0].</ref>
* Uznanie Autorstwa – Na Tych Samych Warunkach<ref>[http://creativecommons.org/licenses/by-sa/3.0/deed.pl warunki licencji CC-BY-SA 3.0].</ref> (CC-BY-SA) (jest to licencja najbardziej zbliżona do [[GNU Free Documentation License|GNU FDL]])
* Uznanie Autorstwa – Bez Utworów Zależnych (CC-BY-ND)<ref>[http://creativecommons.org/licenses/by-nd/3.0/deed.pl warunki licencji CC-BY-ND 3.0].</ref>
Istnieją też licencje dodatkowe:
* '''Sampling''' – warunek Creative Commons, który zezwala na [[Sampling (muzyka)|samplowanie]] i tworzenie [[remiks]]ów utworów [[muzyka|muzycznych]], a nie pozwala na wykorzystanie [[Sampling (muzyka)|sampli]] do celów [[reklama|reklamowych]]<ref>[http://creativecommons.org/licenses/sampling/1.0/deed.pl warunki licencji Sampling 1.0].</ref>. Wersja tej licencji ze znaczkiem „+” zezwala na samplowanie do celów komercyjnych i niekomercyjnych<ref>[http://creativecommons.org/licenses/sampling+/1.0/deed.pl warunki licencji Sampling Plus 1.0].</ref>, a licencja „noncomercial +” – tylko do celów niekomercyjnych<ref>[http://creativecommons.org/licenses/nc-sampling+/1.0/deed.pl warunki licencji Użycie niekomercyjne-Sampling Plus 1.0].</ref>. Obie wersje licencji Sampling, tak jak wszystkie inne obecnie stosowane licencje CC, wymagają [[Uznanie autorstwa|uznania autorstwa]].
* '''Państwa rozwijające się''' – przestarzała licencja pozwalająca na kopiowanie i tworzenie utworów zależnych pod warunkiem uznania autorstwa, ale tylko w państwach rozwijających się<ref>[http://creativecommons.org/licenses/devnations/2.0/deed.pl warunki licencji Państwa rozwijające się].</ref>
Oprócz tego istnieje też pseudolicencja CC-PD – która od strony prawnej właściwie nie jest licencją lecz jest raczej rodzajem oświadczenia osoby udostępniającej dane dzieło, że według najlepszej jego/jej wiedzy dzieło to znajduje się w [[domena publiczna|domenie publicznej]] i że osoba udostępniająca bierze za stwierdzenie tego faktu pełną odpowiedzialność<ref>[http://creativecommons.org/licenses/publicdomain/ Opis warunków pseudolicencji CC-PD].</ref>. W podobny sposób można dodać warunki licencji [[GNU General Public License|GPL]], [[GNU Lesser General Public License|LGPL]] i [[Licencja BSD|BSD]].
== CC0 ==
Jest to jednostronne oświadczenie twórcy, który zrzeka się wszystkich praw jakich można się zrzec w danym systemie prawnym. W idealnym przypadku, jest to równoznaczne z przekazaniem dzieła do [[domena publiczna|domeny publicznej]]<ref>{{cytuj stronę|url=http://creativecommons.org/publicdomain/zero/1.0/|tytuł=CC0 1.0 Universal (CC0 1.0) Public Domain Dedication}}</ref>.
W niektórych krajach część praw jest niezbywalna. W Polsce nie istnieje możliwość zrzeczenia się zarówno [[Autorskie prawa osobiste| osobistych]] jak i [[Autorskie prawa majątkowe| majątkowych]] praw autorskich do swojego dzieła. Z tego powodu w ramach oświadczenia CC0 znajduje się tak zwana licencja zapasowa (fallback license), która otwarcie licencjonuje treść w najszerszym zakresie dopuszczalnym przez miejscowe prawodawstwo. Uznaje się, że zakres swobód zapewniany przez CC0 jest szerszy od najbardziej otwartej z podstawowych licencji Creative Commons, "Creative Commons Uznanie autorstwa".
[[Free Software Foundation]] dopuszcza i zaleca stosowanie CC0 dla oprogramowania<ref>{{cytuj stronę | url = http://creativecommons.org/weblog/entry/27081| tytuł =Using CC0 for public domain software | data dostępu = 2011-05-10| autor = Mike Linksvayer| opublikowany = Creative Commons Blog| praca = | data = | język = en}}</ref>.
== Warunki używania ==
Do każdego dzieła wykorzystującego którąkolwiek z licencji Creative Commons (oprócz CC0) musi być dołączony pełny tekst licencji lub [[Uniform Resource Identifier|URI]] tego tekstu oraz informacje takie jak tytuł, nazwisko autora. Pozostałe warunki są zależne od wybranego wariantu licencji.
== Wersje ==
Do tej pory licencje Creative Commons ukazały się w kilku wersjach: 1.0, 2.0, 2.5 i 3.0. Wszystkie one są dostępne w języku polskim.
== Zgodność z innymi licencjami ==
Licencja CC-BY bez żadnych dodatkowych warunków jest zgodna m.in. z licencjami [[licencja BSD|BSD]], [[GNU Free Documentation License|GNU FDL]] oraz [[Licencja Wolnej Sztuki|FAL]] (czyli może być wykorzystana w tak licencjonowanych dziełach), natomiast każda licencja zawierająca warunek No Derivative lub Noncommercial nie jest zgodna z żadną z nich, w sensie, że treści udostępnione licencjami CC-BY można też objąć licencjami BSD, GNU FDL i wszystkimi innymi o ile tylko zapewniają one obowiązek podania źródła i autorów treści pierwotnej. Natomiast w drugą stronę zgodność ta nie działa, to znaczy nie można przenosić treści opartych na licencji GNU FDL, BSD i FAL do licencji CC-BY.
Wariant ''Share Alike'' do wersji licencji Creative Commons 2.5 i GNU FDL 1.2 były z sobą niezgodne, co oznacza, że np. na Wikipedii nie można korzystać z tekstów dostępnych na licencjach CC-BY-SA do wersji 2.5. Dzięki współpracy Creative Commons i [[Free Software Foundation]] udało się uzgodnić taką treść licencji CC-BY-SA 3.0 i GNU FDL 1.3, że stały się one niemal w pełni kompatybilne w obie strony<ref>[http://linuxnews.pl/gfdl-nareszcie-zgodna-z-cc-by-sa/ Kocio, ''GFDL nareszcie (prawie) zgodna z CC BY-SA!'', Linux News].</ref>.
== Wykorzystanie ==
Serwisy funkcjonujące pod skrzydłami [[Wikimedia Foundation]] oprócz GNU FDL wykorzystują też licencje Creative Commons. W ramach projektów Wikimedia dozwolone jest użycie licencji CC, które zostały zaaprobowane do użycia dla twórczości zaliczanej do [[Ruch wolnej kultury|wolnej kultury]] (CC-BY, CC-BY-SA i CC0)<ref>[http://freedomdefined.org/Definition Definicja wolnej kultury].</ref>, natomiast niedopuszczalne są licencje typu NC i ND<ref>[http://commons.wikimedia.org/wiki/Commons:Licensing Commons:Licensing].</ref>. W projekcie [[Wikimedia Commons]] znajduje się ponad 16 milionów plików na licencjach CC. Projekt [[Wikinews]] w całości jest oparty na licencji CC-BY 2.5.<ref>[http://pl.wikinews.org/wiki/Wikinews:Warunki_u%C5%BCycia Wikinews:Warunki użycia].</ref>
W skali całego internetu na licencjach Creative Commons znajduje się co najmniej sto milionów plików. Najpopularniejsze licencje to używana w przypadku 37% utworów licencja BY-NC-SA oraz BY-NC-ND (18% licencjonowanych utworów). W sumie 2/3 licencji zezwala jedynie na użycie niekomercyjne, a 1/3 nie zezwala na tworzenie utworów zależnych{{fakt|data=2010-03}}.
== Zalety ==
W stosunku do GNU FDL zaletą jest niewątpliwie brak obciążeń przy drukowaniu – teksty na licencjach Creative Commons nie muszą podawać pełnego tekstu licencji. Wystarczy w zastępstwie podać link do treści licencji.
== Krytyka licencji Creative Commons ==
Niektórzy członkowie środowiska [[Wolne Oprogramowanie|wolnego oprogramowania]] krytykują [[Creative Commons]] za brak wyraźnie wytyczonych wartości lub warunków, które winny spełniać wszystkie licencje. W szczególności obiektem krytyki są licencje, które zastrzegają prawa, które zdaniem tych krytyków nie mogą podlegać zastrzeżeniu ze względów etycznych bądź moralnych. Krytycy wskazują również na brak zgodności licencji Creative Commons z [[Wolne oprogramowanie#Licencje|licencjami wolnego oprogramowania]].
Według środowiska [[Debian]]a licencje te w wersji 2.0 nie spełniają [[Wytyczne Debiana dotyczące Wolnego Oprogramowania|Wytycznych Debiana dotyczących Wolnego Oprogramowania]] ze względu na pewne wady już w warunku uznania autorstwa<ref>{{cytuj stronę|tytuł=Debian-legal Summary of Creative Commons 2.0 Licenses|data=3 kwietnia 2005|url=http://web.archive.org/web/*/http://people.debian.org/~evan/ccsummary|data dostępu=2008-03-29, 12:13}}</ref>. [[Free Software Foundation]] uważa, że samo określenie Creative Commons jest nieścisłe, ponieważ nie istnieje żadna swoboda, jaką wszystkie te licencje by zapewniały (chociaż uważa CC-BY-SA 2.0 za wolną licencję copyleftową) i zaleca zamiast nich [[Licencja Wolnej Sztuki|Free Art License]]<ref>{{cytuj stronę|opublikowany=Projekt GNU|tytuł=Rozmaite licencje i komentarze na ich temat|url=http://www.gnu.org/licenses/license-list.pl.html#TOCOtherLicenses|data dostępu=2008-03-29, 12:13}}</ref>.
Zgodnie z [[Definicja Wolnych Dóbr Kultury|Definicją Wolnych Dóbr Kultury]] tylko część licencji Creative Commons może być uznana za rzeczywiście wolne. Są to<ref>{{cytuj stronę | url = http://freedomdefined.org/Licenses#List_of_licenses | tytuł = Licenses | opublikowany = freedomdefined.org | język = en | data dostępu = 2013-02-03}}</ref>:
* CC-0
* CC-BY
* CC-BY-SA
Pozostałe licencje Creative Commons są uważane za niezgodne z ideą pełnej [[Otwarta treść|otwartości]] zasobów.
{{Przypisy}}
== Linki zewnętrzne ==
{{commonscat|Creative Commons licenses|materiały na licencjach Creative Commons}}
* [http://creativecommons.org/licenses/ Pełny wybór licencji na stronie Creative Commons]
* [http://creativecommons.org/license/?lang=pl Formularz ułatwiający wybór odpowiedniej licencji]
* [http://prawo.vagla.pl/node/7830 „Dlaczego jestem sceptycznie nastawiony do CC – zamówiona przez czytelników odpowiedź”] (artykuł [[Piotr Waglowski|Piotra Waglowskiego]])
* [http://orka.sejm.gov.pl/WydBAS.nsf/0/E66C1989A16584B3C12578DC00309F0F/$file/Infos_90.pdf Piotr Wasilewski ''Creative Commons - erozja czy rozwój prawa autorskiego"], [[Infos|"Infos"]] Nr 20/2010, Biuro Analiz Sejmowych Kancelarii Sejmu
[[Kategoria:Licencje|Creative, Commons]]
51892415d3589d45352bd3b356b5ac3636d7289f
589
555
2014-03-13T00:42:09Z
Ffkapa
2
Ffkapa przeniósł stronę [[Licencje Creative Commons]] na [[WikiPnikuczanie:Licencje Creative Commons]], bez pozostawienia przekierowania pod starym tytułem
wikitext
text/x-wiki
[[Plik:CC some rights reserved.svg|thumb|300px|Grafika często używana w opisie plików udostępnionych na licencjach CC]]
'''Licencje Creative Commons (CC) ''' – zestaw [[licencja (prawo)|licencji]], na mocy których można udostępniać [[utwór|utwory]] objęte [[prawo autorskie|prawami autorskimi]]. Licencje te są tworzone i utrzymywane przez organizację [[Creative Commons]].
Licencje Creative Commons pozwalają twórcom utworów zachować własne prawa i jednocześnie dzielić się swoją twórczością z innymi. Zasada „wszelkie prawa zastrzeżone” zostaje zastąpiona zasadą “pewne prawa zastrzeżone”.
Szacuje się, że na licencjach CC udostępnia się obecnie co najmniej 100 milionów utworów. Licencje CC są w chwili obecnej najpopularniejszymi wolnymi licencjami stosowanymi do licencjonowania treści innych niż [[oprogramowanie]].
== Zastosowanie ==
Licencje CC można stosować dla dowolnego utworu, który podlega ochronie [[prawo autorskie|prawa autorskiego]] – na przykład tekstu, obrazu, dźwięku czy utworu audiowizualnego.
Licencje CC nie są przeznaczone do licencjonowania oprogramowania, CC do tego celu poleca licencje oferowane przez [[Free Software Foundation]] lub [[Open Source Initiative]].
Licencje CC są dostępne w wersji ogólnej („Unported”) – dostosowanej do prawodawstwa międzynarodowego oraz w ponad 40 wersjach dostosowanych do [[jurysdykcja|jurysdykcji]] lokalnych. W szczególności istnieją wersje polskie licencji, zgodne z [[polskie prawo|polskim systemem prawnym]].
Teksty licencji są dostępne za darmo na stronie projektu Creative Commons.
== Rodzaje licencji ==
Istnieją cztery warunki udostępniania utworów, z czego pierwszy pojawia się we wszystkich licencjach:
; [[Plik:Cc-by new white.svg|32px|Creative Commons Attribution new icon]] Uznanie Autorstwa ([[język angielski|ang.]] Attribution (BY)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie dzieła i wszelkich jego pochodnych pod warunkiem umieszczenia informacji o twórcy.
; [[Plik:Cc-nc white.svg|32px|Creative Commons Noncommercial icon]] Użycie Niekomercyjne ([[język angielski|ang.]] Noncommercial (NC)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie dzieła i wszelkich jego pochodnych tylko w celach niekomercyjnych.
; [[Plik:Cc-nd white.svg|32px|Creative Commons No Derivative Works icon]] Bez Utworów Zależnych ([[język angielski|ang.]] No Derivative Works (ND)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie tylko dokładnych (dosłownych) kopii dzieła, niedozwolone jest jego zmienianie i tworzenie na jego bazie pochodnych.
; [[Plik:Cc-sa white.svg|32px|Creative Commons Share Alike icon]] Na Tych Samych Warunkach ([[język angielski|ang.]] Share Alike (SA)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie pochodnych dzieł, pod warunkiem że będą one opublikowane na takiej samej licencji.
Sześć podstawowych licencji, stanowiących kombinacje tych warunków, to:
* Uznanie Autorstwa (CC-BY)<ref>[http://creativecommons.org/licenses/by/3.0/deed.pl warunki licencji CC-BY 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne (CC-BY-NC)<ref>[http://creativecommons.org/licenses/by-nc/3.0/deed.pl warunki licencji CC-BY-NC 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne – Na Tych Samych Warunkach (CC-BY-NC-SA)<ref>[http://creativecommons.org/licenses/by-nc-sa/3.0/deed.pl warunki licencji CC-BY-NC-SA 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne – Bez Utworów Zależnych (CC-BY-NC-ND)<ref>[http://creativecommons.org/licenses/by-nc-nd/3.0/deed.pl warunki licencji CC-BY-NC-ND 3.0].</ref>
* Uznanie Autorstwa – Na Tych Samych Warunkach<ref>[http://creativecommons.org/licenses/by-sa/3.0/deed.pl warunki licencji CC-BY-SA 3.0].</ref> (CC-BY-SA) (jest to licencja najbardziej zbliżona do [[GNU Free Documentation License|GNU FDL]])
* Uznanie Autorstwa – Bez Utworów Zależnych (CC-BY-ND)<ref>[http://creativecommons.org/licenses/by-nd/3.0/deed.pl warunki licencji CC-BY-ND 3.0].</ref>
Istnieją też licencje dodatkowe:
* '''Sampling''' – warunek Creative Commons, który zezwala na [[Sampling (muzyka)|samplowanie]] i tworzenie [[remiks]]ów utworów [[muzyka|muzycznych]], a nie pozwala na wykorzystanie [[Sampling (muzyka)|sampli]] do celów [[reklama|reklamowych]]<ref>[http://creativecommons.org/licenses/sampling/1.0/deed.pl warunki licencji Sampling 1.0].</ref>. Wersja tej licencji ze znaczkiem „+” zezwala na samplowanie do celów komercyjnych i niekomercyjnych<ref>[http://creativecommons.org/licenses/sampling+/1.0/deed.pl warunki licencji Sampling Plus 1.0].</ref>, a licencja „noncomercial +” – tylko do celów niekomercyjnych<ref>[http://creativecommons.org/licenses/nc-sampling+/1.0/deed.pl warunki licencji Użycie niekomercyjne-Sampling Plus 1.0].</ref>. Obie wersje licencji Sampling, tak jak wszystkie inne obecnie stosowane licencje CC, wymagają [[Uznanie autorstwa|uznania autorstwa]].
* '''Państwa rozwijające się''' – przestarzała licencja pozwalająca na kopiowanie i tworzenie utworów zależnych pod warunkiem uznania autorstwa, ale tylko w państwach rozwijających się<ref>[http://creativecommons.org/licenses/devnations/2.0/deed.pl warunki licencji Państwa rozwijające się].</ref>
Oprócz tego istnieje też pseudolicencja CC-PD – która od strony prawnej właściwie nie jest licencją lecz jest raczej rodzajem oświadczenia osoby udostępniającej dane dzieło, że według najlepszej jego/jej wiedzy dzieło to znajduje się w [[domena publiczna|domenie publicznej]] i że osoba udostępniająca bierze za stwierdzenie tego faktu pełną odpowiedzialność<ref>[http://creativecommons.org/licenses/publicdomain/ Opis warunków pseudolicencji CC-PD].</ref>. W podobny sposób można dodać warunki licencji [[GNU General Public License|GPL]], [[GNU Lesser General Public License|LGPL]] i [[Licencja BSD|BSD]].
== CC0 ==
Jest to jednostronne oświadczenie twórcy, który zrzeka się wszystkich praw jakich można się zrzec w danym systemie prawnym. W idealnym przypadku, jest to równoznaczne z przekazaniem dzieła do [[domena publiczna|domeny publicznej]]<ref>{{cytuj stronę|url=http://creativecommons.org/publicdomain/zero/1.0/|tytuł=CC0 1.0 Universal (CC0 1.0) Public Domain Dedication}}</ref>.
W niektórych krajach część praw jest niezbywalna. W Polsce nie istnieje możliwość zrzeczenia się zarówno [[Autorskie prawa osobiste| osobistych]] jak i [[Autorskie prawa majątkowe| majątkowych]] praw autorskich do swojego dzieła. Z tego powodu w ramach oświadczenia CC0 znajduje się tak zwana licencja zapasowa (fallback license), która otwarcie licencjonuje treść w najszerszym zakresie dopuszczalnym przez miejscowe prawodawstwo. Uznaje się, że zakres swobód zapewniany przez CC0 jest szerszy od najbardziej otwartej z podstawowych licencji Creative Commons, "Creative Commons Uznanie autorstwa".
[[Free Software Foundation]] dopuszcza i zaleca stosowanie CC0 dla oprogramowania<ref>{{cytuj stronę | url = http://creativecommons.org/weblog/entry/27081| tytuł =Using CC0 for public domain software | data dostępu = 2011-05-10| autor = Mike Linksvayer| opublikowany = Creative Commons Blog| praca = | data = | język = en}}</ref>.
== Warunki używania ==
Do każdego dzieła wykorzystującego którąkolwiek z licencji Creative Commons (oprócz CC0) musi być dołączony pełny tekst licencji lub [[Uniform Resource Identifier|URI]] tego tekstu oraz informacje takie jak tytuł, nazwisko autora. Pozostałe warunki są zależne od wybranego wariantu licencji.
== Wersje ==
Do tej pory licencje Creative Commons ukazały się w kilku wersjach: 1.0, 2.0, 2.5 i 3.0. Wszystkie one są dostępne w języku polskim.
== Zgodność z innymi licencjami ==
Licencja CC-BY bez żadnych dodatkowych warunków jest zgodna m.in. z licencjami [[licencja BSD|BSD]], [[GNU Free Documentation License|GNU FDL]] oraz [[Licencja Wolnej Sztuki|FAL]] (czyli może być wykorzystana w tak licencjonowanych dziełach), natomiast każda licencja zawierająca warunek No Derivative lub Noncommercial nie jest zgodna z żadną z nich, w sensie, że treści udostępnione licencjami CC-BY można też objąć licencjami BSD, GNU FDL i wszystkimi innymi o ile tylko zapewniają one obowiązek podania źródła i autorów treści pierwotnej. Natomiast w drugą stronę zgodność ta nie działa, to znaczy nie można przenosić treści opartych na licencji GNU FDL, BSD i FAL do licencji CC-BY.
Wariant ''Share Alike'' do wersji licencji Creative Commons 2.5 i GNU FDL 1.2 były z sobą niezgodne, co oznacza, że np. na Wikipedii nie można korzystać z tekstów dostępnych na licencjach CC-BY-SA do wersji 2.5. Dzięki współpracy Creative Commons i [[Free Software Foundation]] udało się uzgodnić taką treść licencji CC-BY-SA 3.0 i GNU FDL 1.3, że stały się one niemal w pełni kompatybilne w obie strony<ref>[http://linuxnews.pl/gfdl-nareszcie-zgodna-z-cc-by-sa/ Kocio, ''GFDL nareszcie (prawie) zgodna z CC BY-SA!'', Linux News].</ref>.
== Wykorzystanie ==
Serwisy funkcjonujące pod skrzydłami [[Wikimedia Foundation]] oprócz GNU FDL wykorzystują też licencje Creative Commons. W ramach projektów Wikimedia dozwolone jest użycie licencji CC, które zostały zaaprobowane do użycia dla twórczości zaliczanej do [[Ruch wolnej kultury|wolnej kultury]] (CC-BY, CC-BY-SA i CC0)<ref>[http://freedomdefined.org/Definition Definicja wolnej kultury].</ref>, natomiast niedopuszczalne są licencje typu NC i ND<ref>[http://commons.wikimedia.org/wiki/Commons:Licensing Commons:Licensing].</ref>. W projekcie [[Wikimedia Commons]] znajduje się ponad 16 milionów plików na licencjach CC. Projekt [[Wikinews]] w całości jest oparty na licencji CC-BY 2.5.<ref>[http://pl.wikinews.org/wiki/Wikinews:Warunki_u%C5%BCycia Wikinews:Warunki użycia].</ref>
W skali całego internetu na licencjach Creative Commons znajduje się co najmniej sto milionów plików. Najpopularniejsze licencje to używana w przypadku 37% utworów licencja BY-NC-SA oraz BY-NC-ND (18% licencjonowanych utworów). W sumie 2/3 licencji zezwala jedynie na użycie niekomercyjne, a 1/3 nie zezwala na tworzenie utworów zależnych{{fakt|data=2010-03}}.
== Zalety ==
W stosunku do GNU FDL zaletą jest niewątpliwie brak obciążeń przy drukowaniu – teksty na licencjach Creative Commons nie muszą podawać pełnego tekstu licencji. Wystarczy w zastępstwie podać link do treści licencji.
== Krytyka licencji Creative Commons ==
Niektórzy członkowie środowiska [[Wolne Oprogramowanie|wolnego oprogramowania]] krytykują [[Creative Commons]] za brak wyraźnie wytyczonych wartości lub warunków, które winny spełniać wszystkie licencje. W szczególności obiektem krytyki są licencje, które zastrzegają prawa, które zdaniem tych krytyków nie mogą podlegać zastrzeżeniu ze względów etycznych bądź moralnych. Krytycy wskazują również na brak zgodności licencji Creative Commons z [[Wolne oprogramowanie#Licencje|licencjami wolnego oprogramowania]].
Według środowiska [[Debian]]a licencje te w wersji 2.0 nie spełniają [[Wytyczne Debiana dotyczące Wolnego Oprogramowania|Wytycznych Debiana dotyczących Wolnego Oprogramowania]] ze względu na pewne wady już w warunku uznania autorstwa<ref>{{cytuj stronę|tytuł=Debian-legal Summary of Creative Commons 2.0 Licenses|data=3 kwietnia 2005|url=http://web.archive.org/web/*/http://people.debian.org/~evan/ccsummary|data dostępu=2008-03-29, 12:13}}</ref>. [[Free Software Foundation]] uważa, że samo określenie Creative Commons jest nieścisłe, ponieważ nie istnieje żadna swoboda, jaką wszystkie te licencje by zapewniały (chociaż uważa CC-BY-SA 2.0 za wolną licencję copyleftową) i zaleca zamiast nich [[Licencja Wolnej Sztuki|Free Art License]]<ref>{{cytuj stronę|opublikowany=Projekt GNU|tytuł=Rozmaite licencje i komentarze na ich temat|url=http://www.gnu.org/licenses/license-list.pl.html#TOCOtherLicenses|data dostępu=2008-03-29, 12:13}}</ref>.
Zgodnie z [[Definicja Wolnych Dóbr Kultury|Definicją Wolnych Dóbr Kultury]] tylko część licencji Creative Commons może być uznana za rzeczywiście wolne. Są to<ref>{{cytuj stronę | url = http://freedomdefined.org/Licenses#List_of_licenses | tytuł = Licenses | opublikowany = freedomdefined.org | język = en | data dostępu = 2013-02-03}}</ref>:
* CC-0
* CC-BY
* CC-BY-SA
Pozostałe licencje Creative Commons są uważane za niezgodne z ideą pełnej [[Otwarta treść|otwartości]] zasobów.
{{Przypisy}}
== Linki zewnętrzne ==
{{commonscat|Creative Commons licenses|materiały na licencjach Creative Commons}}
* [http://creativecommons.org/licenses/ Pełny wybór licencji na stronie Creative Commons]
* [http://creativecommons.org/license/?lang=pl Formularz ułatwiający wybór odpowiedniej licencji]
* [http://prawo.vagla.pl/node/7830 „Dlaczego jestem sceptycznie nastawiony do CC – zamówiona przez czytelników odpowiedź”] (artykuł [[Piotr Waglowski|Piotra Waglowskiego]])
* [http://orka.sejm.gov.pl/WydBAS.nsf/0/E66C1989A16584B3C12578DC00309F0F/$file/Infos_90.pdf Piotr Wasilewski ''Creative Commons - erozja czy rozwój prawa autorskiego"], [[Infos|"Infos"]] Nr 20/2010, Biuro Analiz Sejmowych Kancelarii Sejmu
[[Kategoria:Licencje|Creative, Commons]]
51892415d3589d45352bd3b356b5ac3636d7289f
555
81
2014-03-11T00:55:06Z
Ffkapa
2
wikitext
text/x-wiki
[[Plik:CC some rights reserved.svg|thumb|300px|Grafika często używana w opisie plików udostępnionych na licencjach CC]]
'''Licencje Creative Commons (CC) ''' – zestaw [[licencja (prawo)|licencji]], na mocy których można udostępniać [[utwór|utwory]] objęte [[prawo autorskie|prawami autorskimi]]. Licencje te są tworzone i utrzymywane przez organizację [[Creative Commons]].
Licencje Creative Commons pozwalają twórcom utworów zachować własne prawa i jednocześnie dzielić się swoją twórczością z innymi. Zasada „wszelkie prawa zastrzeżone” zostaje zastąpiona zasadą “pewne prawa zastrzeżone”.
Szacuje się, że na licencjach CC udostępnia się obecnie co najmniej 100 milionów utworów. Licencje CC są w chwili obecnej najpopularniejszymi wolnymi licencjami stosowanymi do licencjonowania treści innych niż [[oprogramowanie]].
== Zastosowanie ==
Licencje CC można stosować dla dowolnego utworu, który podlega ochronie [[prawo autorskie|prawa autorskiego]] – na przykład tekstu, obrazu, dźwięku czy utworu audiowizualnego.
Licencje CC nie są przeznaczone do licencjonowania oprogramowania, CC do tego celu poleca licencje oferowane przez [[Free Software Foundation]] lub [[Open Source Initiative]].
Licencje CC są dostępne w wersji ogólnej („Unported”) – dostosowanej do prawodawstwa międzynarodowego oraz w ponad 40 wersjach dostosowanych do [[jurysdykcja|jurysdykcji]] lokalnych. W szczególności istnieją wersje polskie licencji, zgodne z [[polskie prawo|polskim systemem prawnym]].
Teksty licencji są dostępne za darmo na stronie projektu Creative Commons.
== Rodzaje licencji ==
Istnieją cztery warunki udostępniania utworów, z czego pierwszy pojawia się we wszystkich licencjach:
; [[Plik:Cc-by new white.svg|32px|Creative Commons Attribution new icon]] Uznanie Autorstwa ([[język angielski|ang.]] Attribution (BY)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie dzieła i wszelkich jego pochodnych pod warunkiem umieszczenia informacji o twórcy.
; [[Plik:Cc-nc white.svg|32px|Creative Commons Noncommercial icon]] Użycie Niekomercyjne ([[język angielski|ang.]] Noncommercial (NC)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie dzieła i wszelkich jego pochodnych tylko w celach niekomercyjnych.
; [[Plik:Cc-nd white.svg|32px|Creative Commons No Derivative Works icon]] Bez Utworów Zależnych ([[język angielski|ang.]] No Derivative Works (ND)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie tylko dokładnych (dosłownych) kopii dzieła, niedozwolone jest jego zmienianie i tworzenie na jego bazie pochodnych.
; [[Plik:Cc-sa white.svg|32px|Creative Commons Share Alike icon]] Na Tych Samych Warunkach ([[język angielski|ang.]] Share Alike (SA)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie pochodnych dzieł, pod warunkiem że będą one opublikowane na takiej samej licencji.
Sześć podstawowych licencji, stanowiących kombinacje tych warunków, to:
* Uznanie Autorstwa (CC-BY)<ref>[http://creativecommons.org/licenses/by/3.0/deed.pl warunki licencji CC-BY 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne (CC-BY-NC)<ref>[http://creativecommons.org/licenses/by-nc/3.0/deed.pl warunki licencji CC-BY-NC 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne – Na Tych Samych Warunkach (CC-BY-NC-SA)<ref>[http://creativecommons.org/licenses/by-nc-sa/3.0/deed.pl warunki licencji CC-BY-NC-SA 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne – Bez Utworów Zależnych (CC-BY-NC-ND)<ref>[http://creativecommons.org/licenses/by-nc-nd/3.0/deed.pl warunki licencji CC-BY-NC-ND 3.0].</ref>
* Uznanie Autorstwa – Na Tych Samych Warunkach<ref>[http://creativecommons.org/licenses/by-sa/3.0/deed.pl warunki licencji CC-BY-SA 3.0].</ref> (CC-BY-SA) (jest to licencja najbardziej zbliżona do [[GNU Free Documentation License|GNU FDL]])
* Uznanie Autorstwa – Bez Utworów Zależnych (CC-BY-ND)<ref>[http://creativecommons.org/licenses/by-nd/3.0/deed.pl warunki licencji CC-BY-ND 3.0].</ref>
Istnieją też licencje dodatkowe:
* '''Sampling''' – warunek Creative Commons, który zezwala na [[Sampling (muzyka)|samplowanie]] i tworzenie [[remiks]]ów utworów [[muzyka|muzycznych]], a nie pozwala na wykorzystanie [[Sampling (muzyka)|sampli]] do celów [[reklama|reklamowych]]<ref>[http://creativecommons.org/licenses/sampling/1.0/deed.pl warunki licencji Sampling 1.0].</ref>. Wersja tej licencji ze znaczkiem „+” zezwala na samplowanie do celów komercyjnych i niekomercyjnych<ref>[http://creativecommons.org/licenses/sampling+/1.0/deed.pl warunki licencji Sampling Plus 1.0].</ref>, a licencja „noncomercial +” – tylko do celów niekomercyjnych<ref>[http://creativecommons.org/licenses/nc-sampling+/1.0/deed.pl warunki licencji Użycie niekomercyjne-Sampling Plus 1.0].</ref>. Obie wersje licencji Sampling, tak jak wszystkie inne obecnie stosowane licencje CC, wymagają [[Uznanie autorstwa|uznania autorstwa]].
* '''Państwa rozwijające się''' – przestarzała licencja pozwalająca na kopiowanie i tworzenie utworów zależnych pod warunkiem uznania autorstwa, ale tylko w państwach rozwijających się<ref>[http://creativecommons.org/licenses/devnations/2.0/deed.pl warunki licencji Państwa rozwijające się].</ref>
Oprócz tego istnieje też pseudolicencja CC-PD – która od strony prawnej właściwie nie jest licencją lecz jest raczej rodzajem oświadczenia osoby udostępniającej dane dzieło, że według najlepszej jego/jej wiedzy dzieło to znajduje się w [[domena publiczna|domenie publicznej]] i że osoba udostępniająca bierze za stwierdzenie tego faktu pełną odpowiedzialność<ref>[http://creativecommons.org/licenses/publicdomain/ Opis warunków pseudolicencji CC-PD].</ref>. W podobny sposób można dodać warunki licencji [[GNU General Public License|GPL]], [[GNU Lesser General Public License|LGPL]] i [[Licencja BSD|BSD]].
== CC0 ==
Jest to jednostronne oświadczenie twórcy, który zrzeka się wszystkich praw jakich można się zrzec w danym systemie prawnym. W idealnym przypadku, jest to równoznaczne z przekazaniem dzieła do [[domena publiczna|domeny publicznej]]<ref>{{cytuj stronę|url=http://creativecommons.org/publicdomain/zero/1.0/|tytuł=CC0 1.0 Universal (CC0 1.0) Public Domain Dedication}}</ref>.
W niektórych krajach część praw jest niezbywalna. W Polsce nie istnieje możliwość zrzeczenia się zarówno [[Autorskie prawa osobiste| osobistych]] jak i [[Autorskie prawa majątkowe| majątkowych]] praw autorskich do swojego dzieła. Z tego powodu w ramach oświadczenia CC0 znajduje się tak zwana licencja zapasowa (fallback license), która otwarcie licencjonuje treść w najszerszym zakresie dopuszczalnym przez miejscowe prawodawstwo. Uznaje się, że zakres swobód zapewniany przez CC0 jest szerszy od najbardziej otwartej z podstawowych licencji Creative Commons, "Creative Commons Uznanie autorstwa".
[[Free Software Foundation]] dopuszcza i zaleca stosowanie CC0 dla oprogramowania<ref>{{cytuj stronę | url = http://creativecommons.org/weblog/entry/27081| tytuł =Using CC0 for public domain software | data dostępu = 2011-05-10| autor = Mike Linksvayer| opublikowany = Creative Commons Blog| praca = | data = | język = en}}</ref>.
== Warunki używania ==
Do każdego dzieła wykorzystującego którąkolwiek z licencji Creative Commons (oprócz CC0) musi być dołączony pełny tekst licencji lub [[Uniform Resource Identifier|URI]] tego tekstu oraz informacje takie jak tytuł, nazwisko autora. Pozostałe warunki są zależne od wybranego wariantu licencji.
== Wersje ==
Do tej pory licencje Creative Commons ukazały się w kilku wersjach: 1.0, 2.0, 2.5 i 3.0. Wszystkie one są dostępne w języku polskim.
== Zgodność z innymi licencjami ==
Licencja CC-BY bez żadnych dodatkowych warunków jest zgodna m.in. z licencjami [[licencja BSD|BSD]], [[GNU Free Documentation License|GNU FDL]] oraz [[Licencja Wolnej Sztuki|FAL]] (czyli może być wykorzystana w tak licencjonowanych dziełach), natomiast każda licencja zawierająca warunek No Derivative lub Noncommercial nie jest zgodna z żadną z nich, w sensie, że treści udostępnione licencjami CC-BY można też objąć licencjami BSD, GNU FDL i wszystkimi innymi o ile tylko zapewniają one obowiązek podania źródła i autorów treści pierwotnej. Natomiast w drugą stronę zgodność ta nie działa, to znaczy nie można przenosić treści opartych na licencji GNU FDL, BSD i FAL do licencji CC-BY.
Wariant ''Share Alike'' do wersji licencji Creative Commons 2.5 i GNU FDL 1.2 były z sobą niezgodne, co oznacza, że np. na Wikipedii nie można korzystać z tekstów dostępnych na licencjach CC-BY-SA do wersji 2.5. Dzięki współpracy Creative Commons i [[Free Software Foundation]] udało się uzgodnić taką treść licencji CC-BY-SA 3.0 i GNU FDL 1.3, że stały się one niemal w pełni kompatybilne w obie strony<ref>[http://linuxnews.pl/gfdl-nareszcie-zgodna-z-cc-by-sa/ Kocio, ''GFDL nareszcie (prawie) zgodna z CC BY-SA!'', Linux News].</ref>.
== Wykorzystanie ==
Serwisy funkcjonujące pod skrzydłami [[Wikimedia Foundation]] oprócz GNU FDL wykorzystują też licencje Creative Commons. W ramach projektów Wikimedia dozwolone jest użycie licencji CC, które zostały zaaprobowane do użycia dla twórczości zaliczanej do [[Ruch wolnej kultury|wolnej kultury]] (CC-BY, CC-BY-SA i CC0)<ref>[http://freedomdefined.org/Definition Definicja wolnej kultury].</ref>, natomiast niedopuszczalne są licencje typu NC i ND<ref>[http://commons.wikimedia.org/wiki/Commons:Licensing Commons:Licensing].</ref>. W projekcie [[Wikimedia Commons]] znajduje się ponad 16 milionów plików na licencjach CC. Projekt [[Wikinews]] w całości jest oparty na licencji CC-BY 2.5.<ref>[http://pl.wikinews.org/wiki/Wikinews:Warunki_u%C5%BCycia Wikinews:Warunki użycia].</ref>
W skali całego internetu na licencjach Creative Commons znajduje się co najmniej sto milionów plików. Najpopularniejsze licencje to używana w przypadku 37% utworów licencja BY-NC-SA oraz BY-NC-ND (18% licencjonowanych utworów). W sumie 2/3 licencji zezwala jedynie na użycie niekomercyjne, a 1/3 nie zezwala na tworzenie utworów zależnych{{fakt|data=2010-03}}.
== Zalety ==
W stosunku do GNU FDL zaletą jest niewątpliwie brak obciążeń przy drukowaniu – teksty na licencjach Creative Commons nie muszą podawać pełnego tekstu licencji. Wystarczy w zastępstwie podać link do treści licencji.
== Krytyka licencji Creative Commons ==
Niektórzy członkowie środowiska [[Wolne Oprogramowanie|wolnego oprogramowania]] krytykują [[Creative Commons]] za brak wyraźnie wytyczonych wartości lub warunków, które winny spełniać wszystkie licencje. W szczególności obiektem krytyki są licencje, które zastrzegają prawa, które zdaniem tych krytyków nie mogą podlegać zastrzeżeniu ze względów etycznych bądź moralnych. Krytycy wskazują również na brak zgodności licencji Creative Commons z [[Wolne oprogramowanie#Licencje|licencjami wolnego oprogramowania]].
Według środowiska [[Debian]]a licencje te w wersji 2.0 nie spełniają [[Wytyczne Debiana dotyczące Wolnego Oprogramowania|Wytycznych Debiana dotyczących Wolnego Oprogramowania]] ze względu na pewne wady już w warunku uznania autorstwa<ref>{{cytuj stronę|tytuł=Debian-legal Summary of Creative Commons 2.0 Licenses|data=3 kwietnia 2005|url=http://web.archive.org/web/*/http://people.debian.org/~evan/ccsummary|data dostępu=2008-03-29, 12:13}}</ref>. [[Free Software Foundation]] uważa, że samo określenie Creative Commons jest nieścisłe, ponieważ nie istnieje żadna swoboda, jaką wszystkie te licencje by zapewniały (chociaż uważa CC-BY-SA 2.0 za wolną licencję copyleftową) i zaleca zamiast nich [[Licencja Wolnej Sztuki|Free Art License]]<ref>{{cytuj stronę|opublikowany=Projekt GNU|tytuł=Rozmaite licencje i komentarze na ich temat|url=http://www.gnu.org/licenses/license-list.pl.html#TOCOtherLicenses|data dostępu=2008-03-29, 12:13}}</ref>.
Zgodnie z [[Definicja Wolnych Dóbr Kultury|Definicją Wolnych Dóbr Kultury]] tylko część licencji Creative Commons może być uznana za rzeczywiście wolne. Są to<ref>{{cytuj stronę | url = http://freedomdefined.org/Licenses#List_of_licenses | tytuł = Licenses | opublikowany = freedomdefined.org | język = en | data dostępu = 2013-02-03}}</ref>:
* CC-0
* CC-BY
* CC-BY-SA
Pozostałe licencje Creative Commons są uważane za niezgodne z ideą pełnej [[Otwarta treść|otwartości]] zasobów.
{{Przypisy}}
== Linki zewnętrzne ==
{{commonscat|Creative Commons licenses|materiały na licencjach Creative Commons}}
* [http://creativecommons.org/licenses/ Pełny wybór licencji na stronie Creative Commons]
* [http://creativecommons.org/license/?lang=pl Formularz ułatwiający wybór odpowiedniej licencji]
* [http://prawo.vagla.pl/node/7830 „Dlaczego jestem sceptycznie nastawiony do CC – zamówiona przez czytelników odpowiedź”] (artykuł [[Piotr Waglowski|Piotra Waglowskiego]])
* [http://orka.sejm.gov.pl/WydBAS.nsf/0/E66C1989A16584B3C12578DC00309F0F/$file/Infos_90.pdf Piotr Wasilewski ''Creative Commons - erozja czy rozwój prawa autorskiego"], [[Infos|"Infos"]] Nr 20/2010, Biuro Analiz Sejmowych Kancelarii Sejmu
[[Kategoria:Licencje|Creative, Commons]]
51892415d3589d45352bd3b356b5ac3636d7289f
81
79
2014-01-15T23:55:28Z
Ffkapa
2
Ffkapa przeniósł stronę [[Creative Commons]] na [[Licencje Creative Commons]] w miejsce przekierowania i bez pozostawienia przekierowania pod starym tytułem
wikitext
text/x-wiki
[[Plik:CC some rights reserved.svg|thumb|300px|Grafika często używana w opisie plików udostępnionych na licencjach CC]]
'''Licencje Creative Commons (CC) ''' – zestaw [[licencja (prawo)|licencji]], na mocy których można udostępniać [[utwór|utwory]] objęte [[prawo autorskie|prawami autorskimi]]. Licencje te są tworzone i utrzymywane przez organizację [[Creative Commons]].
Licencje Creative Commons pozwalają twórcom utworów zachować własne prawa i jednocześnie dzielić się swoją twórczością z innymi. Zasada „wszelkie prawa zastrzeżone” zostaje zastąpiona zasadą “pewne prawa zastrzeżone”.
Szacuje się, że na licencjach CC udostępnia się obecnie co najmniej 100 milionów utworów. Licencje CC są w chwili obecnej najpopularniejszymi wolnymi licencjami stosowanymi do licencjonowania treści innych niż [[oprogramowanie]].
== Zastosowanie ==
Licencje CC można stosować dla dowolnego utworu, który podlega ochronie [[prawo autorskie|prawa autorskiego]] – na przykład tekstu, obrazu, dźwięku czy utworu audiowizualnego.
Licencje CC nie są przeznaczone do licencjonowania oprogramowania, CC do tego celu poleca licencje oferowane przez [[Free Software Foundation]] lub [[Open Source Initiative]].
Licencje CC są dostępne w wersji ogólnej („Unported”) – dostosowanej do prawodawstwa międzynarodowego oraz w ponad 40 wersjach dostosowanych do [[jurysdykcja|jurysdykcji]] lokalnych. W szczególności istnieją wersje polskie licencji, zgodne z [[polskie prawo|polskim systemem prawnym]].
Teksty licencji są dostępne za darmo na stronie projektu Creative Commons.
== Rodzaje licencji ==
Istnieją cztery warunki udostępniania utworów, z czego pierwszy pojawia się we wszystkich licencjach:
; [[Plik:Cc-by new white.svg|32px|Creative Commons Attribution new icon]] Uznanie Autorstwa ([[język angielski|ang.]] Attribution (BY)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie dzieła i wszelkich jego pochodnych pod warunkiem umieszczenia informacji o twórcy.
; [[Plik:Cc-nc white.svg|32px|Creative Commons Noncommercial icon]] Użycie Niekomercyjne ([[język angielski|ang.]] Noncommercial (NC)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie dzieła i wszelkich jego pochodnych tylko w celach niekomercyjnych.
; [[Plik:Cc-nd white.svg|32px|Creative Commons No Derivative Works icon]] Bez Utworów Zależnych ([[język angielski|ang.]] No Derivative Works (ND)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie tylko dokładnych (dosłownych) kopii dzieła, niedozwolone jest jego zmienianie i tworzenie na jego bazie pochodnych.
; [[Plik:Cc-sa white.svg|32px|Creative Commons Share Alike icon]] Na Tych Samych Warunkach ([[język angielski|ang.]] Share Alike (SA)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie pochodnych dzieł, pod warunkiem że będą one opublikowane na takiej samej licencji.
Sześć podstawowych licencji, stanowiących kombinacje tych warunków, to:
* Uznanie Autorstwa (CC-BY)<ref>[http://creativecommons.org/licenses/by/3.0/deed.pl warunki licencji CC-BY 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne (CC-BY-NC)<ref>[http://creativecommons.org/licenses/by-nc/3.0/deed.pl warunki licencji CC-BY-NC 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne – Na Tych Samych Warunkach (CC-BY-NC-SA)<ref>[http://creativecommons.org/licenses/by-nc-sa/3.0/deed.pl warunki licencji CC-BY-NC-SA 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne – Bez Utworów Zależnych (CC-BY-NC-ND)<ref>[http://creativecommons.org/licenses/by-nc-nd/3.0/deed.pl warunki licencji CC-BY-NC-ND 3.0].</ref>
* Uznanie Autorstwa – Na Tych Samych Warunkach<ref>[http://creativecommons.org/licenses/by-sa/3.0/deed.pl warunki licencji CC-BY-SA 3.0].</ref> (CC-BY-SA) (jest to licencja najbardziej zbliżona do [[GNU Free Documentation License|GNU FDL]])
* Uznanie Autorstwa – Bez Utworów Zależnych (CC-BY-ND)<ref>[http://creativecommons.org/licenses/by-nd/3.0/deed.pl warunki licencji CC-BY-ND 3.0].</ref>
Istnieją też licencje dodatkowe:
* '''Sampling''' – warunek Creative Commons, który zezwala na [[Sampling (muzyka)|samplowanie]] i tworzenie [[remiks]]ów utworów [[muzyka|muzycznych]], a nie pozwala na wykorzystanie [[Sampling (muzyka)|sampli]] do celów [[reklama|reklamowych]]<ref>[http://creativecommons.org/licenses/sampling/1.0/deed.pl warunki licencji Sampling 1.0].</ref>. Wersja tej licencji ze znaczkiem „+” zezwala na samplowanie do celów komercyjnych i niekomercyjnych<ref>[http://creativecommons.org/licenses/sampling+/1.0/deed.pl warunki licencji Sampling Plus 1.0].</ref>, a licencja „noncomercial +” – tylko do celów niekomercyjnych<ref>[http://creativecommons.org/licenses/nc-sampling+/1.0/deed.pl warunki licencji Użycie niekomercyjne-Sampling Plus 1.0].</ref>. Obie wersje licencji Sampling, tak jak wszystkie inne obecnie stosowane licencje CC, wymagają [[Uznanie autorstwa|uznania autorstwa]].
* '''Państwa rozwijające się''' – przestarzała licencja pozwalająca na kopiowanie i tworzenie utworów zależnych pod warunkiem uznania autorstwa, ale tylko w państwach rozwijających się<ref>[http://creativecommons.org/licenses/devnations/2.0/deed.pl warunki licencji Państwa rozwijające się].</ref>
Oprócz tego istnieje też pseudolicencja CC-PD – która od strony prawnej właściwie nie jest licencją lecz jest raczej rodzajem oświadczenia osoby udostępniającej dane dzieło, że według najlepszej jego/jej wiedzy dzieło to znajduje się w [[domena publiczna|domenie publicznej]] i że osoba udostępniająca bierze za stwierdzenie tego faktu pełną odpowiedzialność<ref>[http://creativecommons.org/licenses/publicdomain/ Opis warunków pseudolicencji CC-PD].</ref>. W podobny sposób można dodać warunki licencji [[GNU General Public License|GPL]], [[GNU Lesser General Public License|LGPL]] i [[Licencja BSD|BSD]].
== CC0 ==
Jest to jednostronne oświadczenie twórcy, który zrzeka się wszystkich praw jakich można się zrzec w danym systemie prawnym. W idealnym przypadku, jest to równoznaczne z przekazaniem dzieła do [[domena publiczna|domeny publicznej]]<ref>{{cytuj stronę|url=http://creativecommons.org/publicdomain/zero/1.0/|tytuł=CC0 1.0 Universal (CC0 1.0) Public Domain Dedication}}</ref>.
W niektórych krajach część praw jest niezbywalna. W Polsce nie istnieje możliwość zrzeczenia się zarówno [[Autorskie prawa osobiste| osobistych]] jak i [[Autorskie prawa majątkowe| majątkowych]] praw autorskich do swojego dzieła. Z tego powodu w ramach oświadczenia CC0 znajduje się tak zwana licencja zapasowa (fallback license), która otwarcie licencjonuje treść w najszerszym zakresie dopuszczalnym przez miejscowe prawodawstwo. Uznaje się, że zakres swobód zapewniany przez CC0 jest szerszy od najbardziej otwartej z podstawowych licencji Creative Commons, "Creative Commons Uznanie autorstwa".
[[Free Software Foundation]] dopuszcza i zaleca stosowanie CC0 dla oprogramowania<ref>{{cytuj stronę | url = http://creativecommons.org/weblog/entry/27081| tytuł =Using CC0 for public domain software | data dostępu = 2011-05-10| autor = Mike Linksvayer| opublikowany = Creative Commons Blog| praca = | data = | język = en}}</ref>.
== Warunki używania ==
Do każdego dzieła wykorzystującego którąkolwiek z licencji Creative Commons (oprócz CC0) musi być dołączony pełny tekst licencji lub [[Uniform Resource Identifier|URI]] tego tekstu oraz informacje takie jak tytuł, nazwisko autora. Pozostałe warunki są zależne od wybranego wariantu licencji.
== Wersje ==
Do tej pory licencje Creative Commons ukazały się w kilku wersjach: 1.0, 2.0, 2.5 i 3.0. Wszystkie one są dostępne w języku polskim.
== Zgodność z innymi licencjami ==
Licencja CC-BY bez żadnych dodatkowych warunków jest zgodna m.in. z licencjami [[licencja BSD|BSD]], [[GNU Free Documentation License|GNU FDL]] oraz [[Licencja Wolnej Sztuki|FAL]] (czyli może być wykorzystana w tak licencjonowanych dziełach), natomiast każda licencja zawierająca warunek No Derivative lub Noncommercial nie jest zgodna z żadną z nich, w sensie, że treści udostępnione licencjami CC-BY można też objąć licencjami BSD, GNU FDL i wszystkimi innymi o ile tylko zapewniają one obowiązek podania źródła i autorów treści pierwotnej. Natomiast w drugą stronę zgodność ta nie działa, to znaczy nie można przenosić treści opartych na licencji GNU FDL, BSD i FAL do licencji CC-BY.
Wariant ''Share Alike'' do wersji licencji Creative Commons 2.5 i GNU FDL 1.2 były z sobą niezgodne, co oznacza, że np. na Wikipedii nie można korzystać z tekstów dostępnych na licencjach CC-BY-SA do wersji 2.5. Dzięki współpracy Creative Commons i [[Free Software Foundation]] udało się uzgodnić taką treść licencji CC-BY-SA 3.0 i GNU FDL 1.3, że stały się one niemal w pełni kompatybilne w obie strony<ref>[http://linuxnews.pl/gfdl-nareszcie-zgodna-z-cc-by-sa/ Kocio, ''GFDL nareszcie (prawie) zgodna z CC BY-SA!'', Linux News].</ref>.
== Wykorzystanie ==
Serwisy funkcjonujące pod skrzydłami [[Wikimedia Foundation]] oprócz GNU FDL wykorzystują też licencje Creative Commons. W ramach projektów Wikimedia dozwolone jest użycie licencji CC, które zostały zaaprobowane do użycia dla twórczości zaliczanej do [[Ruch wolnej kultury|wolnej kultury]] (CC-BY, CC-BY-SA i CC0)<ref>[http://freedomdefined.org/Definition Definicja wolnej kultury].</ref>, natomiast niedopuszczalne są licencje typu NC i ND<ref>[http://commons.wikimedia.org/wiki/Commons:Licensing Commons:Licensing].</ref>. W projekcie [[Wikimedia Commons]] znajduje się ponad 16 milionów plików na licencjach CC. Projekt [[Wikinews]] w całości jest oparty na licencji CC-BY 2.5.<ref>[http://pl.wikinews.org/wiki/Wikinews:Warunki_u%C5%BCycia Wikinews:Warunki użycia].</ref>
W skali całego internetu na licencjach Creative Commons znajduje się co najmniej sto milionów plików. Najpopularniejsze licencje to używana w przypadku 37% utworów licencja BY-NC-SA oraz BY-NC-ND (18% licencjonowanych utworów). W sumie 2/3 licencji zezwala jedynie na użycie niekomercyjne, a 1/3 nie zezwala na tworzenie utworów zależnych{{fakt|data=2010-03}}.
== Zalety ==
W stosunku do GNU FDL zaletą jest niewątpliwie brak obciążeń przy drukowaniu – teksty na licencjach Creative Commons nie muszą podawać pełnego tekstu licencji. Wystarczy w zastępstwie podać link do treści licencji.
== Krytyka licencji Creative Commons ==
Niektórzy członkowie środowiska [[Wolne Oprogramowanie|wolnego oprogramowania]] krytykują [[Creative Commons]] za brak wyraźnie wytyczonych wartości lub warunków, które winny spełniać wszystkie licencje. W szczególności obiektem krytyki są licencje, które zastrzegają prawa, które zdaniem tych krytyków nie mogą podlegać zastrzeżeniu ze względów etycznych bądź moralnych. Krytycy wskazują również na brak zgodności licencji Creative Commons z [[Wolne oprogramowanie#Licencje|licencjami wolnego oprogramowania]].
Według środowiska [[Debian]]a licencje te w wersji 2.0 nie spełniają [[Wytyczne Debiana dotyczące Wolnego Oprogramowania|Wytycznych Debiana dotyczących Wolnego Oprogramowania]] ze względu na pewne wady już w warunku uznania autorstwa<ref>{{cytuj stronę|tytuł=Debian-legal Summary of Creative Commons 2.0 Licenses|data=3 kwietnia 2005|url=http://web.archive.org/web/*/http://people.debian.org/~evan/ccsummary|data dostępu=2008-03-29, 12:13}}</ref>. [[Free Software Foundation]] uważa, że samo określenie Creative Commons jest nieścisłe, ponieważ nie istnieje żadna swoboda, jaką wszystkie te licencje by zapewniały (chociaż uważa CC-BY-SA 2.0 za wolną licencję copyleftową) i zaleca zamiast nich [[Licencja Wolnej Sztuki|Free Art License]]<ref>{{cytuj stronę|opublikowany=Projekt GNU|tytuł=Rozmaite licencje i komentarze na ich temat|url=http://www.gnu.org/licenses/license-list.pl.html#TOCOtherLicenses|data dostępu=2008-03-29, 12:13}}</ref>.
Zgodnie z [[Definicja Wolnych Dóbr Kultury|Definicją Wolnych Dóbr Kultury]] tylko część licencji Creative Commons może być uznana za rzeczywiście wolne. Są to<ref>{{cytuj stronę | url = http://freedomdefined.org/Licenses#List_of_licenses | tytuł = Licenses | opublikowany = freedomdefined.org | język = en | data dostępu = 2013-02-03}}</ref>:
* CC-0
* CC-BY
* CC-BY-SA
Pozostałe licencje Creative Commons są uważane za niezgodne z ideą pełnej [[Otwarta treść|otwartości]] zasobów.
{{Przypisy}}
== Linki zewnętrzne ==
{{commonscat|Creative Commons licenses|materiały na licencjach Creative Commons}}
* [http://creativecommons.org/licenses/ Pełny wybór licencji na stronie Creative Commons]
* [http://creativecommons.org/license/?lang=pl Formularz ułatwiający wybór odpowiedniej licencji]
* [http://prawo.vagla.pl/node/7830 „Dlaczego jestem sceptycznie nastawiony do CC – zamówiona przez czytelników odpowiedź”] (artykuł [[Piotr Waglowski|Piotra Waglowskiego]])
* [http://orka.sejm.gov.pl/WydBAS.nsf/0/E66C1989A16584B3C12578DC00309F0F/$file/Infos_90.pdf Piotr Wasilewski ''Creative Commons - erozja czy rozwój prawa autorskiego"], [[Infos|"Infos"]] Nr 20/2010, Biuro Analiz Sejmowych Kancelarii Sejmu
{{Prawa autorskie}}
[[Kategoria:Licencje|Creative, Commons]]
b886e386141759efb6805ee9bdafc8577dd3528c
79
78
2014-01-15T23:52:35Z
Ffkapa
2
Ffkapa przeniósł stronę [[Licencje Creative Commons]] na [[Creative Commons]] w miejsce przekierowania
wikitext
text/x-wiki
[[Plik:CC some rights reserved.svg|thumb|300px|Grafika często używana w opisie plików udostępnionych na licencjach CC]]
'''Licencje Creative Commons (CC) ''' – zestaw [[licencja (prawo)|licencji]], na mocy których można udostępniać [[utwór|utwory]] objęte [[prawo autorskie|prawami autorskimi]]. Licencje te są tworzone i utrzymywane przez organizację [[Creative Commons]].
Licencje Creative Commons pozwalają twórcom utworów zachować własne prawa i jednocześnie dzielić się swoją twórczością z innymi. Zasada „wszelkie prawa zastrzeżone” zostaje zastąpiona zasadą “pewne prawa zastrzeżone”.
Szacuje się, że na licencjach CC udostępnia się obecnie co najmniej 100 milionów utworów. Licencje CC są w chwili obecnej najpopularniejszymi wolnymi licencjami stosowanymi do licencjonowania treści innych niż [[oprogramowanie]].
== Zastosowanie ==
Licencje CC można stosować dla dowolnego utworu, który podlega ochronie [[prawo autorskie|prawa autorskiego]] – na przykład tekstu, obrazu, dźwięku czy utworu audiowizualnego.
Licencje CC nie są przeznaczone do licencjonowania oprogramowania, CC do tego celu poleca licencje oferowane przez [[Free Software Foundation]] lub [[Open Source Initiative]].
Licencje CC są dostępne w wersji ogólnej („Unported”) – dostosowanej do prawodawstwa międzynarodowego oraz w ponad 40 wersjach dostosowanych do [[jurysdykcja|jurysdykcji]] lokalnych. W szczególności istnieją wersje polskie licencji, zgodne z [[polskie prawo|polskim systemem prawnym]].
Teksty licencji są dostępne za darmo na stronie projektu Creative Commons.
== Rodzaje licencji ==
Istnieją cztery warunki udostępniania utworów, z czego pierwszy pojawia się we wszystkich licencjach:
; [[Plik:Cc-by new white.svg|32px|Creative Commons Attribution new icon]] Uznanie Autorstwa ([[język angielski|ang.]] Attribution (BY)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie dzieła i wszelkich jego pochodnych pod warunkiem umieszczenia informacji o twórcy.
; [[Plik:Cc-nc white.svg|32px|Creative Commons Noncommercial icon]] Użycie Niekomercyjne ([[język angielski|ang.]] Noncommercial (NC)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie dzieła i wszelkich jego pochodnych tylko w celach niekomercyjnych.
; [[Plik:Cc-nd white.svg|32px|Creative Commons No Derivative Works icon]] Bez Utworów Zależnych ([[język angielski|ang.]] No Derivative Works (ND)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie tylko dokładnych (dosłownych) kopii dzieła, niedozwolone jest jego zmienianie i tworzenie na jego bazie pochodnych.
; [[Plik:Cc-sa white.svg|32px|Creative Commons Share Alike icon]] Na Tych Samych Warunkach ([[język angielski|ang.]] Share Alike (SA)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie pochodnych dzieł, pod warunkiem że będą one opublikowane na takiej samej licencji.
Sześć podstawowych licencji, stanowiących kombinacje tych warunków, to:
* Uznanie Autorstwa (CC-BY)<ref>[http://creativecommons.org/licenses/by/3.0/deed.pl warunki licencji CC-BY 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne (CC-BY-NC)<ref>[http://creativecommons.org/licenses/by-nc/3.0/deed.pl warunki licencji CC-BY-NC 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne – Na Tych Samych Warunkach (CC-BY-NC-SA)<ref>[http://creativecommons.org/licenses/by-nc-sa/3.0/deed.pl warunki licencji CC-BY-NC-SA 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne – Bez Utworów Zależnych (CC-BY-NC-ND)<ref>[http://creativecommons.org/licenses/by-nc-nd/3.0/deed.pl warunki licencji CC-BY-NC-ND 3.0].</ref>
* Uznanie Autorstwa – Na Tych Samych Warunkach<ref>[http://creativecommons.org/licenses/by-sa/3.0/deed.pl warunki licencji CC-BY-SA 3.0].</ref> (CC-BY-SA) (jest to licencja najbardziej zbliżona do [[GNU Free Documentation License|GNU FDL]])
* Uznanie Autorstwa – Bez Utworów Zależnych (CC-BY-ND)<ref>[http://creativecommons.org/licenses/by-nd/3.0/deed.pl warunki licencji CC-BY-ND 3.0].</ref>
Istnieją też licencje dodatkowe:
* '''Sampling''' – warunek Creative Commons, który zezwala na [[Sampling (muzyka)|samplowanie]] i tworzenie [[remiks]]ów utworów [[muzyka|muzycznych]], a nie pozwala na wykorzystanie [[Sampling (muzyka)|sampli]] do celów [[reklama|reklamowych]]<ref>[http://creativecommons.org/licenses/sampling/1.0/deed.pl warunki licencji Sampling 1.0].</ref>. Wersja tej licencji ze znaczkiem „+” zezwala na samplowanie do celów komercyjnych i niekomercyjnych<ref>[http://creativecommons.org/licenses/sampling+/1.0/deed.pl warunki licencji Sampling Plus 1.0].</ref>, a licencja „noncomercial +” – tylko do celów niekomercyjnych<ref>[http://creativecommons.org/licenses/nc-sampling+/1.0/deed.pl warunki licencji Użycie niekomercyjne-Sampling Plus 1.0].</ref>. Obie wersje licencji Sampling, tak jak wszystkie inne obecnie stosowane licencje CC, wymagają [[Uznanie autorstwa|uznania autorstwa]].
* '''Państwa rozwijające się''' – przestarzała licencja pozwalająca na kopiowanie i tworzenie utworów zależnych pod warunkiem uznania autorstwa, ale tylko w państwach rozwijających się<ref>[http://creativecommons.org/licenses/devnations/2.0/deed.pl warunki licencji Państwa rozwijające się].</ref>
Oprócz tego istnieje też pseudolicencja CC-PD – która od strony prawnej właściwie nie jest licencją lecz jest raczej rodzajem oświadczenia osoby udostępniającej dane dzieło, że według najlepszej jego/jej wiedzy dzieło to znajduje się w [[domena publiczna|domenie publicznej]] i że osoba udostępniająca bierze za stwierdzenie tego faktu pełną odpowiedzialność<ref>[http://creativecommons.org/licenses/publicdomain/ Opis warunków pseudolicencji CC-PD].</ref>. W podobny sposób można dodać warunki licencji [[GNU General Public License|GPL]], [[GNU Lesser General Public License|LGPL]] i [[Licencja BSD|BSD]].
== CC0 ==
Jest to jednostronne oświadczenie twórcy, który zrzeka się wszystkich praw jakich można się zrzec w danym systemie prawnym. W idealnym przypadku, jest to równoznaczne z przekazaniem dzieła do [[domena publiczna|domeny publicznej]]<ref>{{cytuj stronę|url=http://creativecommons.org/publicdomain/zero/1.0/|tytuł=CC0 1.0 Universal (CC0 1.0) Public Domain Dedication}}</ref>.
W niektórych krajach część praw jest niezbywalna. W Polsce nie istnieje możliwość zrzeczenia się zarówno [[Autorskie prawa osobiste| osobistych]] jak i [[Autorskie prawa majątkowe| majątkowych]] praw autorskich do swojego dzieła. Z tego powodu w ramach oświadczenia CC0 znajduje się tak zwana licencja zapasowa (fallback license), która otwarcie licencjonuje treść w najszerszym zakresie dopuszczalnym przez miejscowe prawodawstwo. Uznaje się, że zakres swobód zapewniany przez CC0 jest szerszy od najbardziej otwartej z podstawowych licencji Creative Commons, "Creative Commons Uznanie autorstwa".
[[Free Software Foundation]] dopuszcza i zaleca stosowanie CC0 dla oprogramowania<ref>{{cytuj stronę | url = http://creativecommons.org/weblog/entry/27081| tytuł =Using CC0 for public domain software | data dostępu = 2011-05-10| autor = Mike Linksvayer| opublikowany = Creative Commons Blog| praca = | data = | język = en}}</ref>.
== Warunki używania ==
Do każdego dzieła wykorzystującego którąkolwiek z licencji Creative Commons (oprócz CC0) musi być dołączony pełny tekst licencji lub [[Uniform Resource Identifier|URI]] tego tekstu oraz informacje takie jak tytuł, nazwisko autora. Pozostałe warunki są zależne od wybranego wariantu licencji.
== Wersje ==
Do tej pory licencje Creative Commons ukazały się w kilku wersjach: 1.0, 2.0, 2.5 i 3.0. Wszystkie one są dostępne w języku polskim.
== Zgodność z innymi licencjami ==
Licencja CC-BY bez żadnych dodatkowych warunków jest zgodna m.in. z licencjami [[licencja BSD|BSD]], [[GNU Free Documentation License|GNU FDL]] oraz [[Licencja Wolnej Sztuki|FAL]] (czyli może być wykorzystana w tak licencjonowanych dziełach), natomiast każda licencja zawierająca warunek No Derivative lub Noncommercial nie jest zgodna z żadną z nich, w sensie, że treści udostępnione licencjami CC-BY można też objąć licencjami BSD, GNU FDL i wszystkimi innymi o ile tylko zapewniają one obowiązek podania źródła i autorów treści pierwotnej. Natomiast w drugą stronę zgodność ta nie działa, to znaczy nie można przenosić treści opartych na licencji GNU FDL, BSD i FAL do licencji CC-BY.
Wariant ''Share Alike'' do wersji licencji Creative Commons 2.5 i GNU FDL 1.2 były z sobą niezgodne, co oznacza, że np. na Wikipedii nie można korzystać z tekstów dostępnych na licencjach CC-BY-SA do wersji 2.5. Dzięki współpracy Creative Commons i [[Free Software Foundation]] udało się uzgodnić taką treść licencji CC-BY-SA 3.0 i GNU FDL 1.3, że stały się one niemal w pełni kompatybilne w obie strony<ref>[http://linuxnews.pl/gfdl-nareszcie-zgodna-z-cc-by-sa/ Kocio, ''GFDL nareszcie (prawie) zgodna z CC BY-SA!'', Linux News].</ref>.
== Wykorzystanie ==
Serwisy funkcjonujące pod skrzydłami [[Wikimedia Foundation]] oprócz GNU FDL wykorzystują też licencje Creative Commons. W ramach projektów Wikimedia dozwolone jest użycie licencji CC, które zostały zaaprobowane do użycia dla twórczości zaliczanej do [[Ruch wolnej kultury|wolnej kultury]] (CC-BY, CC-BY-SA i CC0)<ref>[http://freedomdefined.org/Definition Definicja wolnej kultury].</ref>, natomiast niedopuszczalne są licencje typu NC i ND<ref>[http://commons.wikimedia.org/wiki/Commons:Licensing Commons:Licensing].</ref>. W projekcie [[Wikimedia Commons]] znajduje się ponad 16 milionów plików na licencjach CC. Projekt [[Wikinews]] w całości jest oparty na licencji CC-BY 2.5.<ref>[http://pl.wikinews.org/wiki/Wikinews:Warunki_u%C5%BCycia Wikinews:Warunki użycia].</ref>
W skali całego internetu na licencjach Creative Commons znajduje się co najmniej sto milionów plików. Najpopularniejsze licencje to używana w przypadku 37% utworów licencja BY-NC-SA oraz BY-NC-ND (18% licencjonowanych utworów). W sumie 2/3 licencji zezwala jedynie na użycie niekomercyjne, a 1/3 nie zezwala na tworzenie utworów zależnych{{fakt|data=2010-03}}.
== Zalety ==
W stosunku do GNU FDL zaletą jest niewątpliwie brak obciążeń przy drukowaniu – teksty na licencjach Creative Commons nie muszą podawać pełnego tekstu licencji. Wystarczy w zastępstwie podać link do treści licencji.
== Krytyka licencji Creative Commons ==
Niektórzy członkowie środowiska [[Wolne Oprogramowanie|wolnego oprogramowania]] krytykują [[Creative Commons]] za brak wyraźnie wytyczonych wartości lub warunków, które winny spełniać wszystkie licencje. W szczególności obiektem krytyki są licencje, które zastrzegają prawa, które zdaniem tych krytyków nie mogą podlegać zastrzeżeniu ze względów etycznych bądź moralnych. Krytycy wskazują również na brak zgodności licencji Creative Commons z [[Wolne oprogramowanie#Licencje|licencjami wolnego oprogramowania]].
Według środowiska [[Debian]]a licencje te w wersji 2.0 nie spełniają [[Wytyczne Debiana dotyczące Wolnego Oprogramowania|Wytycznych Debiana dotyczących Wolnego Oprogramowania]] ze względu na pewne wady już w warunku uznania autorstwa<ref>{{cytuj stronę|tytuł=Debian-legal Summary of Creative Commons 2.0 Licenses|data=3 kwietnia 2005|url=http://web.archive.org/web/*/http://people.debian.org/~evan/ccsummary|data dostępu=2008-03-29, 12:13}}</ref>. [[Free Software Foundation]] uważa, że samo określenie Creative Commons jest nieścisłe, ponieważ nie istnieje żadna swoboda, jaką wszystkie te licencje by zapewniały (chociaż uważa CC-BY-SA 2.0 za wolną licencję copyleftową) i zaleca zamiast nich [[Licencja Wolnej Sztuki|Free Art License]]<ref>{{cytuj stronę|opublikowany=Projekt GNU|tytuł=Rozmaite licencje i komentarze na ich temat|url=http://www.gnu.org/licenses/license-list.pl.html#TOCOtherLicenses|data dostępu=2008-03-29, 12:13}}</ref>.
Zgodnie z [[Definicja Wolnych Dóbr Kultury|Definicją Wolnych Dóbr Kultury]] tylko część licencji Creative Commons może być uznana za rzeczywiście wolne. Są to<ref>{{cytuj stronę | url = http://freedomdefined.org/Licenses#List_of_licenses | tytuł = Licenses | opublikowany = freedomdefined.org | język = en | data dostępu = 2013-02-03}}</ref>:
* CC-0
* CC-BY
* CC-BY-SA
Pozostałe licencje Creative Commons są uważane za niezgodne z ideą pełnej [[Otwarta treść|otwartości]] zasobów.
{{Przypisy}}
== Linki zewnętrzne ==
{{commonscat|Creative Commons licenses|materiały na licencjach Creative Commons}}
* [http://creativecommons.org/licenses/ Pełny wybór licencji na stronie Creative Commons]
* [http://creativecommons.org/license/?lang=pl Formularz ułatwiający wybór odpowiedniej licencji]
* [http://prawo.vagla.pl/node/7830 „Dlaczego jestem sceptycznie nastawiony do CC – zamówiona przez czytelników odpowiedź”] (artykuł [[Piotr Waglowski|Piotra Waglowskiego]])
* [http://orka.sejm.gov.pl/WydBAS.nsf/0/E66C1989A16584B3C12578DC00309F0F/$file/Infos_90.pdf Piotr Wasilewski ''Creative Commons - erozja czy rozwój prawa autorskiego"], [[Infos|"Infos"]] Nr 20/2010, Biuro Analiz Sejmowych Kancelarii Sejmu
{{Prawa autorskie}}
[[Kategoria:Licencje|Creative, Commons]]
b886e386141759efb6805ee9bdafc8577dd3528c
78
76
2014-01-15T23:51:55Z
Ffkapa
2
wikitext
text/x-wiki
[[Plik:CC some rights reserved.svg|thumb|300px|Grafika często używana w opisie plików udostępnionych na licencjach CC]]
'''Licencje Creative Commons (CC) ''' – zestaw [[licencja (prawo)|licencji]], na mocy których można udostępniać [[utwór|utwory]] objęte [[prawo autorskie|prawami autorskimi]]. Licencje te są tworzone i utrzymywane przez organizację [[Creative Commons]].
Licencje Creative Commons pozwalają twórcom utworów zachować własne prawa i jednocześnie dzielić się swoją twórczością z innymi. Zasada „wszelkie prawa zastrzeżone” zostaje zastąpiona zasadą “pewne prawa zastrzeżone”.
Szacuje się, że na licencjach CC udostępnia się obecnie co najmniej 100 milionów utworów. Licencje CC są w chwili obecnej najpopularniejszymi wolnymi licencjami stosowanymi do licencjonowania treści innych niż [[oprogramowanie]].
== Zastosowanie ==
Licencje CC można stosować dla dowolnego utworu, który podlega ochronie [[prawo autorskie|prawa autorskiego]] – na przykład tekstu, obrazu, dźwięku czy utworu audiowizualnego.
Licencje CC nie są przeznaczone do licencjonowania oprogramowania, CC do tego celu poleca licencje oferowane przez [[Free Software Foundation]] lub [[Open Source Initiative]].
Licencje CC są dostępne w wersji ogólnej („Unported”) – dostosowanej do prawodawstwa międzynarodowego oraz w ponad 40 wersjach dostosowanych do [[jurysdykcja|jurysdykcji]] lokalnych. W szczególności istnieją wersje polskie licencji, zgodne z [[polskie prawo|polskim systemem prawnym]].
Teksty licencji są dostępne za darmo na stronie projektu Creative Commons.
== Rodzaje licencji ==
Istnieją cztery warunki udostępniania utworów, z czego pierwszy pojawia się we wszystkich licencjach:
; [[Plik:Cc-by new white.svg|32px|Creative Commons Attribution new icon]] Uznanie Autorstwa ([[język angielski|ang.]] Attribution (BY)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie dzieła i wszelkich jego pochodnych pod warunkiem umieszczenia informacji o twórcy.
; [[Plik:Cc-nc white.svg|32px|Creative Commons Noncommercial icon]] Użycie Niekomercyjne ([[język angielski|ang.]] Noncommercial (NC)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie dzieła i wszelkich jego pochodnych tylko w celach niekomercyjnych.
; [[Plik:Cc-nd white.svg|32px|Creative Commons No Derivative Works icon]] Bez Utworów Zależnych ([[język angielski|ang.]] No Derivative Works (ND)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie tylko dokładnych (dosłownych) kopii dzieła, niedozwolone jest jego zmienianie i tworzenie na jego bazie pochodnych.
; [[Plik:Cc-sa white.svg|32px|Creative Commons Share Alike icon]] Na Tych Samych Warunkach ([[język angielski|ang.]] Share Alike (SA)) : zezwala się na kopiowanie, dystrybucję, wyświetlanie i użytkowanie pochodnych dzieł, pod warunkiem że będą one opublikowane na takiej samej licencji.
Sześć podstawowych licencji, stanowiących kombinacje tych warunków, to:
* Uznanie Autorstwa (CC-BY)<ref>[http://creativecommons.org/licenses/by/3.0/deed.pl warunki licencji CC-BY 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne (CC-BY-NC)<ref>[http://creativecommons.org/licenses/by-nc/3.0/deed.pl warunki licencji CC-BY-NC 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne – Na Tych Samych Warunkach (CC-BY-NC-SA)<ref>[http://creativecommons.org/licenses/by-nc-sa/3.0/deed.pl warunki licencji CC-BY-NC-SA 3.0].</ref>
* Uznanie Autorstwa – Użycie Niekomercyjne – Bez Utworów Zależnych (CC-BY-NC-ND)<ref>[http://creativecommons.org/licenses/by-nc-nd/3.0/deed.pl warunki licencji CC-BY-NC-ND 3.0].</ref>
* Uznanie Autorstwa – Na Tych Samych Warunkach<ref>[http://creativecommons.org/licenses/by-sa/3.0/deed.pl warunki licencji CC-BY-SA 3.0].</ref> (CC-BY-SA) (jest to licencja najbardziej zbliżona do [[GNU Free Documentation License|GNU FDL]])
* Uznanie Autorstwa – Bez Utworów Zależnych (CC-BY-ND)<ref>[http://creativecommons.org/licenses/by-nd/3.0/deed.pl warunki licencji CC-BY-ND 3.0].</ref>
Istnieją też licencje dodatkowe:
* '''Sampling''' – warunek Creative Commons, który zezwala na [[Sampling (muzyka)|samplowanie]] i tworzenie [[remiks]]ów utworów [[muzyka|muzycznych]], a nie pozwala na wykorzystanie [[Sampling (muzyka)|sampli]] do celów [[reklama|reklamowych]]<ref>[http://creativecommons.org/licenses/sampling/1.0/deed.pl warunki licencji Sampling 1.0].</ref>. Wersja tej licencji ze znaczkiem „+” zezwala na samplowanie do celów komercyjnych i niekomercyjnych<ref>[http://creativecommons.org/licenses/sampling+/1.0/deed.pl warunki licencji Sampling Plus 1.0].</ref>, a licencja „noncomercial +” – tylko do celów niekomercyjnych<ref>[http://creativecommons.org/licenses/nc-sampling+/1.0/deed.pl warunki licencji Użycie niekomercyjne-Sampling Plus 1.0].</ref>. Obie wersje licencji Sampling, tak jak wszystkie inne obecnie stosowane licencje CC, wymagają [[Uznanie autorstwa|uznania autorstwa]].
* '''Państwa rozwijające się''' – przestarzała licencja pozwalająca na kopiowanie i tworzenie utworów zależnych pod warunkiem uznania autorstwa, ale tylko w państwach rozwijających się<ref>[http://creativecommons.org/licenses/devnations/2.0/deed.pl warunki licencji Państwa rozwijające się].</ref>
Oprócz tego istnieje też pseudolicencja CC-PD – która od strony prawnej właściwie nie jest licencją lecz jest raczej rodzajem oświadczenia osoby udostępniającej dane dzieło, że według najlepszej jego/jej wiedzy dzieło to znajduje się w [[domena publiczna|domenie publicznej]] i że osoba udostępniająca bierze za stwierdzenie tego faktu pełną odpowiedzialność<ref>[http://creativecommons.org/licenses/publicdomain/ Opis warunków pseudolicencji CC-PD].</ref>. W podobny sposób można dodać warunki licencji [[GNU General Public License|GPL]], [[GNU Lesser General Public License|LGPL]] i [[Licencja BSD|BSD]].
== CC0 ==
Jest to jednostronne oświadczenie twórcy, który zrzeka się wszystkich praw jakich można się zrzec w danym systemie prawnym. W idealnym przypadku, jest to równoznaczne z przekazaniem dzieła do [[domena publiczna|domeny publicznej]]<ref>{{cytuj stronę|url=http://creativecommons.org/publicdomain/zero/1.0/|tytuł=CC0 1.0 Universal (CC0 1.0) Public Domain Dedication}}</ref>.
W niektórych krajach część praw jest niezbywalna. W Polsce nie istnieje możliwość zrzeczenia się zarówno [[Autorskie prawa osobiste| osobistych]] jak i [[Autorskie prawa majątkowe| majątkowych]] praw autorskich do swojego dzieła. Z tego powodu w ramach oświadczenia CC0 znajduje się tak zwana licencja zapasowa (fallback license), która otwarcie licencjonuje treść w najszerszym zakresie dopuszczalnym przez miejscowe prawodawstwo. Uznaje się, że zakres swobód zapewniany przez CC0 jest szerszy od najbardziej otwartej z podstawowych licencji Creative Commons, "Creative Commons Uznanie autorstwa".
[[Free Software Foundation]] dopuszcza i zaleca stosowanie CC0 dla oprogramowania<ref>{{cytuj stronę | url = http://creativecommons.org/weblog/entry/27081| tytuł =Using CC0 for public domain software | data dostępu = 2011-05-10| autor = Mike Linksvayer| opublikowany = Creative Commons Blog| praca = | data = | język = en}}</ref>.
== Warunki używania ==
Do każdego dzieła wykorzystującego którąkolwiek z licencji Creative Commons (oprócz CC0) musi być dołączony pełny tekst licencji lub [[Uniform Resource Identifier|URI]] tego tekstu oraz informacje takie jak tytuł, nazwisko autora. Pozostałe warunki są zależne od wybranego wariantu licencji.
== Wersje ==
Do tej pory licencje Creative Commons ukazały się w kilku wersjach: 1.0, 2.0, 2.5 i 3.0. Wszystkie one są dostępne w języku polskim.
== Zgodność z innymi licencjami ==
Licencja CC-BY bez żadnych dodatkowych warunków jest zgodna m.in. z licencjami [[licencja BSD|BSD]], [[GNU Free Documentation License|GNU FDL]] oraz [[Licencja Wolnej Sztuki|FAL]] (czyli może być wykorzystana w tak licencjonowanych dziełach), natomiast każda licencja zawierająca warunek No Derivative lub Noncommercial nie jest zgodna z żadną z nich, w sensie, że treści udostępnione licencjami CC-BY można też objąć licencjami BSD, GNU FDL i wszystkimi innymi o ile tylko zapewniają one obowiązek podania źródła i autorów treści pierwotnej. Natomiast w drugą stronę zgodność ta nie działa, to znaczy nie można przenosić treści opartych na licencji GNU FDL, BSD i FAL do licencji CC-BY.
Wariant ''Share Alike'' do wersji licencji Creative Commons 2.5 i GNU FDL 1.2 były z sobą niezgodne, co oznacza, że np. na Wikipedii nie można korzystać z tekstów dostępnych na licencjach CC-BY-SA do wersji 2.5. Dzięki współpracy Creative Commons i [[Free Software Foundation]] udało się uzgodnić taką treść licencji CC-BY-SA 3.0 i GNU FDL 1.3, że stały się one niemal w pełni kompatybilne w obie strony<ref>[http://linuxnews.pl/gfdl-nareszcie-zgodna-z-cc-by-sa/ Kocio, ''GFDL nareszcie (prawie) zgodna z CC BY-SA!'', Linux News].</ref>.
== Wykorzystanie ==
Serwisy funkcjonujące pod skrzydłami [[Wikimedia Foundation]] oprócz GNU FDL wykorzystują też licencje Creative Commons. W ramach projektów Wikimedia dozwolone jest użycie licencji CC, które zostały zaaprobowane do użycia dla twórczości zaliczanej do [[Ruch wolnej kultury|wolnej kultury]] (CC-BY, CC-BY-SA i CC0)<ref>[http://freedomdefined.org/Definition Definicja wolnej kultury].</ref>, natomiast niedopuszczalne są licencje typu NC i ND<ref>[http://commons.wikimedia.org/wiki/Commons:Licensing Commons:Licensing].</ref>. W projekcie [[Wikimedia Commons]] znajduje się ponad 16 milionów plików na licencjach CC. Projekt [[Wikinews]] w całości jest oparty na licencji CC-BY 2.5.<ref>[http://pl.wikinews.org/wiki/Wikinews:Warunki_u%C5%BCycia Wikinews:Warunki użycia].</ref>
W skali całego internetu na licencjach Creative Commons znajduje się co najmniej sto milionów plików. Najpopularniejsze licencje to używana w przypadku 37% utworów licencja BY-NC-SA oraz BY-NC-ND (18% licencjonowanych utworów). W sumie 2/3 licencji zezwala jedynie na użycie niekomercyjne, a 1/3 nie zezwala na tworzenie utworów zależnych{{fakt|data=2010-03}}.
== Zalety ==
W stosunku do GNU FDL zaletą jest niewątpliwie brak obciążeń przy drukowaniu – teksty na licencjach Creative Commons nie muszą podawać pełnego tekstu licencji. Wystarczy w zastępstwie podać link do treści licencji.
== Krytyka licencji Creative Commons ==
Niektórzy członkowie środowiska [[Wolne Oprogramowanie|wolnego oprogramowania]] krytykują [[Creative Commons]] za brak wyraźnie wytyczonych wartości lub warunków, które winny spełniać wszystkie licencje. W szczególności obiektem krytyki są licencje, które zastrzegają prawa, które zdaniem tych krytyków nie mogą podlegać zastrzeżeniu ze względów etycznych bądź moralnych. Krytycy wskazują również na brak zgodności licencji Creative Commons z [[Wolne oprogramowanie#Licencje|licencjami wolnego oprogramowania]].
Według środowiska [[Debian]]a licencje te w wersji 2.0 nie spełniają [[Wytyczne Debiana dotyczące Wolnego Oprogramowania|Wytycznych Debiana dotyczących Wolnego Oprogramowania]] ze względu na pewne wady już w warunku uznania autorstwa<ref>{{cytuj stronę|tytuł=Debian-legal Summary of Creative Commons 2.0 Licenses|data=3 kwietnia 2005|url=http://web.archive.org/web/*/http://people.debian.org/~evan/ccsummary|data dostępu=2008-03-29, 12:13}}</ref>. [[Free Software Foundation]] uważa, że samo określenie Creative Commons jest nieścisłe, ponieważ nie istnieje żadna swoboda, jaką wszystkie te licencje by zapewniały (chociaż uważa CC-BY-SA 2.0 za wolną licencję copyleftową) i zaleca zamiast nich [[Licencja Wolnej Sztuki|Free Art License]]<ref>{{cytuj stronę|opublikowany=Projekt GNU|tytuł=Rozmaite licencje i komentarze na ich temat|url=http://www.gnu.org/licenses/license-list.pl.html#TOCOtherLicenses|data dostępu=2008-03-29, 12:13}}</ref>.
Zgodnie z [[Definicja Wolnych Dóbr Kultury|Definicją Wolnych Dóbr Kultury]] tylko część licencji Creative Commons może być uznana za rzeczywiście wolne. Są to<ref>{{cytuj stronę | url = http://freedomdefined.org/Licenses#List_of_licenses | tytuł = Licenses | opublikowany = freedomdefined.org | język = en | data dostępu = 2013-02-03}}</ref>:
* CC-0
* CC-BY
* CC-BY-SA
Pozostałe licencje Creative Commons są uważane za niezgodne z ideą pełnej [[Otwarta treść|otwartości]] zasobów.
{{Przypisy}}
== Linki zewnętrzne ==
{{commonscat|Creative Commons licenses|materiały na licencjach Creative Commons}}
* [http://creativecommons.org/licenses/ Pełny wybór licencji na stronie Creative Commons]
* [http://creativecommons.org/license/?lang=pl Formularz ułatwiający wybór odpowiedniej licencji]
* [http://prawo.vagla.pl/node/7830 „Dlaczego jestem sceptycznie nastawiony do CC – zamówiona przez czytelników odpowiedź”] (artykuł [[Piotr Waglowski|Piotra Waglowskiego]])
* [http://orka.sejm.gov.pl/WydBAS.nsf/0/E66C1989A16584B3C12578DC00309F0F/$file/Infos_90.pdf Piotr Wasilewski ''Creative Commons - erozja czy rozwój prawa autorskiego"], [[Infos|"Infos"]] Nr 20/2010, Biuro Analiz Sejmowych Kancelarii Sejmu
{{Prawa autorskie}}
[[Kategoria:Licencje|Creative, Commons]]
b886e386141759efb6805ee9bdafc8577dd3528c
76
74
2014-01-15T23:45:11Z
Ffkapa
2
Ffkapa przeniósł stronę [[Creative Commons]] na [[Licencje Creative Commons]] w miejsce przekierowania
wikitext
text/x-wiki
[[Plik:CC some rights reserved.svg|thumb|„Pewne prawa zastrzeżone”]]
[[Plik:CC some rights reserved PL.svg|thumb|Polska wersja]]
'''Creative Commons''' – amerykańska [[Organizacja non-profit|organizacja typu non-profit]], która postawiła sobie za zadanie uzyskanie kompromisu pomiędzy pełną ochroną praw autorskich a dzieleniem się twórczością z innymi. Głównym celem organizacji jest wspieranie rozwoju i wykorzystania otwartych licencji prawnoautorskich, zapewniających bardziej elastyczne i liberalne zasady niż restrykcyjne, domyślne reguły prawa autorskiego. Używając hasła „pewne prawa zastrzeżone” (ang. ''some rights reserved''), w opozycji do „wszelkie prawa zastrzeżone” (ang. ''all rights reserved''), organizacja stara się zapewnić twórcom jak najlepszą ochronę ich praw przy jednoczesnym umożliwieniu jak najszerszego wykorzystania ich dzieł.
Zbiór licencji Creative Commons pozwola licencjodawcy z nich korzystających udzielić za wczasu licencjobiorcom określonych praw do korzystania z licencjonowanego utworu. [[Utwór|Utwory]] na licencjach Creative Commons mogą więc być wykorzystywana bez konieczności uzyskania każdorazowej, indywidualnej zgody od właściciela praw autorskich.
Zakres udzielonych praw jest zależny od wybranej licencji. Jest ich sześć i różnią się szczegółowymi warunkami, na jakich licencjonowany jest utwór. Początkowo podstawowe wersje licencji były zgodne z amerykańskim systemem prawa, a jednocześnie potencjalnie niezgodne z zasadami obowiązującymi w innych krajach. By rozwiązać ten problem, Creative Commons wprowadziło mechanizm dostosowywania (ang. ''porting'') licencji do poszczególnych [[jurysdykcja|jurysdykcji]]. Od wersji 2.5 licencji podstawowe wersje licencji Creative Commons (poczatkowo nazywane „Generic” a obecnie „Unported”. są zgodne z przepisami międzynarodowych porozumień dotyczących prawa autorskiego. Wersje te są następnie dostosowywane do prawodawstwa poszczególnych jurysdykcji.
Creative Commons została utworzona w 2001. Jej głównym założycielem i pierwszym przewodniczącym rady dyrektorów był [[Lawrence Lessig]].
Z licencji Creative Commons jako narzędzia korzysta sama Wikipedia - co do zasady treść Wikipedii jest udostępniana na licencji Creative Commons Uznanie autorstwa - Na tych samych warunkach<ref>[[Wikipedia:Prawa autorskie]]</ref>.
== Rodzaje licencji Creative Commons ==
Istnieje sześć [[licencje Creative Commons|licencji Creative Commons]], a określone przez nie zasady licencjonowania utworu zależą od wykorzystanej kombinacji czterech podstawowych warunków. Warunki licencyjne są jak elementy składowe – zasady określone przez daną licencję są wynikiem złożenia razem dwóch lub trzech takich warunków, przy czym warunek ''Uznanie autorstwa'' jest obecny w każdej licencji (i wynika z poszanowania [[autorskie prawa osobiste|autorskich praw osobistych]]. Cztery podstawowe warunki licencji CC to:
* '''Uznanie autorstwa.''' Wolno kopiować, rozprowadzać, przedstawiać i wykonywać objęty prawem autorskim utwór oraz opracowane na jego podstawie utwory zależne pod warunkiem, że zostanie przywołane nazwisko autora pierwowzoru.
* '''Użycie niekomercyjne.''' Wolno kopiować, rozprowadzać, przedstawiać i wykonywać objęty prawem autorskim utwór oraz opracowane na jego podstawie utwory zależne jedynie do celów niekomercyjnych.
* '''Na tych samych warunkach. '''Wolno rozprowadzać utwory zależne jedynie na licencji identycznej do tej, na jakiej udostępniono utwór oryginalny.
* '''Bez utworów zależnych.''' Wolno kopiować, rozprowadzać, przedstawiać i wykonywać utwór jedynie w jego oryginalnej postaci – tworzenie utworów zależnych nie jest dozwolone.
Creative Commons oferuje dodatkowe narzędzie o nazwie ''Creative Commons Zero'' (CC0), umożliwiające zastosowanie reguły ''Brak praw zastrzeżonych''<ref>https://creativecommons.org/about/cc0</ref>. Z punktu widzenia prawa CC0 nie jest licencją, tylko dokumentem umożliwiającym zrzeczenie się praw autorskich. CC0 zawiera dodatkowy mechanizm licencyjny, dzięki któremu można zrzec się tak szerokiego zakresu praw, na jaki pozwala miejscowe prawodawstwo. W wielu bowiem państwach, w tym w Polsce, zrzeczenie się praw autorskich nie jest możliwe. Innymi słowy, celem Creative Commons Zero jest przekazywanie utworów do [[domena publiczna|domeny publicznej]] (tam gdzie jest to możliwe) lub najszersze możliwe zrzeczenie się praw.
Kolejnym narzędziem opracowanym przez Creative Commons jest ''Public Domain Mark'' służące oznaczeniu utworów, o których wiadomo, że nie istnieją wobec nich prawa autorskie lub prawa te wygasły<ref>https://creativecommons.org/about/pdm</ref>. Innymi słowy, Public Domain Mark służy oznaczaniu utworów znajdujących się już w domenie publicznej.
Wszystkie oferowane przez Creative Commons licencje i narzędzia są darmowe. Licencje Creative Commons oraz narzędzia takie jak CC0 lub Public Domain Mark umożliwiają opisanie w sposób standardowy stanu prawnego utworu i warunków jego wykorzystania. W celu zwiększenia przejrzystości informacji licencyjnej Creative Commons oferuje tak zwane przystępne podsumowania umów licencyjnych, zestaw ikon opisujących warunki licencyjne oraz metadane do odczytu maszynowego, zapisane w standardzie [[Resource Description Framework|RDF]].
== Działalność międzynarodowa ==
Organizacja Creative Commons pracuje na zasadzie projektowej z ponad stoma organizacjami na całym świecie, które jako partnerzy instytucjonalni prowadzą w swoich krajach oddziały Creative Commons. Projekty te działają w ramach zarządzanej przez Creative Commons „siatki współpracowników” (''Affiliate Network''). Podstawowym celem instytucji partnerskich jest lokalizacja licencji – dostosowywanie wyjściowych licencji do specyfiki prawa poszczególnych krajów. Do wersji 2.5 licencji podstawową ich wersją były licencje przystosowane do prawodawstwa amerykańskiego (tzw. wersja ''generic''). Od wersji 3.0, przyjętej w 2007 roku, podstawowa wersja (tzw. wersja ''Unported'') jest wersją opartą na prawodawstwie międzynarodowym.
W 2013 roku organizacje partnerskie prowadziły projekty Creative Commons w 76 krajach. W większości z nich licencje zostały już zlokalizowane i mogą być używane zgodnie z prawem krajowym<ref>[http://wiki.creativecommons.org/CC_Affiliate_Network „CC Affiliate Network”].</ref>.
=== Polski oddział CC ===
W kwietniu 2005 rozpoczął działalność polski oddział Creative Commons. Partnerami instytucjonalnymi projektu są organizacja pozarządowa Centrum Cyfrowe przy Fundacji [[Projekt: Polska]] oraz [[Interdyscyplinarne Centrum Modelowania Matematycznego i Komputerowego Uniwersytetu Warszawskiego|Interdyscyplinarne Centrum Modelowania Matematycznego i Komputerowego]] na [[Uniwersytet Warszawski|Uniwersytecie Warszawskim]].
Uprzednio partnerami instytucjonalnymi Creative Commons Polska była [[Fundacja Otwarty Kod Kultury]], [[Wydział Prawa i Administracji Uniwersytetu Jagiellońskiego]] oraz Kancelaria Prawna Grynhoff Woźny Wspólnicy. CC-Polska jest członkiem-założycielem [[Koalicja Otwartej Edukacji|Koalicji Otwartej Edukacji]] (2008).
Zespół polskiego oddziału tworzą koordynatorzy [[Alek Tarkowski]], [[Justyna Hofmokl]] i Kamil Śliwowski oraz prawnicy [[Krzysztof Siewicz]] i Helena Rymar, wraz ze współpracownikami<ref>[http://creativecommons.pl/o-nas/ „O nas”].</ref>.
== Zobacz też ==
{{commonscat|Creative Commons icons|ikony CC}}
{{commons|Commons:Oznaczenia_licencji#Wolne_licencje_Creative_Commons|wolne licencje CC}}
{{Wikiźródła|tekst=nie|kategoria:Creative Commons}}
{{wikinews|Czy ZAiKS będzie pobierać opłaty za słuchanie utworów na licencji Creative Commons?}}
* [[Science Commons]]
* [[Ruch wolnej kultury]]
* [[Otwarta treść]]
{{Przypisy}}
== Linki zewnętrzne ==
* [http://creativecommons.pl/ Creative Commons Polska]
* [http://creativecommons.org/ Creative Commons – centrala]
* [[b:W świetle GNU|W świetle GNU – historia idei GNU i analiza jej rozwoju]] – na [[Wikibooks]]
* [[jurysdykcja|Filmy prezentujące idee dzielenia się utworami oraz współtworzenia]]
{{Prawa autorskie}}
[[Kategoria:Międzynarodowe organizacje pozarządowe]]
[[Kategoria:Organizacje prawnicze]]
[[Kategoria:Prawo własności intelektualnej]]
0cede53436c51ab18f22bf8e675a92848e899364
74
73
2014-01-15T23:42:30Z
Ffkapa
2
Ffkapa przeniósł stronę [[Licencje Creative Commons]] do [[Creative Commons]]
wikitext
text/x-wiki
[[Plik:CC some rights reserved.svg|thumb|„Pewne prawa zastrzeżone”]]
[[Plik:CC some rights reserved PL.svg|thumb|Polska wersja]]
'''Creative Commons''' – amerykańska [[Organizacja non-profit|organizacja typu non-profit]], która postawiła sobie za zadanie uzyskanie kompromisu pomiędzy pełną ochroną praw autorskich a dzieleniem się twórczością z innymi. Głównym celem organizacji jest wspieranie rozwoju i wykorzystania otwartych licencji prawnoautorskich, zapewniających bardziej elastyczne i liberalne zasady niż restrykcyjne, domyślne reguły prawa autorskiego. Używając hasła „pewne prawa zastrzeżone” (ang. ''some rights reserved''), w opozycji do „wszelkie prawa zastrzeżone” (ang. ''all rights reserved''), organizacja stara się zapewnić twórcom jak najlepszą ochronę ich praw przy jednoczesnym umożliwieniu jak najszerszego wykorzystania ich dzieł.
Zbiór licencji Creative Commons pozwola licencjodawcy z nich korzystających udzielić za wczasu licencjobiorcom określonych praw do korzystania z licencjonowanego utworu. [[Utwór|Utwory]] na licencjach Creative Commons mogą więc być wykorzystywana bez konieczności uzyskania każdorazowej, indywidualnej zgody od właściciela praw autorskich.
Zakres udzielonych praw jest zależny od wybranej licencji. Jest ich sześć i różnią się szczegółowymi warunkami, na jakich licencjonowany jest utwór. Początkowo podstawowe wersje licencji były zgodne z amerykańskim systemem prawa, a jednocześnie potencjalnie niezgodne z zasadami obowiązującymi w innych krajach. By rozwiązać ten problem, Creative Commons wprowadziło mechanizm dostosowywania (ang. ''porting'') licencji do poszczególnych [[jurysdykcja|jurysdykcji]]. Od wersji 2.5 licencji podstawowe wersje licencji Creative Commons (poczatkowo nazywane „Generic” a obecnie „Unported”. są zgodne z przepisami międzynarodowych porozumień dotyczących prawa autorskiego. Wersje te są następnie dostosowywane do prawodawstwa poszczególnych jurysdykcji.
Creative Commons została utworzona w 2001. Jej głównym założycielem i pierwszym przewodniczącym rady dyrektorów był [[Lawrence Lessig]].
Z licencji Creative Commons jako narzędzia korzysta sama Wikipedia - co do zasady treść Wikipedii jest udostępniana na licencji Creative Commons Uznanie autorstwa - Na tych samych warunkach<ref>[[Wikipedia:Prawa autorskie]]</ref>.
== Rodzaje licencji Creative Commons ==
Istnieje sześć [[licencje Creative Commons|licencji Creative Commons]], a określone przez nie zasady licencjonowania utworu zależą od wykorzystanej kombinacji czterech podstawowych warunków. Warunki licencyjne są jak elementy składowe – zasady określone przez daną licencję są wynikiem złożenia razem dwóch lub trzech takich warunków, przy czym warunek ''Uznanie autorstwa'' jest obecny w każdej licencji (i wynika z poszanowania [[autorskie prawa osobiste|autorskich praw osobistych]]. Cztery podstawowe warunki licencji CC to:
* '''Uznanie autorstwa.''' Wolno kopiować, rozprowadzać, przedstawiać i wykonywać objęty prawem autorskim utwór oraz opracowane na jego podstawie utwory zależne pod warunkiem, że zostanie przywołane nazwisko autora pierwowzoru.
* '''Użycie niekomercyjne.''' Wolno kopiować, rozprowadzać, przedstawiać i wykonywać objęty prawem autorskim utwór oraz opracowane na jego podstawie utwory zależne jedynie do celów niekomercyjnych.
* '''Na tych samych warunkach. '''Wolno rozprowadzać utwory zależne jedynie na licencji identycznej do tej, na jakiej udostępniono utwór oryginalny.
* '''Bez utworów zależnych.''' Wolno kopiować, rozprowadzać, przedstawiać i wykonywać utwór jedynie w jego oryginalnej postaci – tworzenie utworów zależnych nie jest dozwolone.
Creative Commons oferuje dodatkowe narzędzie o nazwie ''Creative Commons Zero'' (CC0), umożliwiające zastosowanie reguły ''Brak praw zastrzeżonych''<ref>https://creativecommons.org/about/cc0</ref>. Z punktu widzenia prawa CC0 nie jest licencją, tylko dokumentem umożliwiającym zrzeczenie się praw autorskich. CC0 zawiera dodatkowy mechanizm licencyjny, dzięki któremu można zrzec się tak szerokiego zakresu praw, na jaki pozwala miejscowe prawodawstwo. W wielu bowiem państwach, w tym w Polsce, zrzeczenie się praw autorskich nie jest możliwe. Innymi słowy, celem Creative Commons Zero jest przekazywanie utworów do [[domena publiczna|domeny publicznej]] (tam gdzie jest to możliwe) lub najszersze możliwe zrzeczenie się praw.
Kolejnym narzędziem opracowanym przez Creative Commons jest ''Public Domain Mark'' służące oznaczeniu utworów, o których wiadomo, że nie istnieją wobec nich prawa autorskie lub prawa te wygasły<ref>https://creativecommons.org/about/pdm</ref>. Innymi słowy, Public Domain Mark służy oznaczaniu utworów znajdujących się już w domenie publicznej.
Wszystkie oferowane przez Creative Commons licencje i narzędzia są darmowe. Licencje Creative Commons oraz narzędzia takie jak CC0 lub Public Domain Mark umożliwiają opisanie w sposób standardowy stanu prawnego utworu i warunków jego wykorzystania. W celu zwiększenia przejrzystości informacji licencyjnej Creative Commons oferuje tak zwane przystępne podsumowania umów licencyjnych, zestaw ikon opisujących warunki licencyjne oraz metadane do odczytu maszynowego, zapisane w standardzie [[Resource Description Framework|RDF]].
== Działalność międzynarodowa ==
Organizacja Creative Commons pracuje na zasadzie projektowej z ponad stoma organizacjami na całym świecie, które jako partnerzy instytucjonalni prowadzą w swoich krajach oddziały Creative Commons. Projekty te działają w ramach zarządzanej przez Creative Commons „siatki współpracowników” (''Affiliate Network''). Podstawowym celem instytucji partnerskich jest lokalizacja licencji – dostosowywanie wyjściowych licencji do specyfiki prawa poszczególnych krajów. Do wersji 2.5 licencji podstawową ich wersją były licencje przystosowane do prawodawstwa amerykańskiego (tzw. wersja ''generic''). Od wersji 3.0, przyjętej w 2007 roku, podstawowa wersja (tzw. wersja ''Unported'') jest wersją opartą na prawodawstwie międzynarodowym.
W 2013 roku organizacje partnerskie prowadziły projekty Creative Commons w 76 krajach. W większości z nich licencje zostały już zlokalizowane i mogą być używane zgodnie z prawem krajowym<ref>[http://wiki.creativecommons.org/CC_Affiliate_Network „CC Affiliate Network”].</ref>.
=== Polski oddział CC ===
W kwietniu 2005 rozpoczął działalność polski oddział Creative Commons. Partnerami instytucjonalnymi projektu są organizacja pozarządowa Centrum Cyfrowe przy Fundacji [[Projekt: Polska]] oraz [[Interdyscyplinarne Centrum Modelowania Matematycznego i Komputerowego Uniwersytetu Warszawskiego|Interdyscyplinarne Centrum Modelowania Matematycznego i Komputerowego]] na [[Uniwersytet Warszawski|Uniwersytecie Warszawskim]].
Uprzednio partnerami instytucjonalnymi Creative Commons Polska była [[Fundacja Otwarty Kod Kultury]], [[Wydział Prawa i Administracji Uniwersytetu Jagiellońskiego]] oraz Kancelaria Prawna Grynhoff Woźny Wspólnicy. CC-Polska jest członkiem-założycielem [[Koalicja Otwartej Edukacji|Koalicji Otwartej Edukacji]] (2008).
Zespół polskiego oddziału tworzą koordynatorzy [[Alek Tarkowski]], [[Justyna Hofmokl]] i Kamil Śliwowski oraz prawnicy [[Krzysztof Siewicz]] i Helena Rymar, wraz ze współpracownikami<ref>[http://creativecommons.pl/o-nas/ „O nas”].</ref>.
== Zobacz też ==
{{commonscat|Creative Commons icons|ikony CC}}
{{commons|Commons:Oznaczenia_licencji#Wolne_licencje_Creative_Commons|wolne licencje CC}}
{{Wikiźródła|tekst=nie|kategoria:Creative Commons}}
{{wikinews|Czy ZAiKS będzie pobierać opłaty za słuchanie utworów na licencji Creative Commons?}}
* [[Science Commons]]
* [[Ruch wolnej kultury]]
* [[Otwarta treść]]
{{Przypisy}}
== Linki zewnętrzne ==
* [http://creativecommons.pl/ Creative Commons Polska]
* [http://creativecommons.org/ Creative Commons – centrala]
* [[b:W świetle GNU|W świetle GNU – historia idei GNU i analiza jej rozwoju]] – na [[Wikibooks]]
* [[jurysdykcja|Filmy prezentujące idee dzielenia się utworami oraz współtworzenia]]
{{Prawa autorskie}}
[[Kategoria:Międzynarodowe organizacje pozarządowe]]
[[Kategoria:Organizacje prawnicze]]
[[Kategoria:Prawo własności intelektualnej]]
0cede53436c51ab18f22bf8e675a92848e899364
73
2014-01-15T23:40:39Z
Ffkapa
2
Nowa strona
wikitext
text/x-wiki
[[Plik:CC some rights reserved.svg|thumb|„Pewne prawa zastrzeżone”]]
[[Plik:CC some rights reserved PL.svg|thumb|Polska wersja]]
'''Creative Commons''' – amerykańska [[Organizacja non-profit|organizacja typu non-profit]], która postawiła sobie za zadanie uzyskanie kompromisu pomiędzy pełną ochroną praw autorskich a dzieleniem się twórczością z innymi. Głównym celem organizacji jest wspieranie rozwoju i wykorzystania otwartych licencji prawnoautorskich, zapewniających bardziej elastyczne i liberalne zasady niż restrykcyjne, domyślne reguły prawa autorskiego. Używając hasła „pewne prawa zastrzeżone” (ang. ''some rights reserved''), w opozycji do „wszelkie prawa zastrzeżone” (ang. ''all rights reserved''), organizacja stara się zapewnić twórcom jak najlepszą ochronę ich praw przy jednoczesnym umożliwieniu jak najszerszego wykorzystania ich dzieł.
Zbiór licencji Creative Commons pozwola licencjodawcy z nich korzystających udzielić za wczasu licencjobiorcom określonych praw do korzystania z licencjonowanego utworu. [[Utwór|Utwory]] na licencjach Creative Commons mogą więc być wykorzystywana bez konieczności uzyskania każdorazowej, indywidualnej zgody od właściciela praw autorskich.
Zakres udzielonych praw jest zależny od wybranej licencji. Jest ich sześć i różnią się szczegółowymi warunkami, na jakich licencjonowany jest utwór. Początkowo podstawowe wersje licencji były zgodne z amerykańskim systemem prawa, a jednocześnie potencjalnie niezgodne z zasadami obowiązującymi w innych krajach. By rozwiązać ten problem, Creative Commons wprowadziło mechanizm dostosowywania (ang. ''porting'') licencji do poszczególnych [[jurysdykcja|jurysdykcji]]. Od wersji 2.5 licencji podstawowe wersje licencji Creative Commons (poczatkowo nazywane „Generic” a obecnie „Unported”. są zgodne z przepisami międzynarodowych porozumień dotyczących prawa autorskiego. Wersje te są następnie dostosowywane do prawodawstwa poszczególnych jurysdykcji.
Creative Commons została utworzona w 2001. Jej głównym założycielem i pierwszym przewodniczącym rady dyrektorów był [[Lawrence Lessig]].
Z licencji Creative Commons jako narzędzia korzysta sama Wikipedia - co do zasady treść Wikipedii jest udostępniana na licencji Creative Commons Uznanie autorstwa - Na tych samych warunkach<ref>[[Wikipedia:Prawa autorskie]]</ref>.
== Rodzaje licencji Creative Commons ==
Istnieje sześć [[licencje Creative Commons|licencji Creative Commons]], a określone przez nie zasady licencjonowania utworu zależą od wykorzystanej kombinacji czterech podstawowych warunków. Warunki licencyjne są jak elementy składowe – zasady określone przez daną licencję są wynikiem złożenia razem dwóch lub trzech takich warunków, przy czym warunek ''Uznanie autorstwa'' jest obecny w każdej licencji (i wynika z poszanowania [[autorskie prawa osobiste|autorskich praw osobistych]]. Cztery podstawowe warunki licencji CC to:
* '''Uznanie autorstwa.''' Wolno kopiować, rozprowadzać, przedstawiać i wykonywać objęty prawem autorskim utwór oraz opracowane na jego podstawie utwory zależne pod warunkiem, że zostanie przywołane nazwisko autora pierwowzoru.
* '''Użycie niekomercyjne.''' Wolno kopiować, rozprowadzać, przedstawiać i wykonywać objęty prawem autorskim utwór oraz opracowane na jego podstawie utwory zależne jedynie do celów niekomercyjnych.
* '''Na tych samych warunkach. '''Wolno rozprowadzać utwory zależne jedynie na licencji identycznej do tej, na jakiej udostępniono utwór oryginalny.
* '''Bez utworów zależnych.''' Wolno kopiować, rozprowadzać, przedstawiać i wykonywać utwór jedynie w jego oryginalnej postaci – tworzenie utworów zależnych nie jest dozwolone.
Creative Commons oferuje dodatkowe narzędzie o nazwie ''Creative Commons Zero'' (CC0), umożliwiające zastosowanie reguły ''Brak praw zastrzeżonych''<ref>https://creativecommons.org/about/cc0</ref>. Z punktu widzenia prawa CC0 nie jest licencją, tylko dokumentem umożliwiającym zrzeczenie się praw autorskich. CC0 zawiera dodatkowy mechanizm licencyjny, dzięki któremu można zrzec się tak szerokiego zakresu praw, na jaki pozwala miejscowe prawodawstwo. W wielu bowiem państwach, w tym w Polsce, zrzeczenie się praw autorskich nie jest możliwe. Innymi słowy, celem Creative Commons Zero jest przekazywanie utworów do [[domena publiczna|domeny publicznej]] (tam gdzie jest to możliwe) lub najszersze możliwe zrzeczenie się praw.
Kolejnym narzędziem opracowanym przez Creative Commons jest ''Public Domain Mark'' służące oznaczeniu utworów, o których wiadomo, że nie istnieją wobec nich prawa autorskie lub prawa te wygasły<ref>https://creativecommons.org/about/pdm</ref>. Innymi słowy, Public Domain Mark służy oznaczaniu utworów znajdujących się już w domenie publicznej.
Wszystkie oferowane przez Creative Commons licencje i narzędzia są darmowe. Licencje Creative Commons oraz narzędzia takie jak CC0 lub Public Domain Mark umożliwiają opisanie w sposób standardowy stanu prawnego utworu i warunków jego wykorzystania. W celu zwiększenia przejrzystości informacji licencyjnej Creative Commons oferuje tak zwane przystępne podsumowania umów licencyjnych, zestaw ikon opisujących warunki licencyjne oraz metadane do odczytu maszynowego, zapisane w standardzie [[Resource Description Framework|RDF]].
== Działalność międzynarodowa ==
Organizacja Creative Commons pracuje na zasadzie projektowej z ponad stoma organizacjami na całym świecie, które jako partnerzy instytucjonalni prowadzą w swoich krajach oddziały Creative Commons. Projekty te działają w ramach zarządzanej przez Creative Commons „siatki współpracowników” (''Affiliate Network''). Podstawowym celem instytucji partnerskich jest lokalizacja licencji – dostosowywanie wyjściowych licencji do specyfiki prawa poszczególnych krajów. Do wersji 2.5 licencji podstawową ich wersją były licencje przystosowane do prawodawstwa amerykańskiego (tzw. wersja ''generic''). Od wersji 3.0, przyjętej w 2007 roku, podstawowa wersja (tzw. wersja ''Unported'') jest wersją opartą na prawodawstwie międzynarodowym.
W 2013 roku organizacje partnerskie prowadziły projekty Creative Commons w 76 krajach. W większości z nich licencje zostały już zlokalizowane i mogą być używane zgodnie z prawem krajowym<ref>[http://wiki.creativecommons.org/CC_Affiliate_Network „CC Affiliate Network”].</ref>.
=== Polski oddział CC ===
W kwietniu 2005 rozpoczął działalność polski oddział Creative Commons. Partnerami instytucjonalnymi projektu są organizacja pozarządowa Centrum Cyfrowe przy Fundacji [[Projekt: Polska]] oraz [[Interdyscyplinarne Centrum Modelowania Matematycznego i Komputerowego Uniwersytetu Warszawskiego|Interdyscyplinarne Centrum Modelowania Matematycznego i Komputerowego]] na [[Uniwersytet Warszawski|Uniwersytecie Warszawskim]].
Uprzednio partnerami instytucjonalnymi Creative Commons Polska była [[Fundacja Otwarty Kod Kultury]], [[Wydział Prawa i Administracji Uniwersytetu Jagiellońskiego]] oraz Kancelaria Prawna Grynhoff Woźny Wspólnicy. CC-Polska jest członkiem-założycielem [[Koalicja Otwartej Edukacji|Koalicji Otwartej Edukacji]] (2008).
Zespół polskiego oddziału tworzą koordynatorzy [[Alek Tarkowski]], [[Justyna Hofmokl]] i Kamil Śliwowski oraz prawnicy [[Krzysztof Siewicz]] i Helena Rymar, wraz ze współpracownikami<ref>[http://creativecommons.pl/o-nas/ „O nas”].</ref>.
== Zobacz też ==
{{commonscat|Creative Commons icons|ikony CC}}
{{commons|Commons:Oznaczenia_licencji#Wolne_licencje_Creative_Commons|wolne licencje CC}}
{{Wikiźródła|tekst=nie|kategoria:Creative Commons}}
{{wikinews|Czy ZAiKS będzie pobierać opłaty za słuchanie utworów na licencji Creative Commons?}}
* [[Science Commons]]
* [[Ruch wolnej kultury]]
* [[Otwarta treść]]
{{Przypisy}}
== Linki zewnętrzne ==
* [http://creativecommons.pl/ Creative Commons Polska]
* [http://creativecommons.org/ Creative Commons – centrala]
* [[b:W świetle GNU|W świetle GNU – historia idei GNU i analiza jej rozwoju]] – na [[Wikibooks]]
* [[jurysdykcja|Filmy prezentujące idee dzielenia się utworami oraz współtworzenia]]
{{Prawa autorskie}}
[[Kategoria:Międzynarodowe organizacje pozarządowe]]
[[Kategoria:Organizacje prawnicze]]
[[Kategoria:Prawo własności intelektualnej]]
0cede53436c51ab18f22bf8e675a92848e899364
Ludwik Czuryło
0
617
1112
2019-11-16T23:53:01Z
Ffkapa
2
Utworzono nową stronę "'''Ludwik Czuryło''' zarządca Górniego Dworu - [[Mapa dawnego Pnikuta|dom nr. 10]] == Rodzina == Ludwik Czuryło i żona Paulina z domu Sztaba == Dzieci == Stanisław..."
wikitext
text/x-wiki
'''Ludwik Czuryło''' zarządca Górniego Dworu - [[Mapa dawnego Pnikuta|dom nr. 10]]
== Rodzina ==
Ludwik Czuryło i żona Paulina z domu Sztaba
== Dzieci ==
Stanisław (1926), Zbigniew (1927), Aleksander (1930), Ryszard (1936)
== Górni Dwór ==
Zabudowania: dworek, spichlerz, stodoły, obora, stajnia dla koni
== Dzieje rodziny ==
* Ludwik był bratem Franciszka Czuryło, który ożenił się z siostrą Pauliny, Heleną Sztaba. Franciszek miał gospodarstwo za rzeką „za mostem”
* Zarządca Ludwik zmarł krótko przed II Wojną Światową, rozpoczętą napaścią 1.09.1939 r. Niemiec na Polskę.
* Kilkanaście dni później 17.09.1939r. na Polskę od wschodu napadła Armia Sowiecka. Dokonał się IV rozbiór Polski. Zbrodniczym traktatem tzw. Ribbentrop - Mołotow, zmowy Stalina z Hitlerem, Polska została podzielona: ruscy zajęli tereny od wschodu po San, a Niemcy resztę Kraju. Sytuacja pod nieoczekiwaną okupacją rosyjską w majątkach dworskich uległa dramatycznej zmianie. Zarządcy byli przez Sowietów usuwani a majątki konfiskowane.
* Paulina wdowa z dziećmi musiała opuścić pokoje w Dworku i zamieszkała w suterenach. Górne pomieszczenia zostały przeznaczone na szpital.
* Po ataku Niemców na ZSRR 22.06.1941r. Nowy okupant oddał rodzinie Pauliny część pomieszczeń na górze.
* W sierpniu 1944 r. Sowieckie wojska w marszu na zachód za cofającymi się Niemcami znów zajęli Dworek na kwatery a później na szpital. Paulina z dziećmi musiała opuścić Dworek i zamieszkała w domu Józefy Czuryło.
* Zbigniew zimą 1945 r. został powołany do wojska polskiego, jak wielu chłopaków ze wsi w tym wieku. Został zastrzelony przez ruskich podczas próby ucieczki z wagonu pod Jarosławcem z drugim chłopakiem Edwardem, synem Michała Muszak i Marii z Dolniego. Przypuszczalnie obaj chcieli uciec do oddziałów leśny
* Leszek, Stanisław i Ryszard przepadli gdzieś w głębi Rosji.
__notoc__
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Czuryłowie]]
2870e137977edbe176c7eda5566f7d1db77ecf08
Mapa dawnego Pnikuta
0
595
1077
2019-10-31T22:46:31Z
Ffkapa
2
Utworzono nową stronę "'''Mapa dawnego Pnikuta''' - mapa utworzona na podstawie wspomnień jego mieszkańców przed rokiem 1960."
wikitext
text/x-wiki
'''Mapa dawnego Pnikuta''' - mapa utworzona na podstawie wspomnień jego mieszkańców przed rokiem 1960.
538f38ed59a542d6bf93c5f0526334ff6e5a69dd
Marcin Rogała
0
607
1101
2019-11-16T22:49:39Z
Ffkapa
2
Utworzono nową stronę "'''Marcin Rogała''' – [[Mapa dawnego Pnikuta|dom nr. 2]] == Rodzina == Marcin Rogała i żona Tekla == Dzieci == Józef (przyd. „Bez uszka”) i Władysław == Dzie..."
wikitext
text/x-wiki
'''Marcin Rogała''' – [[Mapa dawnego Pnikuta|dom nr. 2]]
== Rodzina ==
Marcin Rogała i żona Tekla
== Dzieci ==
Józef (przyd. „Bez uszka”) i Władysław
== Dzieje rodziny ==
* Tekla pozostała w Pnikucie, brak wiadomości o synach.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Rogałowie]]
c0cb104604e90aa8e50943167c7be16449213acd
Michał Zarański
0
601
1091
1090
2019-11-16T21:03:40Z
Ffkapa
2
removed [[Category:Pietruszczakowie]]; added [[Category:Zarańscy]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
'''Michał Zarański''' - [[Mapa dawnego Pnikuta|dom nr. 3]]
== Rodzina ==
Zarański Michał, żona Katarzyna z domu Czuryło, zmarła 07.1939r.
== Dzieci ==
Jan (1901–1944) pochowany w Warszawie, Franciszek, Marcin (11.12.1903), nie mieli potomstwa, Władysław (29.07.1906), Stanisława (11.11.1918), Wiktoria zmarła w 1987, Zofia zmarła w 1948 (lub 51), Jadwiga (1915–1979 lub 85), Aniela (1912 – 1987).
== Dzieje rodziny ==
* Marcin ożenił się z Karoliną z domu Szuterlak, dzieci nie mieli.
* Wiktoria wyszła za mąż za Walentego Bazanowskiego z Dolniego za rzeką i zamieszkała u niego, mieli dzieci: Józefa 1927r., Zofia 1929r., Władysław 1930r., Sabina 1935r.
* Zofia wyszła za mąż za wdowca Marcina Mazura, zamieszkała w domu Marcina. Zofia urodziła syna Mieczysława, który był owocem związku z sąsiadem Michałem Koblem. Małżeństwo Michała Kobla i Marii z d. Buczek było bezdzietne i Zofia oddała im na wychowanie syna Mieczysława, jako rodzonemu ojcu. Chłopak wyrósł, skończył studia weterynaryjne i ożenił się z Ukrainką Nadieżdą, mieli 2 córki. Mietek zmarł nagle.
*Jan ożenił się z Józefą z domu Okapiec urodzoną w Ostapiu Koło Tarnopola i mieli 3 córki: Janina, Wanda i Józefa Urszula (1936); Jan odbywał obowiązkową służbę w wojsku w Przemyślu. Jego ojciec Michał akurat był tam zawodowym wojskowym i skierował syna do dalszej służby i na studia w Warszawie.
* Na pytanie jak Jan poznał Józefę pojawiła się podpowiedź: „Jan odbywał w wojsku ćwiczenia na wschodzie w okolicach Tarnowa i tam poznał Józefę i przyszłą żonę”. Rok 1944 r. jego zgonu kojarzy się nam nieodparcie z Powstaniem Warszawskim.
* Córka Józefa Urszula wyszła za mąż za Ryszarda Zawojskiego (1936) i urodziła im się Marzolena (Marzena) po mężu Poleska. Urszula mieszka w Jarosławcu.
* Franciszek ?
* Stanisława wyszła za mąż za Michała Mazura, mieli dwóch synów Kazimierza i Wacława, mieszkali w domu rodziców Michała, Tomasza i Ludwiki Mazur z domu Ziębowicz. Wyjechali w 1958 r. do Polski, Dargobądz i tam pomarli;
* Marcin ożenił się z Karoliną z d. Szuterlak z Łanu ( Krukienice ), dzieci nie mieli.
* Aniela natomiast wyszła za mąż za Jana Szuterlaka brata Karoliny – to była tzw. minianka; mieli 3 córki.
* Władysław jako 17 letni chłopak wyjechał do Francji, po kilku latach ożenił się tam z Cecylią z d. Kołodziej, mieli córkę Janinę (1933). Na krótko przyjechali z nią do Pnikuta i pozostawili na wychowanie siostrze Jadwidze i Marcinowi. Powrócili do Francji już na stałe z zamiarem zabrania jej po jakimś czasie. Wybuchła wojna w 1939 i córka pozostała w Pnikucie.
* Jadwiga wyszła za mąż za wdowca nazwisko Szuterlak do Krukienic, mieli 2 synów i córkę Janinę.
* W domu Zarańskich pozostał tylko Marcin Zarański i 18 letnia córka Władysława, Janina. W 1956r. wyjechali do Polski do Przemyśla. Rodzice Janiny ściągnęli ją do siebie do Francji, ale po roku wróciła do Przemyśla. Wyszła za mąż za W. Stelmacha, mieli 3 synów: Jana, Bolesława i Wiesława. Bolesław wyjechał do Austrii tam się ożenił. Zmarł mając 46 lat. Mąż zmarł 4 lata temu.
* Prawdopodobnie z tego domu nr 3 w Pnikucie pochodził Wojciech Zarański, który ożenił się z Franciszką Furman, córką Jana i Katarzyny i zamieszkał u żony w domu na Górnim za rzeką, poniżej wzgórza Zamczyska. Nie wiadomo, czy był synem Michała Zarańskiego.
* Wiadomo jeszcze, że córka Wiktorii Józefa wyszła za mąż za p. Romaniuka i ich córka Bronisława mieszka w Mościskach.
* Wanda – to ciotka Marzoleny.
* Bronisława Romaniuk, córka Józefy, Józefa to córka Walentego Bazanowskiego i Wiktorii z domu Zarańskiej (c. Michała).
* Obecnie w domu Zarańskich nr 3 mieszka Janina córka Jadwigi.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Zarańscy]]
8136f28d9d88faad12763db1b06e195905a7b746
1090
1088
2019-11-16T21:02:55Z
Ffkapa
2
wikitext
text/x-wiki
'''Michał Zarański''' - [[Mapa dawnego Pnikuta|dom nr. 3]]
== Rodzina ==
Zarański Michał, żona Katarzyna z domu Czuryło, zmarła 07.1939r.
== Dzieci ==
Jan (1901–1944) pochowany w Warszawie, Franciszek, Marcin (11.12.1903), nie mieli potomstwa, Władysław (29.07.1906), Stanisława (11.11.1918), Wiktoria zmarła w 1987, Zofia zmarła w 1948 (lub 51), Jadwiga (1915–1979 lub 85), Aniela (1912 – 1987).
== Dzieje rodziny ==
* Marcin ożenił się z Karoliną z domu Szuterlak, dzieci nie mieli.
* Wiktoria wyszła za mąż za Walentego Bazanowskiego z Dolniego za rzeką i zamieszkała u niego, mieli dzieci: Józefa 1927r., Zofia 1929r., Władysław 1930r., Sabina 1935r.
* Zofia wyszła za mąż za wdowca Marcina Mazura, zamieszkała w domu Marcina. Zofia urodziła syna Mieczysława, który był owocem związku z sąsiadem Michałem Koblem. Małżeństwo Michała Kobla i Marii z d. Buczek było bezdzietne i Zofia oddała im na wychowanie syna Mieczysława, jako rodzonemu ojcu. Chłopak wyrósł, skończył studia weterynaryjne i ożenił się z Ukrainką Nadieżdą, mieli 2 córki. Mietek zmarł nagle.
*Jan ożenił się z Józefą z domu Okapiec urodzoną w Ostapiu Koło Tarnopola i mieli 3 córki: Janina, Wanda i Józefa Urszula (1936); Jan odbywał obowiązkową służbę w wojsku w Przemyślu. Jego ojciec Michał akurat był tam zawodowym wojskowym i skierował syna do dalszej służby i na studia w Warszawie.
* Na pytanie jak Jan poznał Józefę pojawiła się podpowiedź: „Jan odbywał w wojsku ćwiczenia na wschodzie w okolicach Tarnowa i tam poznał Józefę i przyszłą żonę”. Rok 1944 r. jego zgonu kojarzy się nam nieodparcie z Powstaniem Warszawskim.
* Córka Józefa Urszula wyszła za mąż za Ryszarda Zawojskiego (1936) i urodziła im się Marzolena (Marzena) po mężu Poleska. Urszula mieszka w Jarosławcu.
* Franciszek ?
* Stanisława wyszła za mąż za Michała Mazura, mieli dwóch synów Kazimierza i Wacława, mieszkali w domu rodziców Michała, Tomasza i Ludwiki Mazur z domu Ziębowicz. Wyjechali w 1958 r. do Polski, Dargobądz i tam pomarli;
* Marcin ożenił się z Karoliną z d. Szuterlak z Łanu ( Krukienice ), dzieci nie mieli.
* Aniela natomiast wyszła za mąż za Jana Szuterlaka brata Karoliny – to była tzw. minianka; mieli 3 córki.
* Władysław jako 17 letni chłopak wyjechał do Francji, po kilku latach ożenił się tam z Cecylią z d. Kołodziej, mieli córkę Janinę (1933). Na krótko przyjechali z nią do Pnikuta i pozostawili na wychowanie siostrze Jadwidze i Marcinowi. Powrócili do Francji już na stałe z zamiarem zabrania jej po jakimś czasie. Wybuchła wojna w 1939 i córka pozostała w Pnikucie.
* Jadwiga wyszła za mąż za wdowca nazwisko Szuterlak do Krukienic, mieli 2 synów i córkę Janinę.
* W domu Zarańskich pozostał tylko Marcin Zarański i 18 letnia córka Władysława, Janina. W 1956r. wyjechali do Polski do Przemyśla. Rodzice Janiny ściągnęli ją do siebie do Francji, ale po roku wróciła do Przemyśla. Wyszła za mąż za W. Stelmacha, mieli 3 synów: Jana, Bolesława i Wiesława. Bolesław wyjechał do Austrii tam się ożenił. Zmarł mając 46 lat. Mąż zmarł 4 lata temu.
* Prawdopodobnie z tego domu nr 3 w Pnikucie pochodził Wojciech Zarański, który ożenił się z Franciszką Furman, córką Jana i Katarzyny i zamieszkał u żony w domu na Górnim za rzeką, poniżej wzgórza Zamczyska. Nie wiadomo, czy był synem Michała Zarańskiego.
* Wiadomo jeszcze, że córka Wiktorii Józefa wyszła za mąż za p. Romaniuka i ich córka Bronisława mieszka w Mościskach.
* Wanda – to ciotka Marzoleny.
* Bronisława Romaniuk, córka Józefy, Józefa to córka Walentego Bazanowskiego i Wiktorii z domu Zarańskiej (c. Michała).
* Obecnie w domu Zarańskich nr 3 mieszka Janina córka Jadwigi.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Pietruszczakowie]]
461114c27ebb3d0df3bebcb5d4ca8f3816259971
1088
2019-11-16T20:59:03Z
Ffkapa
2
Utworzono nową stronę "'''Michał Zarański''' - [[Mapa dawnego Pnikuta|dom nr. 3]] == Rodzina == Zarański Michał, żona Katarzyna z domu Czuryło, zmarła 07.1939r. == Dzieci == Jan (1901..."
wikitext
text/x-wiki
'''Michał Zarański''' - [[Mapa dawnego Pnikuta|dom nr. 3]]
== Rodzina ==
Zarański Michał, żona Katarzyna z domu Czuryło, zmarła 07.1939r.
== Dzieci ==
Jan (1901–1944) pochowany w Warszawie, Franciszek, Marcin (11.12.1903), nie mieli potomstwa, Władysław (29.07.1906), Stanisława (11.11.1918), Wiktoria zmarła w 1987, Zofia zmarła w 1948 (lub 51), Jadwiga (1915–1979 lub 85), Aniela (1912 – 1987).
== Dzieje rodziny ==
* Marcin ożenił się z Karoliną z domu Szuterlak, dzieci nie mieli.
* Wiktoria wyszła za mąż za Walentego Bazanowskiego z Dolniego za rzeką i zamieszkała u niego, mieli dzieci: Józefa 1927r., Zofia 1929r., Władysław 1930r., Sabina 1935r.
* Zofia wyszła za mąż za wdowca Marcina Mazura, zamieszkała w domu Marcina. Zofia urodziła syna Mieczysława, który był owocem związku z sąsiadem Michałem Koblem. Małżeństwo Michała Kobla i Marii z d. Buczek było bezdzietne i Zofia oddała im na wychowanie syna Mieczysława, jako rodzonemu ojcu. Chłopak wyrósł, skończył studia weterynaryjne i ożenił się z Ukrainką Nadieżdą, mieli 2 córki. Mietek zmarł nagle.
*Jan ożenił się z Józefą z domu Okapiec urodzoną w Ostapiu Koło Tarnopola i mieli 3 córki: Janina, Wanda i Józefa Urszula (1936); Jan odbywał obowiązkową służbę w wojsku w Przemyślu. Jego ojciec Michał akurat był tam zawodowym wojskowym i skierował syna do dalszej służby i na studia w Warszawie.
* Na pytanie jak Jan poznał Józefę pojawiła się podpowiedź: „Jan odbywał w wojsku ćwiczenia na wschodzie w okolicach Tarnowa i tam poznał Józefę i przyszłą żonę”. Rok 1944 r. jego zgonu kojarzy się nam nieodparcie z Powstaniem Warszawskim.
* Córka Józefa Urszula wyszła za mąż za Ryszarda Zawojskiego (1936) i urodziła im się Marzolena (Marzena) po mężu Poleska. Urszula mieszka w Jarosławcu.
* Franciszek ?
* Stanisława wyszła za mąż za Michała Mazura, mieli dwóch synów Kazimierza i Wacława, mieszkali w domu rodziców Michała, Tomasza i Ludwiki Mazur z domu Ziębowicz. Wyjechali w 1958 r. do Polski, Dargobądz i tam pomarli;
* Marcin ożenił się z Karoliną z d. Szuterlak z Łanu ( Krukienice ), dzieci nie mieli.
* Aniela natomiast wyszła za mąż za Jana Szuterlaka brata Karoliny – to była tzw. minianka; mieli 3 córki.
* Władysław jako 17 letni chłopak wyjechał do Francji, po kilku latach ożenił się tam z Cecylią z d. Kołodziej, mieli córkę Janinę (1933). Na krótko przyjechali z nią do Pnikuta i pozostawili na wychowanie siostrze Jadwidze i Marcinowi. Powrócili do Francji już na stałe z zamiarem zabrania jej po jakimś czasie. Wybuchła wojna w 1939 i córka pozostała w Pnikucie.
* Jadwiga wyszła za mąż za wdowca nazwisko Szuterlak do Krukienic, mieli 2 synów i córkę Janinę.
* W domu Zarańskich pozostał tylko Marcin Zarański i 18 letnia córka Władysława, Janina. W 1956r. wyjechali do Polski do Przemyśla. Rodzice Janiny ściągnęli ją do siebie do Francji, ale po roku wróciła do Przemyśla. Wyszła za mąż za W. Stelmacha, mieli 3 synów: Jana, Bolesława i Wiesława. Bolesław wyjechał do Austrii tam się ożenił. Zmarł mając 46 lat. Mąż zmarł 4 lata temu.
* Prawdopodobnie z tego domu nr 3 w Pnikucie pochodził Wojciech Zarański, który ożenił się z Franciszką Furman, córką Jana i Katarzyny i zamieszkał u żony w domu na Górnim za rzeką, poniżej wzgórza Zamczyska. Nie wiadomo, czy był synem Michała Zarańskiego.
* Wiadomo jeszcze, że córka Wiktorii Józefa wyszła za mąż za p. Romaniuka i ich córka Bronisława mieszka w Mościskach.
* Wanda – to ciotka Marzoleny.
* Bronisława Romaniuk, córka Józefy, Józefa to córka Walentego Bazanowskiego i Wiktorii z domu Zarańskiej (c. Michała).
* Obecnie w domu Zarańskich nr 3 mieszka Janina córka Jadwigi.
c7c157483c30062d34f9efe678e32b8d7e4031ef
Pnikut
0
147
1069
668
2018-04-03T08:58:04Z
Kazik
1
drobne merytoryczne
wikitext
text/x-wiki
{{Spis treści}}
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim]]<ref name=":18">{{Dziennik Ustaw|rok=1934|numer=64|pozycja=547}}</ref>. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
We wsi działa oddział [[Towarzystwo Kultury Polskiej Ziemi Lwowskiej|Towarzystwa Kultury Polskiej Ziemi Lwowskiej]]<ref>[http://tkpzl.lviv.ua/pl/pages/21/ Towarzystwo Kultury Polskiej Ziemi Lwowskiej]</ref>.
== Mieszkańcy ==
=== Zmiany demograficzne ===
Od najdawniejszych lat Pnikut zamieszkiwali głównie [[Polacy]]. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiają się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów<ref name=":15">L. Świtalski, Kronika Pnikuta, Pnikut 25.X.1905</ref>.
Około 1800 roku wieś zamieszkują 722 osoby<ref name=":15" />. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie [[Kościół rzymskokatolicki|kościoła rzymskokatolickiego]], 17 to [[Kościoły greckokatolickie|grekokatolicy]] a 41 to zwolennicy [[Judaizm|wyznania mojżeszowego]]<ref name=":14">[http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VIII/335 Słownik Geograficzny Królestwa Polskiego, Warszawa 1880, t.VIII]</ref>. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców<ref name=":15" />. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób<ref>Rocznik Diecezji Przemyskiej, ob. Łać. 1938 Przemyśl 1938, Nakładem Kurii Biskupiej ob. łać.</ref>.
=== Rozwój oświaty i kultury ===
W osiemdziesiątych latach XIX wieku powstaje w Pnikucie pierwsza szkoła prowadzona przez Michała Skwirzyńskiego w jego domu, a przed 1890 rokiem, w budynku zbudowanym przez mieszkańców powstaje szkoła czteroklasowa, której kierownikiem zostaje Jan Filip<ref name=":23">Rys monograficzny dziejów wsi Pnikut w okresie 1914 - 1945, Praca zbiorowa pod redakcją F. Dorosza, Przemyśl,1986</ref>. Jeszcze przed 1900 rokiem powstało w Pnikucie koło organizacji "Sokół" a w jego ramach zespoły: teatralny, muzyczny, recytatorski i chóralny, natomiast w 1910 roku zbudowano budynek tzw. "Sokolni"<ref>S. Żółkiewicz, Rys historyczny Pnikuta (Ukraina), Przemyśl, 2009</ref>. Na terenie wsi działał Związek Katolicki do którego należało 320 mieszkańców<ref>Kronika Diecezji Przemyskiej, Przemyśl, 1914</ref>. W Pnikucie jeszcze przed I Wojną Światową istniała spółdzielnia mleczarska, kółko rolnicze, dwa sklepy, "Ochronka" dla dzieci i kasa Reiffeisena<ref>[http://jbc.bj.uj.edu.pl/dlibra/results?action=SearchAction&skipSearch=true&mdirids=1&server%3Atype=both&tempQueryType=-3&encode=false&isExpandable=on&isRemote=off&roleId=-3&queryType=-3&dirids=1&rootid=74846&query=pnikut&localQueryType=-3&remoteQueryType=-2 Przyjaciel Ludu, nr. 30, 21.07.1912]</ref>.
W 1921 roku powstaje w Pnikucie Dom Ludowy mieszczący między innymi salkę teatralną wraz z zapleczem i dwie sale wykładowe. Uroczystość otwarcia i poświęcenia domu uświetnił swą obecnością Marszałek Sejmu Rzeczypospolitej Polskiej|Marszałek Sejmu RP Maciej Rataj<ref name=":23" />. Po śmierci Jana Filipa w 1923 roku nowym kierownikiem szkoły zostaje Włodzimierz Raba, a po nim Stefania Weintraubowa. We wsi działa prowadzona przez Kazimierza Lecha biblioteka. W 1928 roku kierownikiem szkoły zostaje Kazimierz Kwiatkowski, były legionista. Pod jego kierownictwem szkoła zmienia się z czteroklasowej w siedmioklasową<ref name=":23" />.
W okresie okupacji istniała w Pnikucie szkoła w której nauczano w języku polskim, a języka niemieckiego nie uczono wcale. Po wojnie językiem nauczania stał się język ukraiński a dodatkowo nauczano języka rosyjskiego. Dzieci języka polskiego uczono w domach i na lekcjach religii w Kościele<ref name=":22">[http://www.pnikut.net/teksty/historia_miejscowosci_pnikut.pdf K. Zarański, Historia miejscowości Pnikut]</ref>.
=== Dzieje kościoła ===
[[Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg|thumb|223x223px|Kapliczka na miejscu starego kościoła]]
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|270x270px|Kościół św. Mikołaja w Pnikucie]]
Pierwsze wzmianki o kościele rzymskokatolickim w Pnikucie pochodzą z około 1385 roku<ref name=":15" />. Ponad dwieście lat później bo w roku 1611 na miejscu starego kościoła powstaje nowy. Budynek był drewniany, otoczony wałem i fosą z mostem zwodzonym i palisadą. W 1648 roku kościół wraz ze zgromadzonymi w nim ludźmi zostaje spalony przez kozaków<ref name=":15" />. W 1667 roku, na miejscu spalonego powstaje nowy kościół. Świątynia przetrwała prawie sto lat. Z polecenia biskupa Sierakowskiego i z funduszy Kapituły Przemyskiej w 1762 roku rozpoczęto budowę nowego kościoła. Po pięciu latach 27 lipca 1767 roku świątynię konsekrowano<ref name=":11">[http://www.pnikut.com/ Strona parafialna]</ref>. Kościół służył parafii do 1912 roku, po czym został rozebrany i złożony ponownie w 1929 roku, w [[Laszki Zawiązane|Laszkach Zawiązanych]]<ref name=":11" />. Po kościele pozostała kapliczka, istniejąca do dnia dzisiejszego.
Na przełomie wieków staraniem proboszcza parafii ks. L. Świtalskiego rozpoczynają się prace nad nową, murowaną świątynią dla Pnikuta. W 1901 r. powstaje projekt kościoła sporządzony przez Maksymiliana Jabłońskiego z Dobromila. W kwietniu 1908 roku rozpoczęto budowę, w październiku 1909 roku pokryto dach kościoła, a latem 1910 roku wytynkowano wnętrze. W dniu 6 grudnia 1912 r. kościół został poświęcony. Po usunięciu zniszczeń z okresu I wojny światowej w 1921 roku kościół powtórnie poświęcono<ref name=":11" />, a w 1927 r. zamontowano trzy nowe dzwony z odlewni Felczyńskich w Przemyślu<ref name=":12">N. Sarkady, Dziedzictwo w pejzaż wpisane. Opowieść o polskiej wsi Pnikut, Przemyśl 2010</ref>.
Obecnie w Pnikucie znajdują się dwie świątynie, opisywany kościół św. Mikołaja i [[cerkiew prawosławna]].
== Historia ==
Według niektórych źródeł Pnikut posiadał magdeburskie prawa miejskie już w XV wieku (wcześniej niż Przemyśl)<ref>G. Rokowski, Ziemia Lwowska, OW Rewasz, Piastkw, 2005</ref>. Pierwsze pewne informacje o Pnikucie pochodzą z 1359 roku<ref name=":12" />. Kilka lat później w 1366 roku, miejscowośc Pnekolt (tak nazywał się wówczas Pnikut) nabył Piotr Radciowski<ref name=":1">Akta Grodzkie i Ziemskie, t VIII</ref>, a 8 maja 1385 roku, kolejny właściciel, Piotr Stryjski zapisał Pnekolt (Pnikut) na rzecz biskupów przemyskich<ref>Akta Grodzkie i Ziemskie, t VII</ref>. W roku 1402 Kapituła Przemyska sprzedaje sołtystwo we wsi Pnikut Maciejowi, synowi krawca z Kazimierza<ref name=":1" />. Dnia 29 października 1408 roku [[Władysław II Jagiełło|Władysław Jagiełło]] uwalnia mieszkańców osiedlających się we wsi Pnikut i od wszelkich danin i ciężarów<ref name=":1" />. Pnikut wraca do Kapituły Przemyskiej w dniu 14 kwietnia 1417 roku, kupiony od "wdowy po Piotrze Fus za 212 grzywien ważnych"<ref name=":14" />. Dnia 14 czerwca 1462 r. następuje rozgraniczenie wsi Pnikut, Buchowice i Bolanowice<ref name=":14" />.
Są w Pnikucie miejsca historycznie ważne, nie tylko dla samej wsi. To tutaj miała miejsce regularna bitwa, gdy w 1672 roku podczas kolejnej wyprawy Mohamed IV w sojuszu z Tatarami i Kozakami napadł na wschodnie rubieże Polski w tym ziemię przemyską. Dnia 8 października wspomnianego roku, obciążone łupami i jeńcami trzy ordy tatarskie zostały rozbite przez ochotników z [[Przemyśl]]a oraz mieszkańców Pnikuta, dowodzonych przez ks. Krystyna Szykowskiego, gwardiana o.o. Reformatów Przemyskich<ref name=":14" />. Po bitwie miejsce pochówku walecznych obrońców nazwane zostało Kalwaryjką i do dzisiaj mieszkańcy zapalają tam znicze w Święto Zmarłych.
W południowo - wschodniej części Pnikuta znajduje się wzniesienie do dzisiaj nazywane "Zamczyskiem". Według ludowych podań mieszkali tam dwaj strażnicy - obserwatorzy, których zadaniem było informowanie mieszkańców o zbliżającym się niebezpieczeństwie. Dziś nie wiadomo, jaki był charakter tego miejsca, czy była to wieża obronna<ref name=":15" />, czy zamek<ref>[http://www.pbc.rzeszow.pl/dlibra/docmetadata?id=4771&from=publication M. Orłowicz, Ilustrowany Przewodnik po Przemyślu i okolicy, Zjednoczenie Towarzystw Polskich, Przemyśl, 1917]</ref>.
=== I Wojna Światowa ===
Okres I Wojny Światowej to przede wszystkim olbrzymie zniszczenia, przestaje istnieć Sokolnia i mleczarnia, część gospodarstw spłonęło lub zostało rozebranych czy zburzonych. Zginęło wielu mieszkańców. Pnikuczanie walczyli na polach wielu bitew. W [[Legiony Polskie 1914-1918|Legionach]]: Walenty Miśniak (kawaler orderu Virtuti - Militari), Władysław Dorosz (wielokrotnie odznaczony), Bronisław Kuśnierz, Michał Kuśnierz, Władysław Kuśnierz, Józef Żółkiewicz, Szymon Bazanowski, Bartłomiej Gawron, Błażej Dorosz, Marek Muszak, Ludwik Muszak, Ludwik Folta, Stanisław Czop, Mateusz Wiącek s. Jana, Sylwester Pawłowski, Józef Muszak. W armii Hallera służyli: Jan Miśniak, Franciszek Czerniec, Jan Czerniec, Antoni Czerniec, Fabian Paprocki, Wawrzyniec Gładysz, Jan Ździobek, Franciszek Skrabka, Antoni Dorosz<ref name=":22" />.
=== Dwudziestolecie międzywojenne ===
Po I Wojnie Światowej powstaje komórka Związku Strzeleckiego "Strzelec", powołana zostaje z inicjatywy mieszkańców Kasa Stefczyka, a także tworzy się Ochotnicza Straż Pożarna pod komendą Andrzeja Piwowara. Z inicjatywy księdza Walerego Motyki, powstaje Katolicki Związek Młodzieży Żeńskiej i Męskiej (Akcja Katolicka). Pod przewodnictwem Walentego Miśniaka działa komórka BBWR (Bezpartyjny Blok Współpracy z Rządem). Silną organizacją jest też Stronnictwo Ludowe oraz Związek Młodzieży Wiejskiej "WICI"<ref name=":23" />.
Pierwszego sierpnia 1934 roku na mocy ustawy<ref name=":18" /> powołano zbiorczą gminę Pnikut. W jej skład wchodzą miejscowości: [[Buchowice]], [[Chliple]], [[Czyżowice (Ukraina)|Czyżowice]], Hańkowice, [[Jatwięgi]], [[Krukienice]], [[Ostrożec (rejon mościski)|Ostrożec]], Pnikut, [[Podliski (rejon mościski)|Podliski]], [[Radenice]], [[Sudkowice]], [[Wiszenka (rejon mościski)|Wiszenka]]. W tym czasie parafia Pnikucka składała się z Pnikuta, Buchowic i Pakości. Głównym właścicielem ziemi jest Kapituła Przemyska. W okresie międzywojennym we wsi działałją dwa młyny wodne, olejarnia, trzy warsztaty tkackie, cegielnia, nowoczesna mleczarnia, trzy kuźnie, dziesięciu szewców, trzynastu krawców, trzech rymarzy, dwóch kołodziejów, przewoźnik, dwudziestu fryzjerów, ośmiu stolarzy, dziesięciu cieśli, pięciu murarzy, dwóch blacharzy i jeden studniarz<ref name=":23" />.
=== II Wojna Światowa ===
W połowie września 1939 roku do Pnikuta wkraczają Niemcy w marszu na [[Lwów]]. Po agresji ZSRR na Polskę armia niemiecka cofa się i po raz drugi przechodzi przez wieś, a wkrótce po Niemcach przychodzą Rosjanie. W międzyczasie w Pnikucie, w drodze na Węgry stacjonuje oddział dowodzony przez gen. Władysława Andersa<ref name=":23" />. Niedaleko, pod Starym Samborem, gen. Anders zostaje dwukrotnie ranny i wzięty do niewoli (29 września).
Okres pierwszej okupacji sowieckiej to życie w strachu przed aresztowaniem i śmiercią. Antypolskie nastawienie Rosjan, denuncjacje polskich patriotów przez Żydów i nacjonalistów Ukraińskich oraz przymusowe wcielenia do Armii Radzieckiej (mężczyźni urodzeni w latach 1918 - 1921) potęgowały niepokój i niepewność jutra. Po 2 czerwca 1941 roku (atak Niemiec na ZSRR) wojska Wermachtu po raz kolejny przechodzą przez Pnikut. W okresie okupacji niemieckiej na terenie wsi odbudowuje się konspiracyjny ruch oporu.
W Pnikucie oprócz Niemców działała również Granatowa Policja rekrutowana głównie ze współpracujących z okupantem Ukraińców z Buchowic. W tym okresie Niemcy tolerowali działalność UPA i innych ukraińskich ruchów nacjonalistycznych. Polacy organizują samoobronę. Budowane są miejsca ukrycia (zamaskowane schrony), a mężczyźni uzbrojeni w widły i kosy, ale również w broń palną informowani są o zagrożeniu biciem kościelnych dzwonów<ref name=":22" />.
Na przełomie 1943 i 1944 roku do Pnikuta przybywają oddziały Armii Krajowej które początkowo ukrywają się u mieszkańców a następnie w podpnikuckim lesie. Wielu mieszkańców przyłącza się do partyzantów, praktycznie cała wieś zaopatruje ich w żywność. W obawie przed kontrolą wiezione na wozie jedzenie ukrywano w sianie a woźnicami byli młodzi chłopcy, dzieci by nie wzbudzać podejrzeń. Okres ten to czas względnego spokoju ze strony banderowców, którzy obawiali się polskich partyzantów<ref name=":22" />.
Podczas II Wojny Światowej zginęło ponad 40 mieszkańców wsi, 27 zostało aresztowanych przez Gestapo, a 86 wywieziono na roboty do Niemiec z których większość wróciła po wojnie do rodzinnych domów<ref name=":22" />. Pnikuczanie walczyli pod Monte Cassino i w wielu innych bitwach pod dowództwem między innymi gen. Andersa. Wielu powołano w szeregi Ludowego Wojska Polskiego do I i II Armii<ref name=":23" />.
=== Okres powojenny ===
Po II Wojnie Światowej, Pnikut na mocy ustaleń w Jałcie znalazł się w granicach Związku Radzieckiego. Wielu wierzyło, że to okres przejściowy i wkrótce wszystko wróci do stanu sprzed wojny. I fala repatriacji to lata 1945 - 1947. Polacy jechali w nieznane, zostawiając wszystko, co było dla nich cenne i ważne.
Bardzo długo Pnikut opierał się kolektywizacji i prawdopodobnie był ostatnią wsią w okręgu, jaka przystąpiła do kołchozu.
W latach 1956 - 1958 miała miejsce druga fala repatriacji. Ludzie stracili nadzieję, że Pnikut wróci w granice Polski. Ogółem po wojnie wyjechało z Pnikuta 420 polskich rodzin, a ponad 90 rodzin zostało<ref name=":22" />.
Gdy w 1945 roku wieloletni proboszcz ks. Tomasz Szurek musiał opuścić parafię, na jego miejsce przybył [[Jerzy Ablewicz|ks. Jerzy Ablewicz]]. Po jego wyjeździe w 1946 roku władze nie wydały zezwolenia na pracę innego kapłana w Pnikuckiej parafii. Mieszkańcy jednak nigdy nie oddali kluczy od kościoła i choć wieś obciążono wysokimi podatkami, świątynia pozostała w dyspozycji parafian. Po wieloletnich zabiegach ze strony mieszkańców, dopiero w 1987 roku władza oficjalnie zezwoliła na odprawianie nabożeństw w kościele. Był to pierwszy taki przypadek w całym ZSRR.
O ile krótko po wojnie zdarzały się rozboje i napady rabunkowe, zarówno banderowców jak i zwykłych bandytów, o tyle lata późniejsze to okres stosunkowo spokojnej koegzystencji Polaków i Ukraińców, których było we wsi coraz więcej.
W 1986 roku, pomiędzy 19 a 21 września miał miejsce Pierwszy Zjazd Pnikuczan, a w 1991 roku powstał we wsi Oddział Towarzystwa Kultury Polskiej Ziemi Lwowskiej.
Po rozpadzie ZSRR Pnikut jest częścią Ukrainy. Dnia 9 sierpnia 2009 roku obchodzono uroczyście 650 lecie powstania miejscowości.
{{Przypisy}}
== Linki zewnętrzne ==
* [http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VII/335] Pnikut w Słowniku Geograficznym Królestwa Polskiego i innych krajów słowiańskich, tVII
* [https://pnikut.net Pnikut.net], serwis mieszkańców dawnego Pnikuta
* [https://pnikut.org/ Strona parafialna]
{{Cytuj Wiki}}
[[Kategoria:Wsie obwodu lwowskiego]]
[[Kategoria:Rejon mościski]]
4d865cef809fd04dd141fe6938d6a196eec00882
668
667
2014-03-13T23:21:21Z
Ffkapa
2
/* Mieszkańcy */
wikitext
text/x-wiki
{{Spis treści}}
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim]]<ref name=":18">{{Dziennik Ustaw|rok=1934|numer=64|pozycja=547}}</ref>. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
We wsi działa oddział [[Towarzystwo Kultury Polskiej Ziemi Lwowskiej|Towarzystwa Kultury Polskiej Ziemi Lwowskiej]]<ref>[http://tkpzl.lviv.ua/pl/pages/21/ Towarzystwo Kultury Polskiej Ziemi Lwowskiej]</ref>.
== Mieszkańcy ==
=== Zmiany demograficzne ===
Od najdawniejszych lat Pnikut zamieszkiwali głównie [[Polacy]]. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiają się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów<ref name=":15">L. Świtalski, Kronika Pnikuta, Pnikut 25.X.1905</ref>.
Około 1800 roku wieś zamieszkują 722 osoby<ref name=":15" />. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie [[Kościół rzymskokatolicki|kościoła rzymskokatolickiego]], 17 to [[Kościoły greckokatolickie|grekokatolicy]] a 41 to zwolennicy [[Judaizm|wyznania mojżeszowego]]<ref name=":14">[http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VIII/335 Słownik Geograficzny Królestwa Polskiego, Warszawa 1880, t.VIII]</ref>. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców<ref name=":15" />. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób<ref>Rocznik Diecezji Przemyskiej, ob. Łać. 1938 Przemyśl 1938, Nakładem Kurii Biskupiej ob. łać.</ref>.
=== Rozwój oświaty i kultury ===
W osiemdziesiątych latach XIX wieku powstaje w Pnikucie pierwsza szkoła prowadzona przez Michała Skwirzyńskiego w jego domu, a przed 1890 rokiem, w budynku zbudowanym przez mieszkańców powstaje szkoła czteroklasowa, której kierownikiem zostaje Jan Filip<ref name=":23">Rys monograficzny dziejów wsi Pnikut w okresie 1914 - 1945, Praca zbiorowa pod redakcją F. Dorosza, Przemyśl,1986</ref>. Jeszcze przed 1900 rokiem powstało w Pnikucie koło organizacji "Sokół" a w jego ramach zespoły: teatralny, muzyczny, recytatorski i chóralny, natomiast w 1910 roku zbudowano budynek tzw. "Sokolni"<ref>S. Żółkiewicz, Rys historyczny Pnikuta (Ukraina), Przemyśl, 2009</ref>. Na terenie wsi działał Związek Katolicki do którego należało 320 mieszkańców<ref>Kronika Diecezji Przemyskiej, Przemyśl, 1914</ref>. W Pnikucie jeszcze przed I Wojną Światową istniała spółdzielnia mleczarska, kółko rolnicze, dwa sklepy, "Ochronka" dla dzieci i kasa Reiffeisena<ref>[http://jbc.bj.uj.edu.pl/dlibra/results?action=SearchAction&skipSearch=true&mdirids=1&server%3Atype=both&tempQueryType=-3&encode=false&isExpandable=on&isRemote=off&roleId=-3&queryType=-3&dirids=1&rootid=74846&query=pnikut&localQueryType=-3&remoteQueryType=-2 Przyjaciel Ludu, nr. 30, 21.07.1912]</ref>.
W 1921 roku powstaje w Pnikucie Dom Ludowy mieszczący między innymi salkę teatralną wraz z zapleczem i dwie sale wykładowe. Uroczystość otwarcia i poświęcenia domu uświetnił swą obecnością Marszałek Sejmu Rzeczypospolitej Polskiej|Marszałek Sejmu RP Maciej Rataj<ref name=":23" />. Po śmierci Jana Filipa w 1923 roku nowym kierownikiem szkoły zostaje Włodzimierz Raba, a po nim Stefania Weintraubowa. We wsi działa prowadzona przez Kazimierza Lecha biblioteka. W 1928 roku kierownikiem szkoły zostaje Kazimierz Kwiatkowski, były legionista. Pod jego kierownictwem szkoła zmienia się z czteroklasowej w siedmioklasową<ref name=":23" />.
W okresie okupacji istniała w Pnikucie szkoła w której nauczano w języku polskim, a języka niemieckiego nie uczono wcale. Po wojnie językiem nauczania stał się język ukraiński a dodatkowo nauczano języka rosyjskiego. Dzieci języka polskiego uczono w domach i na lekcjach religii w Kościele<ref name=":22">[http://www.pnikut.net/teksty/historia_miejscowosci_pnikut.pdf K. Zarański, Historia miejscowości Pnikut]</ref>.
=== Dzieje kościoła ===
[[Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg|thumb|223x223px|Kapliczka na miejscu starego kościoła]]
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|270x270px|Kościół św. Mikołaja w Pnikucie]]
Pierwsze wzmianki o kościele rzymskokatolickim w Pnikucie pochodzą z około 1385 roku<ref name=":15" />. Ponad dwieście lat później bo w roku 1611 na miejscu starego kościoła powstaje nowy. Budynek był drewniany, otoczony wałem i fosą z mostem zwodzonym i palisadą. W 1648 roku kościół wraz ze zgromadzonymi w nim ludźmi zostaje spalony przez kozaków<ref name=":15" />. W 1667 roku, na miejscu spalonego powstaje nowy kościół. Świątynia przetrwała prawie sto lat. Z polecenia biskupa Sierakowskiego i z funduszy Kapituły Przemyskiej w 1762 roku rozpoczęto budowę nowego kościoła. Po pięciu latach 27 lipca 1767 roku świątynię konsekrowano<ref name=":11">[http://www.pnikut.com/ Strona parafialna]</ref>. Kościół służył parafii do 1912 roku, po czym został rozebrany i złożony ponownie w 1929 roku, w [[Laszki Zawiązane|Laszkach Zawiązanych]]<ref name=":11" />. Po kościele pozostała kapliczka, istniejąca do dnia dzisiejszego.
Na przełomie wieków staraniem proboszcza parafii ks. L. Świtalskiego rozpoczynają się prace nad nową, murowaną świątynią dla Pnikuta. W 1901 r. powstaje projekt kościoła sporządzony przez Maksymiliana Jabłońskiego z Dobromila. W kwietniu 1908 roku rozpoczęto budowę, w październiku 1909 roku pokryto dach kościoła, a latem 1910 roku wytynkowano wnętrze. W dniu 6 grudnia 1912 r. kościół został poświęcony. Po usunięciu zniszczeń z okresu I wojny światowej w 1921 roku kościół powtórnie poświęcono<ref name=":11" />, a w 1927 r. zamontowano trzy nowe dzwony z odlewni Felczyńskich w Przemyślu<ref name=":12">N. Sarkady, Dziedzictwo w pejzaż wpisane. Opowieść o polskiej wsi Pnikut, Przemyśl 2010</ref>.
Obecnie w Pnikucie znajdują się dwie świątynie, opisywany kościół św. Mikołaja i [[cerkiew prawosławna]].
== Historia ==
Według niektórych źródeł Pnikut posiadał magdeburskie prawa miejskie już w XV wieku (wcześniej niż Przemyśl)<ref>G. Rokowski, Ziemia Lwowska, OW Rewasz, Piastkw, 2005</ref>. Pierwsze pewne informacje o Pnikucie pochodzą z 1359 roku<ref name=":12" />. Kilka lat później w 1366 roku, miejscowośc Pnekolt (tak nazywał się wówczas Pnikut) nabył Piotr Radciowski<ref name=":1">Akta Grodzkie i Ziemskie, t VIII</ref>, a 8 maja 1385 roku, kolejny właściciel, Piotr Stryjski zapisał Pnekolt (Pnikut) na rzecz biskupów przemyskich<ref>Akta Grodzkie i Ziemskie, t VII</ref>. W roku 1402 Kapituła Przemyska sprzedaje sołtystwo we wsi Pnikut Maciejowi, synowi krawca z Kazimierza<ref name=":1" />. Dnia 29 października 1408 roku [[Władysław II Jagiełło|Władysław Jagiełło]] uwalnia mieszkańców osiedlających się we wsi Pnikut i od wszelkich danin i ciężarów<ref name=":1" />. Pnikut wraca do Kapituły Przemyskiej w dniu 14 kwietnia 1417 roku, kupiony od "wdowy po Piotrze Fus za 212 grzywien ważnych"<ref name=":14" />. Dnia 14 czerwca 1462 r. następuje rozgraniczenie wsi Pnikut, Buchowice i Bolanowice<ref name=":14" />.
Są w Pnikucie miejsca historycznie ważne, nie tylko dla samej wsi. To tutaj miała miejsce regularna bitwa, gdy w 1672 roku podczas kolejnej wyprawy Mohamed IV w sojuszu z Tatarami i Kozakami napadł na wschodnie rubieże Polski w tym ziemię przemyską. Dnia 8 października wspomnianego roku, obciążone łupami i jeńcami trzy ordy tatarskie zostały rozbite przez ochotników z [[Przemyśl]]a oraz mieszkańców Pnikuta, dowodzonych przez ks. Krystyna Szykowskiego, gwardiana o.o. Reformatów Przemyskich<ref name=":14" />. Po bitwie miejsce pochówku walecznych obrońców nazwane zostało Kalwaryjką i do dzisiaj mieszkańcy zapalają tam znicze w Święto Zmarłych.
W południowo - wschodniej części Pnikuta znajduje się wzniesienie do dzisiaj nazywane "Zamczyskiem". Według ludowych podań mieszkali tam dwaj strażnicy - obserwatorzy, których zadaniem było informowanie mieszkańców o zbliżającym się niebezpieczeństwie. Dziś nie wiadomo, jaki był charakter tego miejsca, czy była to wieża obronna<ref name=":15" />, czy zamek<ref>[http://www.pbc.rzeszow.pl/dlibra/docmetadata?id=4771&from=publication M. Orłowicz, Ilustrowany Przewodnik po Przemyślu i okolicy, Zjednoczenie Towarzystw Polskich, Przemyśl, 1917]</ref>.
=== I Wojna Światowa ===
Okres I Wojny Światowej to przede wszystkim olbrzymie zniszczenia, przestaje istnieć Sokolnia i mleczarnia, część gospodarstw spłonęło lub zostało rozebranych czy zburzonych. Zginęło wielu mieszkańców. Pnikuczanie walczyli na polach wielu bitew. W [[Legiony Polskie 1914-1918|Legionach]]: Walenty Miśniak (kawaler orderu Virtuti - Militari), Władysław Dorosz (wielokrotnie odznaczony), Bronisław Kuśnierz, Michał Kuśnierz, Władysław Kuśnierz, Józef Żółkiewicz, Szymon Bazanowski, Bartłomiej Gawron, Błażej Dorosz, Marek Muszak, Ludwik Muszak, Ludwik Folta, Stanisław Czop, Mateusz Wiącek s. Jana, Sylwester Pawłowski, Józef Muszak. W armii Hallera służyli: Jan Miśniak, Franciszek Czerniec, Jan Czerniec, Antoni Czerniec, Fabian Paprocki, Wawrzyniec Gładysz, Jan Ździobek, Franciszek Skrabka, Antoni Dorosz<ref name=":22" />.
=== Dwudziestolecie międzywojenne ===
Po I Wojnie Światowej powstaje komórka Związku Strzeleckiego "Strzelec", powołana zostaje z inicjatywy mieszkańców Kasa Stefczyka, a także tworzy się Ochotnicza Straż Pożarna pod komendą Andrzeja Piwowara. Z inicjatywy księdza Walerego Motyki, powstaje Katolicki Związek Młodzieży Żeńskiej i Męskiej (Akcja Katolicka). Pod przewodnictwem Walentego Miśniaka działa komórka BBWR (Bezpartyjny Blok Współpracy z Rządem). Silną organizacją jest też Stronnictwo Ludowe oraz Związek Młodzieży Wiejskiej "WICI"<ref name=":23" />.
Pierwszego sierpnia 1934 roku na mocy ustawy<ref name=":18" /> powołano zbiorczą gminę Pnikut. W jej skład wchodzą miejscowości: [[Buchowice]], [[Chliple]], [[Czyżowice (Ukraina)|Czyżowice]], Hańkowice, [[Jatwięgi]], [[Krukienice]], [[Ostrożec (rejon mościski)|Ostrożec]], Pnikut, [[Podliski (rejon mościski)|Podliski]], [[Radenice]], [[Sudkowice]], [[Wiszenka (rejon mościski)|Wiszenka]]. W tym czasie parafia Pnikucka składała się z Pnikuta, Buchowic i Pakości. Głównym właścicielem ziemi jest Kapituła Przemyska. W okresie międzywojennym we wsi działałją dwa młyny wodne, olejarnia, trzy warsztaty tkackie, cegielnia, nowoczesna mleczarnia, trzy kuźnie, dziesięciu szewców, trzynastu krawców, trzech rymarzy, dwóch kołodziejów, przewoźnik, dwudziestu fryzjerów, ośmiu stolarzy, dziesięciu cieśli, pięciu murarzy, dwóch blacharzy i jeden studniarz<ref name=":23" />.
=== II Wojna Światowa ===
W połowie września 1939 roku do Pnikuta wkraczają Niemcy w marszu na [[Lwów]]. Po agresji ZSRR na Polskę armia niemiecka cofa się i po raz drugi przechodzi przez wieś, a wkrótce po Niemcach przychodzą Rosjanie. W międzyczasie w Pnikucie, w drodze na Węgry stacjonuje oddział dowodzony przez gen. Władysława Andersa<ref name=":23" />. Niedaleko, pod Starym Samborem, gen. Anders zostaje dwukrotnie ranny i wzięty do niewoli (29 września).
Okres pierwszej okupacji sowieckiej to życie w strachu przed aresztowaniem i śmiercią. Antypolskie nastawienie Rosjan, denuncjacje polskich patriotów przez Żydów i nacjonalistów Ukraińskich oraz przymusowe wcielenia do Armii Radzieckiej (mężczyźni urodzeni w latach 1918 - 1921) potęgowały niepokój i niepewność jutra. Po 2 czerwca 1941 roku (atak Niemiec na ZSRR) wojska Wermachtu po raz kolejny przechodzą przez Pnikut. W okresie okupacji niemieckiej na terenie wsi odbudowuje się konspiracyjny ruch oporu.
W Pnikucie oprócz Niemców działała również Granatowa Policja rekrutowana głównie ze współpracujących z okupantem Ukraińców z Buchowic. W tym okresie Niemcy tolerowali działalność UPA i innych ukraińskich ruchów nacjonalistycznych. Polacy organizują samoobronę. Budowane są miejsca ukrycia (zamaskowane schrony), a mężczyźni uzbrojeni w widły i kosy, ale również w broń palną informowani są o zagrożeniu biciem kościelnych dzwonów<ref name=":22" />.
Na przełomie 1943 i 1944 roku do Pnikuta przybywają oddziały Armii Krajowej które początkowo ukrywają się u mieszkańców a następnie w podpnikuckim lesie. Wielu mieszkańców przyłącza się do partyzantów, praktycznie cała wieś zaopatruje ich w żywność. W obawie przed kontrolą wiezione na wozie jedzenie ukrywano w sianie a woźnicami byli młodzi chłopcy, dzieci by nie wzbudzać podejrzeń. Okres ten to czas względnego spokoju ze strony banderowców, którzy obawiali się polskich partyzantów<ref name=":22" />.
Podczas II Wojny Światowej zginęło ponad 40 mieszkańców wsi, 27 zostało aresztowanych przez Gestapo, a 86 wywieziono na roboty do Niemiec z których większość wróciła po wojnie do rodzinnych domów<ref name=":22" />. Pnikuczanie walczyli pod Monte Cassino i w wielu innych bitwach pod dowództwem między innymi gen. Andersa. Wielu powołano w szeregi Ludowego Wojska Polskiego do I i II Armii<ref name=":23" />.
=== Okres powojenny ===
Po II Wojnie Światowej, Pnikut na mocy ustaleń w Jałcie znalazł się w granicach Związku Radzieckiego. Wielu wierzyło, że to okres przejściowy i wkrótce wszystko wróci do stanu sprzed wojny. I fala repatriacji to lata 1945 - 1947. Polacy jechali w nieznane, zostawiając wszystko, co było dla nich cenne i ważne.
Bardzo długo Pnikut opierał się kolektywizacji i prawdopodobnie był ostatnią wsią w okręgu, jaka przystąpiła do kołchozu.
W latach 1956 - 1958 miała miejsce druga fala repatriacji. Ludzie stracili nadzieję, że Pnikut wróci w granice Polski. Ogółem po wojnie wyjechało z Pnikuta 420 polskich rodzin, a ponad 90 rodzin zostało<ref name=":22" />.
Gdy w 1945 roku wieloletni proboszcz ks. Tomasz Szurek musiał opuścić parafię, na jego miejsce przybył [[Jerzy Ablewicz|ks. Jerzy Ablewicz]]. Po jego wyjeździe w 1946 roku władze nie wydały zezwolenia na pracę innego kapłana w Pnikuckiej parafii. Mieszkańcy jednak nigdy nie oddali kluczy od kościoła i choć wieś obciążono wysokimi podatkami, świątynia pozostała w dyspozycji parafian. Po wieloletnich zabiegach ze strony mieszkańców, dopiero w 1987 roku władza oficjalnie zezwoliła na odprawianie nabożeństw w kościele. Był to pierwszy taki przypadek w całym ZSRR.
O ile krótko po wojnie zdarzały się rozboje i napady rabunkowe, zarówno banderowców jak i zwykłych bandytów, o tyle lata późniejsze to okres stosunkowo spokojnej koegzystencji Polaków i Ukraińców, których było we wsi coraz więcej.
W 1986 roku, pomiędzy 19 a 21 września miał miejsce Pierwszy Zjazd Pnikuczan, a w 1991 roku powstał we wsi Oddział Towarzystwa Kultury Polskiej Ziemi Lwowskiej.
Po rozpadzie ZSRR Pnikut jest częścią Ukrainy. Dnia 9 sierpnia 2009 roku obchodzono uroczyście 650 lecie powstania miejscowości.
{{Przypisy}}
== Linki zewnętrzne ==
* [http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VII/335] Pnikut w Słowniku Geograficznym Królestwa Polskiego i innych krajów słowiańskich, tVII
* [http://www.pnikut.net Pnikut.net], serwis mieszkańców dawnego Pnikuta
* [http://www.pnikut.com/ Strona parafialna]
{{Cytuj Wiki}}
[[Kategoria:Wsie obwodu lwowskiego]]
[[Kategoria:Rejon mościski]]
55cefd4af3be14c3d57e89308c780a9c212614cf
667
666
2014-03-13T23:20:06Z
Ffkapa
2
/* Historia */
wikitext
text/x-wiki
{{Spis treści}}
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim]]<ref name=":18">{{Dziennik Ustaw|rok=1934|numer=64|pozycja=547}}</ref>. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
We wsi działa oddział [[Towarzystwo Kultury Polskiej Ziemi Lwowskiej|Towarzystwa Kultury Polskiej Ziemi Lwowskiej]]<ref>[http://tkpzl.lviv.ua/pl/pages/21/ Towarzystwo Kultury Polskiej Ziemi Lwowskiej]</ref>.
== Mieszkańcy ==
=== Zmiany demograficzne ===
Od najdawniejszych lat Pnikut zamieszkiwali głównie [[Polacy]]. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiają się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów<ref name=":15">L. Świtalski, Kronika Pnikuta, Pnikut 25.X.1905</ref>.
Około 1800 roku wieś zamieszkują 722 osoby<ref name=":15" />. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie [[Kościół rzymskokatolicki|kościoła rzymskokatolickiego]], 17 to [[Kościoły greckokatolickie|grekokatolicy]] a 41 to zwolennicy [[Judaizm|wyznania mojżeszowego]]<ref name=":14">[http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VIII/335 Słownik Geograficzny Królestwa Polskiego, Warszawa 1880, t.VIII]</ref>. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców<ref name=":15" />. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób<ref>Rocznik Diecezji Przemyskiej, ob. Łać. 1938 Przemyśl 1938, Nakładem Kurii Biskupiej ob. łać.</ref>.
=== Rozwój oświaty i kultury ===
W osiemdziesiątych latach XIX wieku powstaje w Pnikucie pierwsza szkoła prowadzona przez Michała Skwirzyńskiego{{fakt|data=2014-02}} w jego domu, a przed 1890 rokiem, w budynku zbudowanym przez mieszkańców powstaje szkoła czteroklasowa, której kierownikiem zostaje Jan Filip<ref name=":23">Rys monograficzny dziejów wsi Pnikut w okresie 1914 - 1945, Praca zbiorowa pod redakcją F. Dorosza, Przemyśl,1986</ref>. Jeszcze przed 1900 rokiem powstało w Pnikucie koło organizacji "Sokół" a w jego ramach zespoły: teatralny, muzyczny, recytatorski i chóralny, natomiast w 1910 roku zbudowano budynek tzw. "Sokolni"<ref>S. Żółkiewicz, Rys historyczny Pnikuta (Ukraina), Przemyśl, 2009</ref>. Na terenie wsi działał Związek Katolicki do którego należało 320 mieszkańców<ref>Kronika Diecezji Przemyskiej, Przemyśl, 1914</ref>. W Pnikucie jeszcze przed I Wojną Światową istniała spółdzielnia mleczarska, kółko rolnicze, dwa sklepy, "Ochronka" dla dzieci i kasa Reiffeisena<ref>[http://jbc.bj.uj.edu.pl/dlibra/results?action=SearchAction&skipSearch=true&mdirids=1&server%3Atype=both&tempQueryType=-3&encode=false&isExpandable=on&isRemote=off&roleId=-3&queryType=-3&dirids=1&rootid=74846&query=pnikut&localQueryType=-3&remoteQueryType=-2 Przyjaciel Ludu, nr. 30, 21.07.1912]</ref>.
W 1921 roku powstaje w Pnikucie Dom Ludowy mieszczący między innymi salkę teatralną wraz z zapleczem i dwie sale wykładowe. Uroczystość otwarcia i poświęcenia domu uświetnił swą obecnością [[Marszałek Sejmu Rzeczypospolitej Polskiej|Marszałek Sejmu RP]] [[Maciej Rataj]]<ref name=":23" />. Po śmierci Jana Filipa w 1923 roku nowym kierownikiem szkoły zostaje Włodzimierz Raba, a po nim Stefania Weintraubowa. We wsi działa prowadzona przez Kazimierza Lecha biblioteka. W 1928 roku kierownikiem szkoły zostaje Kazimierz Kwiatkowski, były legionista. Pod jego kierownictwem szkoła zmienia się z czteroklasowej w siedmioklasową<ref name=":23" />.
W okresie okupacji istniała w Pnikucie szkoła w której nauczano w języku polskim, a języka niemieckiego nie uczono wcale. Po wojnie językiem nauczania stał się język ukraiński a dodatkowo nauczano języka rosyjskiego. Dzieci języka polskiego uczono w domach i na lekcjach religii w Kościele<ref name=":22">[http://www.pnikut.net/teksty/historia_miejscowosci_pnikut.pdf K. Zarański, Historia miejscowości Pnikut]</ref>.
=== Dzieje kościoła ===
[[Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg|thumb|223x223px|Kapliczka na miejscu starego kościoła]]
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|270x270px|Kościół św. Mikołaja w Pnikucie]]
Pierwsze wzmianki o kościele rzymskokatolickim w Pnikucie pochodzą z około 1385 roku<ref name=":15" />. Ponad dwieście lat później bo w roku 1611 na miejscu starego kościoła powstaje nowy. Budynek był drewniany, otoczony wałem i fosą z mostem zwodzonym i palisadą. W 1648 roku kościół wraz ze zgromadzonymi w nim ludźmi zostaje spalony przez kozaków<ref name=":15" />. W 1667 roku, na miejscu spalonego powstaje nowy kościół. Świątynia przetrwała prawie sto lat. Z polecenia biskupa Sierakowskiego i z funduszy Kapituły Przemyskiej w 1762 roku rozpoczęto budowę nowego kościoła. Po pięciu latach 27 lipca 1767 roku świątynię konsekrowano<ref name=":11">[http://www.pnikut.com/ Strona parafialna]</ref>. Kościół służył parafii do 1912 roku, po czym został rozebrany i złożony ponownie w 1929 roku, w [[Laszki Zawiązane|Laszkach Zawiązanych]]<ref name=":11" />. Po kościele pozostała kapliczka, istniejąca do dnia dzisiejszego.
Na przełomie wieków staraniem proboszcza parafii ks. L. Świtalskiego rozpoczynają się prace nad nową, murowaną świątynią dla Pnikuta. W 1901 r. powstaje projekt kościoła sporządzony przez Maksymiliana Jabłońskiego z Dobromila. W kwietniu 1908 roku rozpoczęto budowę, w październiku 1909 roku pokryto dach kościoła, a latem 1910 roku wytynkowano wnętrze. W dniu 6 grudnia 1912 r. kościół został poświęcony. Po usunięciu zniszczeń z okresu I wojny światowej w 1921 roku kościół powtórnie poświęcono<ref name=":11" />, a w 1927 r. zamontowano trzy nowe dzwony z odlewni Felczyńskich w Przemyślu<ref name=":12">N. Sarkady, Dziedzictwo w pejzaż wpisane. Opowieść o polskiej wsi Pnikut, Przemyśl 2010</ref>.
Obecnie w Pnikucie znajdują się dwie świątynie, opisywany kościół św. Mikołaja i [[cerkiew prawosławna]].
== Historia ==
Według niektórych źródeł Pnikut posiadał magdeburskie prawa miejskie już w XV wieku (wcześniej niż Przemyśl)<ref>G. Rokowski, Ziemia Lwowska, OW Rewasz, Piastkw, 2005</ref>. Pierwsze pewne informacje o Pnikucie pochodzą z 1359 roku<ref name=":12" />. Kilka lat później w 1366 roku, miejscowośc Pnekolt (tak nazywał się wówczas Pnikut) nabył Piotr Radciowski<ref name=":1">Akta Grodzkie i Ziemskie, t VIII</ref>, a 8 maja 1385 roku, kolejny właściciel, Piotr Stryjski zapisał Pnekolt (Pnikut) na rzecz biskupów przemyskich<ref>Akta Grodzkie i Ziemskie, t VII</ref>. W roku 1402 Kapituła Przemyska sprzedaje sołtystwo we wsi Pnikut Maciejowi, synowi krawca z Kazimierza<ref name=":1" />. Dnia 29 października 1408 roku [[Władysław II Jagiełło|Władysław Jagiełło]] uwalnia mieszkańców osiedlających się we wsi Pnikut i od wszelkich danin i ciężarów<ref name=":1" />. Pnikut wraca do Kapituły Przemyskiej w dniu 14 kwietnia 1417 roku, kupiony od "wdowy po Piotrze Fus za 212 grzywien ważnych"<ref name=":14" />. Dnia 14 czerwca 1462 r. następuje rozgraniczenie wsi Pnikut, Buchowice i Bolanowice<ref name=":14" />.
Są w Pnikucie miejsca historycznie ważne, nie tylko dla samej wsi. To tutaj miała miejsce regularna bitwa, gdy w 1672 roku podczas kolejnej wyprawy Mohamed IV w sojuszu z Tatarami i Kozakami napadł na wschodnie rubieże Polski w tym ziemię przemyską. Dnia 8 października wspomnianego roku, obciążone łupami i jeńcami trzy ordy tatarskie zostały rozbite przez ochotników z [[Przemyśl]]a oraz mieszkańców Pnikuta, dowodzonych przez ks. Krystyna Szykowskiego, gwardiana o.o. Reformatów Przemyskich<ref name=":14" />. Po bitwie miejsce pochówku walecznych obrońców nazwane zostało Kalwaryjką i do dzisiaj mieszkańcy zapalają tam znicze w Święto Zmarłych.
W południowo - wschodniej części Pnikuta znajduje się wzniesienie do dzisiaj nazywane "Zamczyskiem". Według ludowych podań mieszkali tam dwaj strażnicy - obserwatorzy, których zadaniem było informowanie mieszkańców o zbliżającym się niebezpieczeństwie. Dziś nie wiadomo, jaki był charakter tego miejsca, czy była to wieża obronna<ref name=":15" />, czy zamek<ref>[http://www.pbc.rzeszow.pl/dlibra/docmetadata?id=4771&from=publication M. Orłowicz, Ilustrowany Przewodnik po Przemyślu i okolicy, Zjednoczenie Towarzystw Polskich, Przemyśl, 1917]</ref>.
=== I Wojna Światowa ===
Okres I Wojny Światowej to przede wszystkim olbrzymie zniszczenia, przestaje istnieć Sokolnia i mleczarnia, część gospodarstw spłonęło lub zostało rozebranych czy zburzonych. Zginęło wielu mieszkańców. Pnikuczanie walczyli na polach wielu bitew. W [[Legiony Polskie 1914-1918|Legionach]]: Walenty Miśniak (kawaler orderu Virtuti - Militari), Władysław Dorosz (wielokrotnie odznaczony), Bronisław Kuśnierz, Michał Kuśnierz, Władysław Kuśnierz, Józef Żółkiewicz, Szymon Bazanowski, Bartłomiej Gawron, Błażej Dorosz, Marek Muszak, Ludwik Muszak, Ludwik Folta, Stanisław Czop, Mateusz Wiącek s. Jana, Sylwester Pawłowski, Józef Muszak. W armii Hallera służyli: Jan Miśniak, Franciszek Czerniec, Jan Czerniec, Antoni Czerniec, Fabian Paprocki, Wawrzyniec Gładysz, Jan Ździobek, Franciszek Skrabka, Antoni Dorosz<ref name=":22" />.
=== Dwudziestolecie międzywojenne ===
Po I Wojnie Światowej powstaje komórka Związku Strzeleckiego "Strzelec", powołana zostaje z inicjatywy mieszkańców Kasa Stefczyka, a także tworzy się Ochotnicza Straż Pożarna pod komendą Andrzeja Piwowara. Z inicjatywy księdza Walerego Motyki, powstaje Katolicki Związek Młodzieży Żeńskiej i Męskiej (Akcja Katolicka). Pod przewodnictwem Walentego Miśniaka działa komórka BBWR (Bezpartyjny Blok Współpracy z Rządem). Silną organizacją jest też Stronnictwo Ludowe oraz Związek Młodzieży Wiejskiej "WICI"<ref name=":23" />.
Pierwszego sierpnia 1934 roku na mocy ustawy<ref name=":18" /> powołano zbiorczą gminę Pnikut. W jej skład wchodzą miejscowości: [[Buchowice]], [[Chliple]], [[Czyżowice (Ukraina)|Czyżowice]], Hańkowice, [[Jatwięgi]], [[Krukienice]], [[Ostrożec (rejon mościski)|Ostrożec]], Pnikut, [[Podliski (rejon mościski)|Podliski]], [[Radenice]], [[Sudkowice]], [[Wiszenka (rejon mościski)|Wiszenka]]. W tym czasie parafia Pnikucka składała się z Pnikuta, Buchowic i Pakości. Głównym właścicielem ziemi jest Kapituła Przemyska. W okresie międzywojennym we wsi działałją dwa młyny wodne, olejarnia, trzy warsztaty tkackie, cegielnia, nowoczesna mleczarnia, trzy kuźnie, dziesięciu szewców, trzynastu krawców, trzech rymarzy, dwóch kołodziejów, przewoźnik, dwudziestu fryzjerów, ośmiu stolarzy, dziesięciu cieśli, pięciu murarzy, dwóch blacharzy i jeden studniarz<ref name=":23" />.
=== II Wojna Światowa ===
W połowie września 1939 roku do Pnikuta wkraczają Niemcy w marszu na [[Lwów]]. Po agresji ZSRR na Polskę armia niemiecka cofa się i po raz drugi przechodzi przez wieś, a wkrótce po Niemcach przychodzą Rosjanie. W międzyczasie w Pnikucie, w drodze na Węgry stacjonuje oddział dowodzony przez gen. Władysława Andersa<ref name=":23" />. Niedaleko, pod Starym Samborem, gen. Anders zostaje dwukrotnie ranny i wzięty do niewoli (29 września).
Okres pierwszej okupacji sowieckiej to życie w strachu przed aresztowaniem i śmiercią. Antypolskie nastawienie Rosjan, denuncjacje polskich patriotów przez Żydów i nacjonalistów Ukraińskich oraz przymusowe wcielenia do Armii Radzieckiej (mężczyźni urodzeni w latach 1918 - 1921) potęgowały niepokój i niepewność jutra. Po 2 czerwca 1941 roku (atak Niemiec na ZSRR) wojska Wermachtu po raz kolejny przechodzą przez Pnikut. W okresie okupacji niemieckiej na terenie wsi odbudowuje się konspiracyjny ruch oporu.
W Pnikucie oprócz Niemców działała również Granatowa Policja rekrutowana głównie ze współpracujących z okupantem Ukraińców z Buchowic. W tym okresie Niemcy tolerowali działalność UPA i innych ukraińskich ruchów nacjonalistycznych. Polacy organizują samoobronę. Budowane są miejsca ukrycia (zamaskowane schrony), a mężczyźni uzbrojeni w widły i kosy, ale również w broń palną informowani są o zagrożeniu biciem kościelnych dzwonów<ref name=":22" />.
Na przełomie 1943 i 1944 roku do Pnikuta przybywają oddziały Armii Krajowej które początkowo ukrywają się u mieszkańców a następnie w podpnikuckim lesie. Wielu mieszkańców przyłącza się do partyzantów, praktycznie cała wieś zaopatruje ich w żywność. W obawie przed kontrolą wiezione na wozie jedzenie ukrywano w sianie a woźnicami byli młodzi chłopcy, dzieci by nie wzbudzać podejrzeń. Okres ten to czas względnego spokoju ze strony banderowców, którzy obawiali się polskich partyzantów<ref name=":22" />.
Podczas II Wojny Światowej zginęło ponad 40 mieszkańców wsi, 27 zostało aresztowanych przez Gestapo, a 86 wywieziono na roboty do Niemiec z których większość wróciła po wojnie do rodzinnych domów<ref name=":22" />. Pnikuczanie walczyli pod Monte Cassino i w wielu innych bitwach pod dowództwem między innymi gen. Andersa. Wielu powołano w szeregi Ludowego Wojska Polskiego do I i II Armii<ref name=":23" />.
=== Okres powojenny ===
Po II Wojnie Światowej, Pnikut na mocy ustaleń w Jałcie znalazł się w granicach Związku Radzieckiego. Wielu wierzyło, że to okres przejściowy i wkrótce wszystko wróci do stanu sprzed wojny. I fala repatriacji to lata 1945 - 1947. Polacy jechali w nieznane, zostawiając wszystko, co było dla nich cenne i ważne.
Bardzo długo Pnikut opierał się kolektywizacji i prawdopodobnie był ostatnią wsią w okręgu, jaka przystąpiła do kołchozu.
W latach 1956 - 1958 miała miejsce druga fala repatriacji. Ludzie stracili nadzieję, że Pnikut wróci w granice Polski. Ogółem po wojnie wyjechało z Pnikuta 420 polskich rodzin, a ponad 90 rodzin zostało<ref name=":22" />.
Gdy w 1945 roku wieloletni proboszcz ks. Tomasz Szurek musiał opuścić parafię, na jego miejsce przybył [[Jerzy Ablewicz|ks. Jerzy Ablewicz]]. Po jego wyjeździe w 1946 roku władze nie wydały zezwolenia na pracę innego kapłana w Pnikuckiej parafii. Mieszkańcy jednak nigdy nie oddali kluczy od kościoła i choć wieś obciążono wysokimi podatkami, świątynia pozostała w dyspozycji parafian. Po wieloletnich zabiegach ze strony mieszkańców, dopiero w 1987 roku władza oficjalnie zezwoliła na odprawianie nabożeństw w kościele. Był to pierwszy taki przypadek w całym ZSRR.
O ile krótko po wojnie zdarzały się rozboje i napady rabunkowe, zarówno banderowców jak i zwykłych bandytów, o tyle lata późniejsze to okres stosunkowo spokojnej koegzystencji Polaków i Ukraińców, których było we wsi coraz więcej.
W 1986 roku, pomiędzy 19 a 21 września miał miejsce Pierwszy Zjazd Pnikuczan, a w 1991 roku powstał we wsi Oddział Towarzystwa Kultury Polskiej Ziemi Lwowskiej.
Po rozpadzie ZSRR Pnikut jest częścią Ukrainy. Dnia 9 sierpnia 2009 roku obchodzono uroczyście 650 lecie powstania miejscowości.
{{Przypisy}}
== Linki zewnętrzne ==
* [http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VII/335] Pnikut w Słowniku Geograficznym Królestwa Polskiego i innych krajów słowiańskich, tVII
* [http://www.pnikut.net Pnikut.net], serwis mieszkańców dawnego Pnikuta
* [http://www.pnikut.com/ Strona parafialna]
{{Cytuj Wiki}}
[[Kategoria:Wsie obwodu lwowskiego]]
[[Kategoria:Rejon mościski]]
7c317eb390ebd3f7c40750cb522f883fd868caaa
666
665
2014-03-13T23:18:44Z
Ffkapa
2
/* Dwudziestolecie międzywojenne */
wikitext
text/x-wiki
{{Spis treści}}
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim]]<ref name=":18">{{Dziennik Ustaw|rok=1934|numer=64|pozycja=547}}</ref>. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
We wsi działa oddział [[Towarzystwo Kultury Polskiej Ziemi Lwowskiej|Towarzystwa Kultury Polskiej Ziemi Lwowskiej]]<ref>[http://tkpzl.lviv.ua/pl/pages/21/ Towarzystwo Kultury Polskiej Ziemi Lwowskiej]</ref>.
== Mieszkańcy ==
=== Zmiany demograficzne ===
Od najdawniejszych lat Pnikut zamieszkiwali głównie [[Polacy]]. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiają się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów<ref name=":15">L. Świtalski, Kronika Pnikuta, Pnikut 25.X.1905</ref>.
Około 1800 roku wieś zamieszkują 722 osoby<ref name=":15" />. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie [[Kościół rzymskokatolicki|kościoła rzymskokatolickiego]], 17 to [[Kościoły greckokatolickie|grekokatolicy]] a 41 to zwolennicy [[Judaizm|wyznania mojżeszowego]]<ref name=":14">[http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VIII/335 Słownik Geograficzny Królestwa Polskiego, Warszawa 1880, t.VIII]</ref>. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców<ref name=":15" />. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób<ref>Rocznik Diecezji Przemyskiej, ob. Łać. 1938 Przemyśl 1938, Nakładem Kurii Biskupiej ob. łać.</ref>.
=== Rozwój oświaty i kultury ===
W osiemdziesiątych latach XIX wieku powstaje w Pnikucie pierwsza szkoła prowadzona przez Michała Skwirzyńskiego{{fakt|data=2014-02}} w jego domu, a przed 1890 rokiem, w budynku zbudowanym przez mieszkańców powstaje szkoła czteroklasowa, której kierownikiem zostaje Jan Filip<ref name=":23">Rys monograficzny dziejów wsi Pnikut w okresie 1914 - 1945, Praca zbiorowa pod redakcją F. Dorosza, Przemyśl,1986</ref>. Jeszcze przed 1900 rokiem powstało w Pnikucie koło organizacji "Sokół" a w jego ramach zespoły: teatralny, muzyczny, recytatorski i chóralny, natomiast w 1910 roku zbudowano budynek tzw. "Sokolni"<ref>S. Żółkiewicz, Rys historyczny Pnikuta (Ukraina), Przemyśl, 2009</ref>. Na terenie wsi działał Związek Katolicki do którego należało 320 mieszkańców<ref>Kronika Diecezji Przemyskiej, Przemyśl, 1914</ref>. W Pnikucie jeszcze przed I Wojną Światową istniała spółdzielnia mleczarska, kółko rolnicze, dwa sklepy, "Ochronka" dla dzieci i kasa Reiffeisena<ref>[http://jbc.bj.uj.edu.pl/dlibra/results?action=SearchAction&skipSearch=true&mdirids=1&server%3Atype=both&tempQueryType=-3&encode=false&isExpandable=on&isRemote=off&roleId=-3&queryType=-3&dirids=1&rootid=74846&query=pnikut&localQueryType=-3&remoteQueryType=-2 Przyjaciel Ludu, nr. 30, 21.07.1912]</ref>.
W 1921 roku powstaje w Pnikucie Dom Ludowy mieszczący między innymi salkę teatralną wraz z zapleczem i dwie sale wykładowe. Uroczystość otwarcia i poświęcenia domu uświetnił swą obecnością [[Marszałek Sejmu Rzeczypospolitej Polskiej|Marszałek Sejmu RP]] [[Maciej Rataj]]<ref name=":23" />. Po śmierci Jana Filipa w 1923 roku nowym kierownikiem szkoły zostaje Włodzimierz Raba, a po nim Stefania Weintraubowa. We wsi działa prowadzona przez Kazimierza Lecha biblioteka. W 1928 roku kierownikiem szkoły zostaje Kazimierz Kwiatkowski, były legionista. Pod jego kierownictwem szkoła zmienia się z czteroklasowej w siedmioklasową<ref name=":23" />.
W okresie okupacji istniała w Pnikucie szkoła w której nauczano w języku polskim, a języka niemieckiego nie uczono wcale. Po wojnie językiem nauczania stał się język ukraiński a dodatkowo nauczano języka rosyjskiego. Dzieci języka polskiego uczono w domach i na lekcjach religii w Kościele<ref name=":22">[http://www.pnikut.net/teksty/historia_miejscowosci_pnikut.pdf K. Zarański, Historia miejscowości Pnikut]</ref>.
=== Dzieje kościoła ===
[[Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg|thumb|223x223px|Kapliczka na miejscu starego kościoła]]
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|270x270px|Kościół św. Mikołaja w Pnikucie]]
Pierwsze wzmianki o kościele rzymskokatolickim w Pnikucie pochodzą z około 1385 roku<ref name=":15" />. Ponad dwieście lat później bo w roku 1611 na miejscu starego kościoła powstaje nowy. Budynek był drewniany, otoczony wałem i fosą z mostem zwodzonym i palisadą. W 1648 roku kościół wraz ze zgromadzonymi w nim ludźmi zostaje spalony przez kozaków<ref name=":15" />. W 1667 roku, na miejscu spalonego powstaje nowy kościół. Świątynia przetrwała prawie sto lat. Z polecenia biskupa Sierakowskiego i z funduszy Kapituły Przemyskiej w 1762 roku rozpoczęto budowę nowego kościoła. Po pięciu latach 27 lipca 1767 roku świątynię konsekrowano<ref name=":11">[http://www.pnikut.com/ Strona parafialna]</ref>. Kościół służył parafii do 1912 roku, po czym został rozebrany i złożony ponownie w 1929 roku, w [[Laszki Zawiązane|Laszkach Zawiązanych]]<ref name=":11" />. Po kościele pozostała kapliczka, istniejąca do dnia dzisiejszego.
Na przełomie wieków staraniem proboszcza parafii ks. L. Świtalskiego rozpoczynają się prace nad nową, murowaną świątynią dla Pnikuta. W 1901 r. powstaje projekt kościoła sporządzony przez Maksymiliana Jabłońskiego z Dobromila. W kwietniu 1908 roku rozpoczęto budowę, w październiku 1909 roku pokryto dach kościoła, a latem 1910 roku wytynkowano wnętrze. W dniu 6 grudnia 1912 r. kościół został poświęcony. Po usunięciu zniszczeń z okresu I wojny światowej w 1921 roku kościół powtórnie poświęcono<ref name=":11" />, a w 1927 r. zamontowano trzy nowe dzwony z odlewni Felczyńskich w Przemyślu<ref name=":12">N. Sarkady, Dziedzictwo w pejzaż wpisane. Opowieść o polskiej wsi Pnikut, Przemyśl 2010</ref>.
Obecnie w Pnikucie znajdują się dwie świątynie, opisywany kościół św. Mikołaja i [[cerkiew prawosławna]].
== Historia ==
Według niektórych źródeł Pnikut posiadał magdeburskie prawa miejskie już w XV wieku (wcześniej niż Przemyśl)<ref>G. Rokowski, Ziemia Lwowska, OW Rewasz, Piastkw, 2005</ref>. Pierwsze pewne informacje o Pnikucie pochodzą z 1359 roku<ref name=":12" />. Kilka lat później w 1366 roku, miejscowośc Pnekolt (tak nazywał się wówczas Pnikut) nabył Piotr Radciowski<ref name=":1">Akta Grodzkie i Ziemskie, t VIII</ref>, a 8 maja 1385 roku, kolejny właściciel, Piotr Stryjski zapisał Pnekolt (Pnikut) na rzecz biskupów przemyskich<ref>Akta Grodzkie i Ziemskie, t VII</ref>. W roku 1402 Kapituła Przemyska sprzedaje sołtystwo we wsi Pnikut Maciejowi, synowi krawca z Kazimierza<ref name=":1" />. Dnia 29 października 1408 roku [[Władysław II Jagiełło|Władysław Jagiełło]] uwalnia mieszkańców osiedlających się we wsi Pnikut i od wszelkich danin i ciężarów<ref name=":1" />. Pnikut wraca do Kapituły Przemyskiej w dniu 14 kwietnia 1417 roku, kupiony od "wdowy po Piotrze Fus za 212 grzywien ważnych"<ref name=":14" />. Dnia 14 czerwca 1462 r. następuje rozgraniczenie wsi Pnikut, Buchowice i Bolanowice<ref name=":14" />.
Są w Pnikucie miejsca historycznie ważne, nie tylko dla samej wsi. To tutaj miała miejsce regularna bitwa, gdy w 1672 roku podczas kolejnej wyprawy Mohamed IV w sojuszu z [[Tatarzy|Tatarami]] i Kozakami napadł na wschodnie rubieże Polski w tym ziemię przemyską. Dnia 8 października wspomnianego roku, obciążone łupami i jeńcami trzy [[Orda|ordy tatarskie]] zostały rozbite przez ochotników z [[Przemyśl]]a oraz mieszkańców Pnikuta, dowodzonych przez ks. Krystyna Szykowskiego, gwardiana o.o. Reformatów Przemyskich<ref name=":14" />. Po bitwie miejsce pochówku walecznych obrońców nazwane zostało Kalwaryjką i do dzisiaj mieszkańcy zapalają tam znicze w Święto Zmarłych.
W południowo - wschodniej części Pnikuta znajduje się wzniesienie do dzisiaj nazywane "Zamczyskiem". Według ludowych podań mieszkali tam dwaj strażnicy - obserwatorzy, których zadaniem było informowanie mieszkańców o zbliżającym się niebezpieczeństwie. Dziś nie wiadomo, jaki był charakter tego miejsca, czy była to wieża obronna<ref name=":15" />, czy zamek<ref>[http://www.pbc.rzeszow.pl/dlibra/docmetadata?id=4771&from=publication M. Orłowicz, Ilustrowany Przewodnik po Przemyślu i okolicy, Zjednoczenie Towarzystw Polskich, Przemyśl, 1917]</ref>.
=== I Wojna Światowa ===
Okres I Wojny Światowej to przede wszystkim olbrzymie zniszczenia, przestaje istnieć Sokolnia i mleczarnia, część gospodarstw spłonęło lub zostało rozebranych czy zburzonych. Zginęło wielu mieszkańców. Pnikuczanie walczyli na polach wielu bitew. W [[Legiony Polskie 1914-1918|Legionach]]: Walenty Miśniak (kawaler orderu Virtuti - Militari), Władysław Dorosz (wielokrotnie odznaczony), Bronisław Kuśnierz, Michał Kuśnierz, Władysław Kuśnierz, Józef Żółkiewicz, Szymon Bazanowski, Bartłomiej Gawron, Błażej Dorosz, Marek Muszak, Ludwik Muszak, Ludwik Folta, Stanisław Czop, Mateusz Wiącek s. Jana, Sylwester Pawłowski, Józef Muszak. W armii Hallera służyli: Jan Miśniak, Franciszek Czerniec, Jan Czerniec, Antoni Czerniec, Fabian Paprocki, Wawrzyniec Gładysz, Jan Ździobek, Franciszek Skrabka, Antoni Dorosz<ref name=":22" />.
=== Dwudziestolecie międzywojenne ===
Po I Wojnie Światowej powstaje komórka Związku Strzeleckiego "Strzelec", powołana zostaje z inicjatywy mieszkańców Kasa Stefczyka, a także tworzy się Ochotnicza Straż Pożarna pod komendą Andrzeja Piwowara. Z inicjatywy księdza Walerego Motyki, powstaje Katolicki Związek Młodzieży Żeńskiej i Męskiej (Akcja Katolicka). Pod przewodnictwem Walentego Miśniaka działa komórka BBWR (Bezpartyjny Blok Współpracy z Rządem). Silną organizacją jest też Stronnictwo Ludowe oraz Związek Młodzieży Wiejskiej "WICI"<ref name=":23" />.
Pierwszego sierpnia 1934 roku na mocy ustawy<ref name=":18" /> powołano zbiorczą gminę Pnikut. W jej skład wchodzą miejscowości: [[Buchowice]], [[Chliple]], [[Czyżowice (Ukraina)|Czyżowice]], Hańkowice, [[Jatwięgi]], [[Krukienice]], [[Ostrożec (rejon mościski)|Ostrożec]], Pnikut, [[Podliski (rejon mościski)|Podliski]], [[Radenice]], [[Sudkowice]], [[Wiszenka (rejon mościski)|Wiszenka]]. W tym czasie parafia Pnikucka składała się z Pnikuta, Buchowic i Pakości. Głównym właścicielem ziemi jest Kapituła Przemyska. W okresie międzywojennym we wsi działałją dwa młyny wodne, olejarnia, trzy warsztaty tkackie, cegielnia, nowoczesna mleczarnia, trzy kuźnie, dziesięciu szewców, trzynastu krawców, trzech rymarzy, dwóch kołodziejów, przewoźnik, dwudziestu fryzjerów, ośmiu stolarzy, dziesięciu cieśli, pięciu murarzy, dwóch blacharzy i jeden studniarz<ref name=":23" />.
=== II Wojna Światowa ===
W połowie września 1939 roku do Pnikuta wkraczają Niemcy w marszu na [[Lwów]]. Po agresji ZSRR na Polskę armia niemiecka cofa się i po raz drugi przechodzi przez wieś, a wkrótce po Niemcach przychodzą Rosjanie. W międzyczasie w Pnikucie, w drodze na Węgry stacjonuje oddział dowodzony przez gen. Władysława Andersa<ref name=":23" />. Niedaleko, pod Starym Samborem, gen. Anders zostaje dwukrotnie ranny i wzięty do niewoli (29 września).
Okres pierwszej okupacji sowieckiej to życie w strachu przed aresztowaniem i śmiercią. Antypolskie nastawienie Rosjan, denuncjacje polskich patriotów przez Żydów i nacjonalistów Ukraińskich oraz przymusowe wcielenia do Armii Radzieckiej (mężczyźni urodzeni w latach 1918 - 1921) potęgowały niepokój i niepewność jutra. Po 2 czerwca 1941 roku (atak Niemiec na ZSRR) wojska Wermachtu po raz kolejny przechodzą przez Pnikut. W okresie okupacji niemieckiej na terenie wsi odbudowuje się konspiracyjny ruch oporu.
W Pnikucie oprócz Niemców działała również Granatowa Policja rekrutowana głównie ze współpracujących z okupantem Ukraińców z Buchowic. W tym okresie Niemcy tolerowali działalność UPA i innych ukraińskich ruchów nacjonalistycznych. Polacy organizują samoobronę. Budowane są miejsca ukrycia (zamaskowane schrony), a mężczyźni uzbrojeni w widły i kosy, ale również w broń palną informowani są o zagrożeniu biciem kościelnych dzwonów<ref name=":22" />.
Na przełomie 1943 i 1944 roku do Pnikuta przybywają oddziały Armii Krajowej które początkowo ukrywają się u mieszkańców a następnie w podpnikuckim lesie. Wielu mieszkańców przyłącza się do partyzantów, praktycznie cała wieś zaopatruje ich w żywność. W obawie przed kontrolą wiezione na wozie jedzenie ukrywano w sianie a woźnicami byli młodzi chłopcy, dzieci by nie wzbudzać podejrzeń. Okres ten to czas względnego spokoju ze strony banderowców, którzy obawiali się polskich partyzantów<ref name=":22" />.
Podczas II Wojny Światowej zginęło ponad 40 mieszkańców wsi, 27 zostało aresztowanych przez Gestapo, a 86 wywieziono na roboty do Niemiec z których większość wróciła po wojnie do rodzinnych domów<ref name=":22" />. Pnikuczanie walczyli pod Monte Cassino i w wielu innych bitwach pod dowództwem między innymi gen. Andersa. Wielu powołano w szeregi Ludowego Wojska Polskiego do I i II Armii<ref name=":23" />.
=== Okres powojenny ===
Po II Wojnie Światowej, Pnikut na mocy ustaleń w Jałcie znalazł się w granicach Związku Radzieckiego. Wielu wierzyło, że to okres przejściowy i wkrótce wszystko wróci do stanu sprzed wojny. I fala repatriacji to lata 1945 - 1947. Polacy jechali w nieznane, zostawiając wszystko, co było dla nich cenne i ważne.
Bardzo długo Pnikut opierał się kolektywizacji i prawdopodobnie był ostatnią wsią w okręgu, jaka przystąpiła do kołchozu.
W latach 1956 - 1958 miała miejsce druga fala repatriacji. Ludzie stracili nadzieję, że Pnikut wróci w granice Polski. Ogółem po wojnie wyjechało z Pnikuta 420 polskich rodzin, a ponad 90 rodzin zostało<ref name=":22" />.
Gdy w 1945 roku wieloletni proboszcz ks. Tomasz Szurek musiał opuścić parafię, na jego miejsce przybył [[Jerzy Ablewicz|ks. Jerzy Ablewicz]]. Po jego wyjeździe w 1946 roku władze nie wydały zezwolenia na pracę innego kapłana w Pnikuckiej parafii. Mieszkańcy jednak nigdy nie oddali kluczy od kościoła i choć wieś obciążono wysokimi podatkami, świątynia pozostała w dyspozycji parafian. Po wieloletnich zabiegach ze strony mieszkańców, dopiero w 1987 roku władza oficjalnie zezwoliła na odprawianie nabożeństw w kościele. Był to pierwszy taki przypadek w całym ZSRR.
O ile krótko po wojnie zdarzały się rozboje i napady rabunkowe, zarówno banderowców jak i zwykłych bandytów, o tyle lata późniejsze to okres stosunkowo spokojnej koegzystencji Polaków i Ukraińców, których było we wsi coraz więcej.
W 1986 roku, pomiędzy 19 a 21 września miał miejsce Pierwszy Zjazd Pnikuczan, a w 1991 roku powstał we wsi Oddział Towarzystwa Kultury Polskiej Ziemi Lwowskiej.
Po rozpadzie ZSRR Pnikut jest częścią Ukrainy. Dnia 9 sierpnia 2009 roku obchodzono uroczyście 650 lecie powstania miejscowości.
{{Przypisy}}
== Linki zewnętrzne ==
* [http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VII/335] Pnikut w Słowniku Geograficznym Królestwa Polskiego i innych krajów słowiańskich, tVII
* [http://www.pnikut.net Pnikut.net], serwis mieszkańców dawnego Pnikuta
* [http://www.pnikut.com/ Strona parafialna]
{{Cytuj Wiki}}
[[Kategoria:Wsie obwodu lwowskiego]]
[[Kategoria:Rejon mościski]]
50206257c177582718383db43b639e5221297972
665
562
2014-03-13T23:17:16Z
Ffkapa
2
wikitext
text/x-wiki
{{Spis treści}}
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim]]<ref name=":18">{{Dziennik Ustaw|rok=1934|numer=64|pozycja=547}}</ref>. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
We wsi działa oddział [[Towarzystwo Kultury Polskiej Ziemi Lwowskiej|Towarzystwa Kultury Polskiej Ziemi Lwowskiej]]<ref>[http://tkpzl.lviv.ua/pl/pages/21/ Towarzystwo Kultury Polskiej Ziemi Lwowskiej]</ref>.
== Mieszkańcy ==
=== Zmiany demograficzne ===
Od najdawniejszych lat Pnikut zamieszkiwali głównie [[Polacy]]. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiają się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów<ref name=":15">L. Świtalski, Kronika Pnikuta, Pnikut 25.X.1905</ref>.
Około 1800 roku wieś zamieszkują 722 osoby<ref name=":15" />. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie [[Kościół rzymskokatolicki|kościoła rzymskokatolickiego]], 17 to [[Kościoły greckokatolickie|grekokatolicy]] a 41 to zwolennicy [[Judaizm|wyznania mojżeszowego]]<ref name=":14">[http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VIII/335 Słownik Geograficzny Królestwa Polskiego, Warszawa 1880, t.VIII]</ref>. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców<ref name=":15" />. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób<ref>Rocznik Diecezji Przemyskiej, ob. Łać. 1938 Przemyśl 1938, Nakładem Kurii Biskupiej ob. łać.</ref>.
=== Rozwój oświaty i kultury ===
W osiemdziesiątych latach XIX wieku powstaje w Pnikucie pierwsza szkoła prowadzona przez Michała Skwirzyńskiego{{fakt|data=2014-02}} w jego domu, a przed 1890 rokiem, w budynku zbudowanym przez mieszkańców powstaje szkoła czteroklasowa, której kierownikiem zostaje Jan Filip<ref name=":23">Rys monograficzny dziejów wsi Pnikut w okresie 1914 - 1945, Praca zbiorowa pod redakcją F. Dorosza, Przemyśl,1986</ref>. Jeszcze przed 1900 rokiem powstało w Pnikucie koło organizacji "Sokół" a w jego ramach zespoły: teatralny, muzyczny, recytatorski i chóralny, natomiast w 1910 roku zbudowano budynek tzw. "Sokolni"<ref>S. Żółkiewicz, Rys historyczny Pnikuta (Ukraina), Przemyśl, 2009</ref>. Na terenie wsi działał Związek Katolicki do którego należało 320 mieszkańców<ref>Kronika Diecezji Przemyskiej, Przemyśl, 1914</ref>. W Pnikucie jeszcze przed I Wojną Światową istniała spółdzielnia mleczarska, kółko rolnicze, dwa sklepy, "Ochronka" dla dzieci i kasa Reiffeisena<ref>[http://jbc.bj.uj.edu.pl/dlibra/results?action=SearchAction&skipSearch=true&mdirids=1&server%3Atype=both&tempQueryType=-3&encode=false&isExpandable=on&isRemote=off&roleId=-3&queryType=-3&dirids=1&rootid=74846&query=pnikut&localQueryType=-3&remoteQueryType=-2 Przyjaciel Ludu, nr. 30, 21.07.1912]</ref>.
W 1921 roku powstaje w Pnikucie Dom Ludowy mieszczący między innymi salkę teatralną wraz z zapleczem i dwie sale wykładowe. Uroczystość otwarcia i poświęcenia domu uświetnił swą obecnością [[Marszałek Sejmu Rzeczypospolitej Polskiej|Marszałek Sejmu RP]] [[Maciej Rataj]]<ref name=":23" />. Po śmierci Jana Filipa w 1923 roku nowym kierownikiem szkoły zostaje Włodzimierz Raba, a po nim Stefania Weintraubowa. We wsi działa prowadzona przez Kazimierza Lecha biblioteka. W 1928 roku kierownikiem szkoły zostaje Kazimierz Kwiatkowski, były legionista. Pod jego kierownictwem szkoła zmienia się z czteroklasowej w siedmioklasową<ref name=":23" />.
W okresie okupacji istniała w Pnikucie szkoła w której nauczano w języku polskim, a języka niemieckiego nie uczono wcale. Po wojnie językiem nauczania stał się język ukraiński a dodatkowo nauczano języka rosyjskiego. Dzieci języka polskiego uczono w domach i na lekcjach religii w Kościele<ref name=":22">[http://www.pnikut.net/teksty/historia_miejscowosci_pnikut.pdf K. Zarański, Historia miejscowości Pnikut]</ref>.
=== Dzieje kościoła ===
[[Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg|thumb|223x223px|Kapliczka na miejscu starego kościoła]]
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|270x270px|Kościół św. Mikołaja w Pnikucie]]
Pierwsze wzmianki o kościele rzymskokatolickim w Pnikucie pochodzą z około 1385 roku<ref name=":15" />. Ponad dwieście lat później bo w roku 1611 na miejscu starego kościoła powstaje nowy. Budynek był drewniany, otoczony wałem i fosą z mostem zwodzonym i palisadą. W 1648 roku kościół wraz ze zgromadzonymi w nim ludźmi zostaje spalony przez kozaków<ref name=":15" />. W 1667 roku, na miejscu spalonego powstaje nowy kościół. Świątynia przetrwała prawie sto lat. Z polecenia biskupa Sierakowskiego i z funduszy Kapituły Przemyskiej w 1762 roku rozpoczęto budowę nowego kościoła. Po pięciu latach 27 lipca 1767 roku świątynię konsekrowano<ref name=":11">[http://www.pnikut.com/ Strona parafialna]</ref>. Kościół służył parafii do 1912 roku, po czym został rozebrany i złożony ponownie w 1929 roku, w [[Laszki Zawiązane|Laszkach Zawiązanych]]<ref name=":11" />. Po kościele pozostała kapliczka, istniejąca do dnia dzisiejszego.
Na przełomie wieków staraniem proboszcza parafii ks. L. Świtalskiego rozpoczynają się prace nad nową, murowaną świątynią dla Pnikuta. W 1901 r. powstaje projekt kościoła sporządzony przez Maksymiliana Jabłońskiego z Dobromila. W kwietniu 1908 roku rozpoczęto budowę, w październiku 1909 roku pokryto dach kościoła, a latem 1910 roku wytynkowano wnętrze. W dniu 6 grudnia 1912 r. kościół został poświęcony. Po usunięciu zniszczeń z okresu I wojny światowej w 1921 roku kościół powtórnie poświęcono<ref name=":11" />, a w 1927 r. zamontowano trzy nowe dzwony z odlewni Felczyńskich w Przemyślu<ref name=":12">N. Sarkady, Dziedzictwo w pejzaż wpisane. Opowieść o polskiej wsi Pnikut, Przemyśl 2010</ref>.
Obecnie w Pnikucie znajdują się dwie świątynie, opisywany kościół św. Mikołaja i [[cerkiew prawosławna]].
== Historia ==
Według niektórych źródeł Pnikut posiadał magdeburskie prawa miejskie już w XV wieku (wcześniej niż Przemyśl)<ref>G. Rokowski, Ziemia Lwowska, OW Rewasz, Piastkw, 2005</ref>. Pierwsze pewne informacje o Pnikucie pochodzą z 1359 roku<ref name=":12" />. Kilka lat później w 1366 roku, miejscowośc Pnekolt (tak nazywał się wówczas Pnikut) nabył Piotr Radciowski<ref name=":1">Akta Grodzkie i Ziemskie, t VIII</ref>, a 8 maja 1385 roku, kolejny właściciel, Piotr Stryjski zapisał Pnekolt (Pnikut) na rzecz biskupów przemyskich<ref>Akta Grodzkie i Ziemskie, t VII</ref>. W roku 1402 Kapituła Przemyska sprzedaje sołtystwo we wsi Pnikut Maciejowi, synowi krawca z Kazimierza<ref name=":1" />. Dnia 29 października 1408 roku [[Władysław II Jagiełło|Władysław Jagiełło]] uwalnia mieszkańców osiedlających się we wsi Pnikut i od wszelkich danin i ciężarów<ref name=":1" />. Pnikut wraca do Kapituły Przemyskiej w dniu 14 kwietnia 1417 roku, kupiony od "wdowy po Piotrze Fus za 212 grzywien ważnych"<ref name=":14" />. Dnia 14 czerwca 1462 r. następuje rozgraniczenie wsi Pnikut, Buchowice i Bolanowice<ref name=":14" />.
Są w Pnikucie miejsca historycznie ważne, nie tylko dla samej wsi. To tutaj miała miejsce regularna bitwa, gdy w 1672 roku podczas kolejnej wyprawy Mohamed IV w sojuszu z [[Tatarzy|Tatarami]] i Kozakami napadł na wschodnie rubieże Polski w tym ziemię przemyską. Dnia 8 października wspomnianego roku, obciążone łupami i jeńcami trzy [[Orda|ordy tatarskie]] zostały rozbite przez ochotników z [[Przemyśl]]a oraz mieszkańców Pnikuta, dowodzonych przez ks. Krystyna Szykowskiego, gwardiana o.o. Reformatów Przemyskich<ref name=":14" />. Po bitwie miejsce pochówku walecznych obrońców nazwane zostało Kalwaryjką i do dzisiaj mieszkańcy zapalają tam znicze w Święto Zmarłych.
W południowo - wschodniej części Pnikuta znajduje się wzniesienie do dzisiaj nazywane "Zamczyskiem". Według ludowych podań mieszkali tam dwaj strażnicy - obserwatorzy, których zadaniem było informowanie mieszkańców o zbliżającym się niebezpieczeństwie. Dziś nie wiadomo, jaki był charakter tego miejsca, czy była to wieża obronna<ref name=":15" />, czy zamek<ref>[http://www.pbc.rzeszow.pl/dlibra/docmetadata?id=4771&from=publication M. Orłowicz, Ilustrowany Przewodnik po Przemyślu i okolicy, Zjednoczenie Towarzystw Polskich, Przemyśl, 1917]</ref>.
=== I Wojna Światowa ===
Okres I Wojny Światowej to przede wszystkim olbrzymie zniszczenia, przestaje istnieć Sokolnia i mleczarnia, część gospodarstw spłonęło lub zostało rozebranych czy zburzonych. Zginęło wielu mieszkańców. Pnikuczanie walczyli na polach wielu bitew. W [[Legiony Polskie 1914-1918|Legionach]]: Walenty Miśniak (kawaler orderu Virtuti - Militari), Władysław Dorosz (wielokrotnie odznaczony), Bronisław Kuśnierz, Michał Kuśnierz, Władysław Kuśnierz, Józef Żółkiewicz, Szymon Bazanowski, Bartłomiej Gawron, Błażej Dorosz, Marek Muszak, Ludwik Muszak, Ludwik Folta, Stanisław Czop, Mateusz Wiącek s. Jana, Sylwester Pawłowski, Józef Muszak. W armii Hallera służyli: Jan Miśniak, Franciszek Czerniec, Jan Czerniec, Antoni Czerniec, Fabian Paprocki, Wawrzyniec Gładysz, Jan Ździobek, Franciszek Skrabka, Antoni Dorosz<ref name=":22" />.
=== Dwudziestolecie międzywojenne ===
Po I Wojnie Światowej powstaje komórka [[Związek Strzelecki|Związku Strzeleckiego "Strzelec"]], powołana zostaje z inicjatywy mieszkańców [[Spółdzielcza kasa oszczędnościowo-kredytowa|Kasa Stefczyka]], a także tworzy się [[Ochotnicza Straż Pożarna]] pod komendą Andrzeja Piwowara. Z inicjatywy księdza Walerego Motyki, powstaje Katolicki Związek Młodzieży Żeńskiej i Męskiej ([[Akcja Katolicka w II Rzeczypospolitej|Akcja Katolicka]]). Pod przewodnictwem Walentego Miśniaka działa komórka BBWR (Bezpartyjny Blok Współpracy z Rządem). Silną organizacją jest też Stronnictwo Ludowe oraz Związek Młodzieży Wiejskiej "WICI"<ref name=":23" />.
Pierwszego sierpnia 1934 roku na mocy ustawy<ref name=":18" /> powołano zbiorczą gminę Pnikut. W jej skład wchodzą miejscowości: [[Buchowice]], [[Chliple]], [[Czyżowice (Ukraina)|Czyżowice]], Hańkowice, [[Jatwięgi]], [[Krukienice]], [[Ostrożec (rejon mościski)|Ostrożec]], Pnikut, [[Podliski (rejon mościski)|Podliski]], [[Radenice]], [[Sudkowice]], [[Wiszenka (rejon mościski)|Wiszenka]]. W tym czasie parafia Pnikucka składała się z Pnikuta, Buchowic i Pakości. Głównym właścicielem ziemi jest Kapituła Przemyska. W okresie międzywojennym we wsi działałją dwa młyny wodne, olejarnia, trzy warsztaty tkackie, cegielnia, nowoczesna mleczarnia, trzy kuźnie, dziesięciu szewców, trzynastu krawców, trzech rymarzy, dwóch kołodziejów, przewoźnik, dwudziestu fryzjerów, ośmiu stolarzy, dziesięciu cieśli, pięciu murarzy, dwóch blacharzy i jeden studniarz<ref name=":23" />.
=== II Wojna Światowa ===
W połowie września 1939 roku do Pnikuta wkraczają Niemcy w marszu na [[Lwów]]. Po agresji ZSRR na Polskę armia niemiecka cofa się i po raz drugi przechodzi przez wieś, a wkrótce po Niemcach przychodzą Rosjanie. W międzyczasie w Pnikucie, w drodze na Węgry stacjonuje oddział dowodzony przez gen. Władysława Andersa<ref name=":23" />. Niedaleko, pod Starym Samborem, gen. Anders zostaje dwukrotnie ranny i wzięty do niewoli (29 września).
Okres pierwszej okupacji sowieckiej to życie w strachu przed aresztowaniem i śmiercią. Antypolskie nastawienie Rosjan, denuncjacje polskich patriotów przez Żydów i nacjonalistów Ukraińskich oraz przymusowe wcielenia do Armii Radzieckiej (mężczyźni urodzeni w latach 1918 - 1921) potęgowały niepokój i niepewność jutra. Po 2 czerwca 1941 roku (atak Niemiec na ZSRR) wojska Wermachtu po raz kolejny przechodzą przez Pnikut. W okresie okupacji niemieckiej na terenie wsi odbudowuje się konspiracyjny ruch oporu.
W Pnikucie oprócz Niemców działała również Granatowa Policja rekrutowana głównie ze współpracujących z okupantem Ukraińców z Buchowic. W tym okresie Niemcy tolerowali działalność UPA i innych ukraińskich ruchów nacjonalistycznych. Polacy organizują samoobronę. Budowane są miejsca ukrycia (zamaskowane schrony), a mężczyźni uzbrojeni w widły i kosy, ale również w broń palną informowani są o zagrożeniu biciem kościelnych dzwonów<ref name=":22" />.
Na przełomie 1943 i 1944 roku do Pnikuta przybywają oddziały Armii Krajowej które początkowo ukrywają się u mieszkańców a następnie w podpnikuckim lesie. Wielu mieszkańców przyłącza się do partyzantów, praktycznie cała wieś zaopatruje ich w żywność. W obawie przed kontrolą wiezione na wozie jedzenie ukrywano w sianie a woźnicami byli młodzi chłopcy, dzieci by nie wzbudzać podejrzeń. Okres ten to czas względnego spokoju ze strony banderowców, którzy obawiali się polskich partyzantów<ref name=":22" />.
Podczas II Wojny Światowej zginęło ponad 40 mieszkańców wsi, 27 zostało aresztowanych przez Gestapo, a 86 wywieziono na roboty do Niemiec z których większość wróciła po wojnie do rodzinnych domów<ref name=":22" />. Pnikuczanie walczyli pod Monte Cassino i w wielu innych bitwach pod dowództwem między innymi gen. Andersa. Wielu powołano w szeregi Ludowego Wojska Polskiego do I i II Armii<ref name=":23" />.
=== Okres powojenny ===
Po II Wojnie Światowej, Pnikut na mocy ustaleń w Jałcie znalazł się w granicach Związku Radzieckiego. Wielu wierzyło, że to okres przejściowy i wkrótce wszystko wróci do stanu sprzed wojny. I fala repatriacji to lata 1945 - 1947. Polacy jechali w nieznane, zostawiając wszystko, co było dla nich cenne i ważne.
Bardzo długo Pnikut opierał się kolektywizacji i prawdopodobnie był ostatnią wsią w okręgu, jaka przystąpiła do kołchozu.
W latach 1956 - 1958 miała miejsce druga fala repatriacji. Ludzie stracili nadzieję, że Pnikut wróci w granice Polski. Ogółem po wojnie wyjechało z Pnikuta 420 polskich rodzin, a ponad 90 rodzin zostało<ref name=":22" />.
Gdy w 1945 roku wieloletni proboszcz ks. Tomasz Szurek musiał opuścić parafię, na jego miejsce przybył [[Jerzy Ablewicz|ks. Jerzy Ablewicz]]. Po jego wyjeździe w 1946 roku władze nie wydały zezwolenia na pracę innego kapłana w Pnikuckiej parafii. Mieszkańcy jednak nigdy nie oddali kluczy od kościoła i choć wieś obciążono wysokimi podatkami, świątynia pozostała w dyspozycji parafian. Po wieloletnich zabiegach ze strony mieszkańców, dopiero w 1987 roku władza oficjalnie zezwoliła na odprawianie nabożeństw w kościele. Był to pierwszy taki przypadek w całym ZSRR.
O ile krótko po wojnie zdarzały się rozboje i napady rabunkowe, zarówno banderowców jak i zwykłych bandytów, o tyle lata późniejsze to okres stosunkowo spokojnej koegzystencji Polaków i Ukraińców, których było we wsi coraz więcej.
W 1986 roku, pomiędzy 19 a 21 września miał miejsce Pierwszy Zjazd Pnikuczan, a w 1991 roku powstał we wsi Oddział Towarzystwa Kultury Polskiej Ziemi Lwowskiej.
Po rozpadzie ZSRR Pnikut jest częścią Ukrainy. Dnia 9 sierpnia 2009 roku obchodzono uroczyście 650 lecie powstania miejscowości.
{{Przypisy}}
== Linki zewnętrzne ==
* [http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VII/335] Pnikut w Słowniku Geograficznym Królestwa Polskiego i innych krajów słowiańskich, tVII
* [http://www.pnikut.net Pnikut.net], serwis mieszkańców dawnego Pnikuta
* [http://www.pnikut.com/ Strona parafialna]
{{Cytuj Wiki}}
[[Kategoria:Wsie obwodu lwowskiego]]
[[Kategoria:Rejon mościski]]
e7cd06abe16438ff4dd1673f4073ea1be46f80b5
562
537
2014-03-11T14:32:09Z
Ffkapa
2
red
wikitext
text/x-wiki
{{Spis treści}}
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w [[1359]] r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim]]<ref name=":18">{{Dziennik Ustaw|rok=1934|numer=64|pozycja=547}}</ref>. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
We wsi działa oddział [[Towarzystwo Kultury Polskiej Ziemi Lwowskiej|Towarzystwa Kultury Polskiej Ziemi Lwowskiej]]<ref>[http://tkpzl.lviv.ua/pl/pages/21/ Towarzystwo Kultury Polskiej Ziemi Lwowskiej]</ref>.
== Mieszkańcy ==
=== Zmiany demograficzne ===
Od najdawniejszych lat Pnikut zamieszkiwali głównie [[Polacy]]. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiają się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów<ref name=":15">L. Świtalski, Kronika Pnikuta, Pnikut 25.X.1905</ref>.
Około 1800 roku wieś zamieszkują 722 osoby<ref name=":15" />. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie [[Kościół rzymskokatolicki|kościoła rzymskokatolickiego]], 17 to [[Kościoły greckokatolickie|grekokatolicy]] a 41 to zwolennicy [[Judaizm|wyznania mojżeszowego]]<ref name=":14">[http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VIII/335 Słownik Geograficzny Królestwa Polskiego, Warszawa 1880, t.VIII]</ref>. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców<ref name=":15" />. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób<ref>Rocznik Diecezji Przemyskiej, ob. Łać. 1938 Przemyśl 1938, Nakładem Kurii Biskupiej ob. łać.</ref>.
=== Rozwój oświaty i kultury ===
W osiemdziesiątych latach XIX wieku powstaje w Pnikucie pierwsza szkoła prowadzona przez Michała Skwirzyńskiego{{fakt|data=2014-02}} w jego domu, a przed 1890 rokiem, w budynku zbudowanym przez mieszkańców powstaje szkoła czteroklasowa, której kierownikiem zostaje Jan Filip<ref name=":23">Rys monograficzny dziejów wsi Pnikut w okresie 1914 - 1945, Praca zbiorowa pod redakcją F. Dorosza, Przemyśl,1986</ref>. Jeszcze przed 1900 rokiem powstało w Pnikucie koło organizacji "Sokół" a w jego ramach zespoły: teatralny, muzyczny, recytatorski i chóralny, natomiast w 1910 roku zbudowano budynek tzw. "Sokolni"<ref>S. Żółkiewicz, Rys historyczny Pnikuta (Ukraina), Przemyśl, 2009</ref>. Na terenie wsi działał Związek Katolicki do którego należało 320 mieszkańców<ref>Kronika Diecezji Przemyskiej, Przemyśl, 1914</ref>. W Pnikucie jeszcze przed I Wojną Światową istniała spółdzielnia mleczarska, kółko rolnicze, dwa sklepy, "Ochronka" dla dzieci i kasa Reiffeisena<ref>[http://jbc.bj.uj.edu.pl/dlibra/results?action=SearchAction&skipSearch=true&mdirids=1&server%3Atype=both&tempQueryType=-3&encode=false&isExpandable=on&isRemote=off&roleId=-3&queryType=-3&dirids=1&rootid=74846&query=pnikut&localQueryType=-3&remoteQueryType=-2 Przyjaciel Ludu, nr. 30, 21.07.1912]</ref>.
W 1921 roku powstaje w Pnikucie Dom Ludowy mieszczący między innymi salkę teatralną wraz z zapleczem i dwie sale wykładowe. Uroczystość otwarcia i poświęcenia domu uświetnił swą obecnością [[Marszałek Sejmu Rzeczypospolitej Polskiej|Marszałek Sejmu RP]] [[Maciej Rataj]]<ref name=":23" />. Po śmierci Jana Filipa w 1923 roku nowym kierownikiem szkoły zostaje Włodzimierz Raba, a po nim Stefania Weintraubowa. We wsi działa prowadzona przez Kazimierza Lecha biblioteka. W 1928 roku kierownikiem szkoły zostaje Kazimierz Kwiatkowski, były legionista. Pod jego kierownictwem szkoła zmienia się z czteroklasowej w siedmioklasową<ref name=":23" />.
W okresie okupacji istniała w Pnikucie szkoła w której nauczano w języku polskim, a języka niemieckiego nie uczono wcale. Po wojnie językiem nauczania stał się język ukraiński a dodatkowo nauczano języka rosyjskiego. Dzieci języka polskiego uczono w domach i na lekcjach religii w Kościele<ref name=":22">[http://www.pnikut.net/teksty/historia_miejscowosci_pnikut.pdf K. Zarański, Historia miejscowości Pnikut]</ref>.
=== Dzieje kościoła ===
[[Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg|thumb|223x223px|Kapliczka na miejscu starego kościoła]]
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|270x270px|Kościół św. Mikołaja w Pnikucie]]
Pierwsze wzmianki o kościele rzymskokatolickim w Pnikucie pochodzą z około 1385 roku<ref name=":15" />. Ponad dwieście lat później bo w roku 1611 na miejscu starego kościoła powstaje nowy. Budynek był drewniany, otoczony wałem i fosą z mostem zwodzonym i palisadą. W 1648 roku kościół wraz ze zgromadzonymi w nim ludźmi zostaje spalony przez kozaków<ref name=":15" />. W 1667 roku, na miejscu spalonego powstaje nowy kościół. Świątynia przetrwała prawie sto lat. Z polecenia biskupa Sierakowskiego i z funduszy Kapituły Przemyskiej w 1762 roku rozpoczęto budowę nowego kościoła. Po pięciu latach 27 lipca 1767 roku świątynię konsekrowano<ref name=":11">[http://www.pnikut.com/ Strona parafialna]</ref>. Kościół służył parafii do 1912 roku, po czym został rozebrany i złożony ponownie w 1929 roku, w [[Laszki Zawiązane|Laszkach Zawiązanych]]<ref name=":11" />. Po kościele pozostała kapliczka, istniejąca do dnia dzisiejszego.
Na przełomie wieków staraniem proboszcza parafii ks. L. Świtalskiego rozpoczynają się prace nad nową, murowaną świątynią dla Pnikuta. W 1901 r. powstaje projekt kościoła sporządzony przez Maksymiliana Jabłońskiego z Dobromila. W kwietniu 1908 roku rozpoczęto budowę, w październiku 1909 roku pokryto dach kościoła, a latem 1910 roku wytynkowano wnętrze. W dniu 6 grudnia 1912 r. kościół został poświęcony. Po usunięciu zniszczeń z okresu I wojny światowej w 1921 roku kościół powtórnie poświęcono<ref name=":11" />, a w 1927 r. zamontowano trzy nowe dzwony z odlewni [[Felczyńscy|Felczyńskich]] w Przemyślu<ref name=":12">N. Sarkady, Dziedzictwo w pejzaż wpisane. Opowieść o polskiej wsi Pnikut, Przemyśl 2010</ref>.
Obecnie w Pnikucie znajdują się dwie świątynie, opisywany kościół św. Mikołaja i [[cerkiew prawosławna]].
== Historia ==
Według niektórych źródeł Pnikut posiadał [[Prawo magdeburskie|magdeburskie prawa miejskie]] już w XV wieku (wcześniej niż Przemyśl)<ref>G. Rokowski, Ziemia Lwowska, OW Rewasz, Piastkw, 2005</ref>. Pierwsze pewne informacje o Pnikucie pochodzą z 1359 roku<ref name=":12" />. Kilka lat później w 1366 roku, miejscowośc Pnekolt (tak nazywał się wówczas Pnikut) nabył Piotr Radciowski<ref name=":1">Akta Grodzkie i Ziemskie, t VIII</ref>, a 8 maja 1385 roku, kolejny właściciel, Piotr Stryjski zapisał Pnekolt (Pnikut) na rzecz [[Biskupi przemyscy|biskupów przemyskich]]<ref>Akta Grodzkie i Ziemskie, t VII</ref>. W roku 1402 Kapituła Przemyska sprzedaje sołtystwo we wsi Pnikut Maciejowi, synowi krawca z Kazimierza<ref name=":1" />. Dnia 29 października 1408 roku [[Władysław II Jagiełło|Władysław Jagiełło]] uwalnia mieszkańców osiedlających się we wsi Pnikut i od wszelkich danin i ciężarów<ref name=":1" />. Pnikut wraca do Kapituły Przemyskiej w dniu 14 kwietnia 1417 roku, kupiony od "wdowy po Piotrze Fus za 212 grzywien ważnych"<ref name=":14" />. Dnia 14 czerwca 1462 r. następuje rozgraniczenie wsi Pnikut, Buchowice i Bolanowice<ref name=":14" />.
Są w Pnikucie miejsca historycznie ważne, nie tylko dla samej wsi. To tutaj miała miejsce regularna bitwa, gdy w 1672 roku podczas kolejnej wyprawy Mohamed IV w sojuszu z [[Tatarzy|Tatarami]] i Kozakami napadł na wschodnie rubieże Polski w tym ziemię przemyską. Dnia 8 października wspomnianego roku, obciążone łupami i jeńcami trzy [[Orda|ordy tatarskie]] zostały rozbite przez ochotników z [[Przemyśl]]a oraz mieszkańców Pnikuta, dowodzonych przez ks. Krystyna Szykowskiego, gwardiana o.o. Reformatów Przemyskich<ref name=":14" />. Po bitwie miejsce pochówku walecznych obrońców nazwane zostało Kalwaryjką i do dzisiaj mieszkańcy zapalają tam znicze w [[Wszystkich Świętych|Święto Zmarłych]].
W południowo - wschodniej części Pnikuta znajduje się wzniesienie do dzisiaj nazywane "Zamczyskiem". Według ludowych podań mieszkali tam dwaj strażnicy - obserwatorzy, których zadaniem było informowanie mieszkańców o zbliżającym się niebezpieczeństwie. Dziś nie wiadomo, jaki był charakter tego miejsca, czy była to wieża obronna<ref name=":15" />, czy zamek<ref>[http://www.pbc.rzeszow.pl/dlibra/docmetadata?id=4771&from=publication M. Orłowicz, Ilustrowany Przewodnik po Przemyślu i okolicy, Zjednoczenie Towarzystw Polskich, Przemyśl, 1917]</ref>.
=== I Wojna Światowa ===
Okres I Wojny Światowej to przede wszystkim olbrzymie zniszczenia, przestaje istnieć Sokolnia i mleczarnia, część gospodarstw spłonęło lub zostało rozebranych czy zburzonych. Zginęło wielu mieszkańców. Pnikuczanie walczyli na polach wielu bitew. W [[Legiony Polskie 1914-1918|Legionach]]: Walenty Miśniak (kawaler [[Order Virtuti Militari|orderu Virtuti - Militari]]), Władysław Dorosz (wielokrotnie odznaczony), Bronisław Kuśnierz, Michał Kuśnierz, Władysław Kuśnierz, Józef Żółkiewicz, Szymon Bazanowski, Bartłomiej Gawron, Błażej Dorosz, Marek Muszak, Ludwik Muszak, Ludwik Folta, Stanisław Czop, Mateusz Wiącek s. Jana, Sylwester Pawłowski, Józef Muszak. W armii Hallera służyli: Jan Miśniak, Franciszek Czerniec, Jan Czerniec, Antoni Czerniec, Fabian Paprocki, Wawrzyniec Gładysz, Jan Ździobek, Franciszek Skrabka, Antoni Dorosz<ref name=":22" />.
=== Dwudziestolecie międzywojenne ===
Po I Wojnie Światowej powstaje komórka [[Związek Strzelecki|Związku Strzeleckiego "Strzelec"]], powołana zostaje z inicjatywy mieszkańców [[Spółdzielcza kasa oszczędnościowo-kredytowa|Kasa Stefczyka]], a także tworzy się [[Ochotnicza Straż Pożarna]] pod komendą Andrzeja Piwowara. Z inicjatywy księdza Walerego Motyki, powstaje Katolicki Związek Młodzieży Żeńskiej i Męskiej ([[Akcja Katolicka w II Rzeczypospolitej|Akcja Katolicka]]). Pod przewodnictwem Walentego Miśniaka działa komórka BBWR ([[Bezpartyjny Blok Współpracy z Rządem]]). Silną organizacją jest też [[Stronnictwo Ludowe]] oraz [[Związek Młodzieży Wiejskiej|Związek Młodzieży Wiejskiej "WICI"]]<ref name=":23" />.
Pierwszego sierpnia 1934 roku na mocy ustawy<ref name=":18" /> powołano zbiorczą gminę Pnikut. W jej skład wchodzą miejscowości: [[Buchowice]], [[Chliple]], [[Czyżowice (Ukraina)|Czyżowice]], Hańkowice, [[Jatwięgi]], [[Krukienice]], [[Ostrożec (rejon mościski)|Ostrożec]], Pnikut, [[Podliski (rejon mościski)|Podliski]], [[Radenice]], [[Sudkowice]], [[Wiszenka (rejon mościski)|Wiszenka]]. W tym czasie parafia Pnikucka składała się z Pnikuta, Buchowic i Pakości. Głównym właścicielem ziemi jest Kapituła Przemyska. W okresie międzywojennym we wsi działałją dwa młyny wodne, olejarnia, trzy warsztaty tkackie, cegielnia, nowoczesna mleczarnia, trzy kuźnie, dziesięciu szewców, trzynastu krawców, trzech rymarzy, dwóch kołodziejów, przewoźnik, dwudziestu fryzjerów, ośmiu stolarzy, dziesięciu cieśli, pięciu murarzy, dwóch blacharzy i jeden studniarz<ref name=":23" />.
=== II Wojna Światowa ===
W połowie września 1939 roku do Pnikuta wkraczają Niemcy w marszu na [[Lwów]]. Po agresji [[Związek Socjalistycznych Republik Radzieckich|ZSRR]] na Polskę armia niemiecka cofa się i po raz drugi przechodzi przez wieś, a wkrótce po Niemcach przychodzą Rosjanie. W międzyczasie w Pnikucie, w drodze na [[Węgry]] stacjonuje oddział dowodzony przez gen. [[Władysław Anders|Władysława Andersa]]<ref name=":23" />. Niedaleko, pod Starym Samborem, gen. Anders zostaje dwukrotnie ranny i wzięty do niewoli (29 września).
Okres pierwszej okupacji sowieckiej to życie w strachu przed aresztowaniem i śmiercią. Antypolskie nastawienie Rosjan, denuncjacje polskich patriotów przez Żydów i nacjonalistów Ukraińskich oraz przymusowe wcielenia do Armii Radzieckiej (mężczyźni urodzeni w latach 1918 - 1921) potęgowały niepokój i niepewność jutra. Po 2 czerwca 1941 roku (atak Niemiec na ZSRR) wojska Wermachtu po raz kolejny przechodzą przez Pnikut. W okresie okupacji niemieckiej na terenie wsi odbudowuje się konspiracyjny ruch oporu.
W Pnikucie oprócz Niemców działała również Granatowa Policja rekrutowana głównie ze współpracujących z okupantem Ukraińców z Buchowic. W tym okresie Niemcy tolerowali działalność UPA i innych ukraińskich ruchów nacjonalistycznych. Polacy organizują samoobronę. Budowane są miejsca ukrycia (zamaskowane schrony), a mężczyźni uzbrojeni w widły i kosy, ale również w broń palną informowani są o zagrożeniu biciem kościelnych dzwonów<ref name=":22" />.
Na przełomie 1943 i 1944 roku do Pnikuta przybywają oddziały [[Armia Krajowa|Armii Krajowej]] które początkowo ukrywają się u mieszkańców a następnie w podpnikuckim lesie. Wielu mieszkańców przyłącza się do partyzantów, praktycznie cała wieś zaopatruje ich w żywność. W obawie przed kontrolą wiezione na wozie jedzenie ukrywano w sianie a woźnicami byli młodzi chłopcy, dzieci by nie wzbudzać podejrzeń. Okres ten to czas względnego spokoju ze strony banderowców, którzy obawiali się polskich partyzantów<ref name=":22" />.
Podczas II Wojny Światowej zginęło ponad 40 mieszkańców wsi, 27 zostało aresztowanych przez Gestapo, a 86 wywieziono na roboty do Niemiec z których większość wróciła po wojnie do rodzinnych domów<ref name=":22" />. Pnikuczanie walczyli pod Monte Cassino i w wielu innych bitwach pod dowództwem między innymi gen. Andersa. Wielu powołano w szeregi Ludowego Wojska Polskiego do I i II Armii<ref name=":23" />.
=== Okres powojenny ===
Po II Wojnie Światowej, Pnikut na mocy ustaleń w Jałcie znalazł się w granicach Związku Radzieckiego. Wielu wierzyło, że to okres przejściowy i wkrótce wszystko wróci do stanu sprzed wojny. I fala repatriacji to lata 1945 - 1947. Polacy jechali w nieznane, zostawiając wszystko, co było dla nich cenne i ważne.
Bardzo długo Pnikut opierał się kolektywizacji i prawdopodobnie był ostatnią wsią w okręgu, jaka przystąpiła do [[Kołchoz|kołchozu]].
W latach 1956 - 1958 miała miejsce druga fala repatriacji. Ludzie stracili nadzieję, że Pnikut wróci w granice Polski. Ogółem po wojnie wyjechało z Pnikuta 420 polskich rodzin, a ponad 90 rodzin zostało<ref name=":22" />.
Gdy w 1945 roku wieloletni proboszcz ks. Tomasz Szurek musiał opuścić parafię, na jego miejsce przybył [[Jerzy Ablewicz|ks. Jerzy Ablewicz]]. Po jego wyjeździe w 1946 roku władze nie wydały zezwolenia na pracę innego kapłana w Pnikuckiej parafii. Mieszkańcy jednak nigdy nie oddali kluczy od kościoła i choć wieś obciążono wysokimi podatkami, świątynia pozostała w dyspozycji parafian. Po wieloletnich zabiegach ze strony mieszkańców, dopiero w 1987 roku władza oficjalnie zezwoliła na odprawianie nabożeństw w kościele. Był to pierwszy taki przypadek w całym ZSRR.
O ile krótko po wojnie zdarzały się rozboje i napady rabunkowe, zarówno banderowców jak i zwykłych bandytów, o tyle lata późniejsze to okres stosunkowo spokojnej koegzystencji Polaków i Ukraińców, których było we wsi coraz więcej.
W 1986 roku, pomiędzy 19 a 21 września miał miejsce Pierwszy Zjazd Pnikuczan, a w 1991 roku powstał we wsi Oddział Towarzystwa Kultury Polskiej Ziemi Lwowskiej.
Po rozpadzie ZSRR Pnikut jest częścią Ukrainy. Dnia 9 sierpnia 2009 roku obchodzono uroczyście 650 lecie powstania miejscowości.
{{Przypisy}}
== Linki zewnętrzne ==
* [http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VII/335] Pnikut w Słowniku Geograficznym Królestwa Polskiego i innych krajów słowiańskich, tVII
* [http://www.pnikut.net Pnikut.net], serwis mieszkańców dawnego Pnikuta
* [http://www.pnikut.com/ Strona parafialna]
{{Cytuj Wiki}}
[[Kategoria:Wsie obwodu lwowskiego]]
[[Kategoria:Rejon mościski]]
7b9154e898370a7d87b7590d34ce0e1ab6b5c9e2
537
505
2014-03-02T13:28:07Z
Użytkownik usunięty
9
drobne
wikitext
text/x-wiki
{{Spis treści}}
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w [[1359]] r. W [[II Rzeczpospolita|II Rzeczypospolitej]] do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej [[gmina Pnikut|gminy Pnikut]] w [[Powiat mościski|powiecie mościskim]] w [[województwo lwowskie|woj. lwowskim]]<ref name=":18">{{Dziennik Ustaw|rok=1934|numer=64|pozycja=547}}</ref>. Po wojnie odłączona od Polski i włączona do [[Ukraińska Socjalistyczna Republika Radziecka|Ukraińskiej SRR]].
We wsi działa oddział [[Towarzystwo Kultury Polskiej Ziemi Lwowskiej|Towarzystwa Kultury Polskiej Ziemi Lwowskiej]]<ref>[http://tkpzl.lviv.ua/pl/pages/21/ Towarzystwo Kultury Polskiej Ziemi Lwowskiej]</ref>.
== Mieszkańcy ==
=== Zmiany demograficzne ===
Od najdawniejszych lat Pnikut zamieszkiwali głównie [[Polacy]]. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiają się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów<ref name=":15">L. Świtalski, Kronika Pnikuta, Pnikut 25.X.1905</ref>.
Około 1800 roku wieś zamieszkują 722 osoby<ref name=":15" />. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie [[Kościół rzymskokatolicki|kościoła rzymskokatolickiego]], 17 to [[Kościoły greckokatolickie|grekokatolicy]] a 41 to zwolennicy [[Judaizm|wyznania mojżeszowego]]<ref name=":14">[http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VIII/335 Słownik Geograficzny Królestwa Polskiego, Warszawa 1880, t.VIII]</ref>. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców<ref name=":15" />. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób<ref>Rocznik Diecezji Przemyskiej, ob. Łać. 1938 Przemyśl 1938, Nakładem Kurii Biskupiej ob. łać.</ref>.
=== Rozwój oświaty i kultury ===
W osiemdziesiątych latach XIX wieku powstaje w Pnikucie pierwsza szkoła prowadzona przez Michała Skwirzyńskiego{{fakt|data=2014-02}} w jego domu, a przed 1890 rokiem, w budynku zbudowanym przez mieszkańców powstaje szkoła czteroklasowa, której kierownikiem zostaje Jan Filip<ref name=":23">Rys monograficzny dziejów wsi Pnikut w okresie 1914 - 1945, Praca zbiorowa pod redakcją F. Dorosza, Przemyśl,1986</ref>. Jeszcze przed 1900 rokiem powstało w Pnikucie koło organizacji "Sokół" a w jego ramach zespoły: teatralny, muzyczny, recytatorski i chóralny, natomiast w 1910 roku zbudowano budynek tzw. "Sokolni"<ref>S. Żółkiewicz, Rys historyczny Pnikuta (Ukraina), Przemyśl, 2009</ref>. Na terenie wsi działał Związek Katolicki do którego należało 320 mieszkańców<ref>Kronika Diecezji Przemyskiej, Przemyśl, 1914</ref>. W Pnikucie jeszcze przed I Wojną Światową istniała spółdzielnia mleczarska, kółko rolnicze, dwa sklepy, "Ochronka" dla dzieci i kasa Reiffeisena<ref>[http://jbc.bj.uj.edu.pl/dlibra/results?action=SearchAction&skipSearch=true&mdirids=1&server%3Atype=both&tempQueryType=-3&encode=false&isExpandable=on&isRemote=off&roleId=-3&queryType=-3&dirids=1&rootid=74846&query=pnikut&localQueryType=-3&remoteQueryType=-2 Przyjaciel Ludu, nr. 30, 21.07.1912]</ref>.
W 1921 roku powstaje w Pnikucie Dom Ludowy mieszczący między innymi salkę teatralną wraz z zapleczem i dwie sale wykładowe. Uroczystość otwarcia i poświęcenia domu uświetnił swą obecnością [[Marszałek Sejmu Rzeczypospolitej Polskiej|Marszałek Sejmu RP]] [[Maciej Rataj]]<ref name=":23" />. Po śmierci Jana Filipa w 1923 roku nowym kierownikiem szkoły zostaje Włodzimierz Raba, a po nim Stefania Weintraubowa. We wsi działa prowadzona przez Kazimierza Lecha biblioteka. W 1928 roku kierownikiem szkoły zostaje Kazimierz Kwiatkowski, były legionista. Pod jego kierownictwem szkoła zmienia się z czteroklasowej w siedmioklasową<ref name=":23" />.
W okresie okupacji istniała w Pnikucie szkoła w której nauczano w języku polskim, a języka niemieckiego nie uczono wcale. Po wojnie językiem nauczania stał się język ukraiński a dodatkowo nauczano języka rosyjskiego. Dzieci języka polskiego uczono w domach i na lekcjach religii w Kościele<ref name=":22">[http://www.pnikut.net/teksty/historia_miejscowosci_pnikut.pdf K. Zarański, Historia miejscowości Pnikut]</ref>.
=== Dzieje kościoła ===
[[Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg|thumb|223x223px|Kapliczka na miejscu starego kościoła]]
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|270x270px|Kościół św. Mikołaja w Pnikucie]]
Pierwsze wzmianki o kościele rzymskokatolickim w Pnikucie pochodzą z około 1385 roku<ref name=":15" />. Ponad dwieście lat później bo w roku 1611 na miejscu starego kościoła powstaje nowy. Budynek był drewniany, otoczony wałem i fosą z mostem zwodzonym i palisadą. W 1648 roku kościół wraz ze zgromadzonymi w nim ludźmi zostaje spalony przez kozaków<ref name=":15" />. W 1667 roku, na miejscu spalonego powstaje nowy kościół. Świątynia przetrwała prawie sto lat. Z polecenia biskupa Sierakowskiego i z funduszy Kapituły Przemyskiej w 1762 roku rozpoczęto budowę nowego kościoła. Po pięciu latach 27 lipca 1767 roku świątynię konsekrowano<ref name=":11">[http://www.pnikut.com/ Strona parafialna]</ref>. Kościół służył parafii do 1912 roku, po czym został rozebrany i złożony ponownie w 1929 roku, w [[Laszki Zawiązane|Laszkach Zawiązanych]]<ref name=":11" />. Po kościele pozostała kapliczka, istniejąca do dnia dzisiejszego.
Na przełomie wieków staraniem proboszcza parafii ks. L. Świtalskiego rozpoczynają się prace nad nową, murowaną świątynią dla Pnikuta. W 1901 r. powstaje projekt kościoła sporządzony przez Maksymiliana Jabłońskiego z Dobromila. W kwietniu 1908 roku rozpoczęto budowę, w październiku 1909 roku pokryto dach kościoła, a latem 1910 roku wytynkowano wnętrze. W dniu 6 grudnia 1912 r. kościół został poświęcony. Po usunięciu zniszczeń z okresu I wojny światowej w 1921 roku kościół powtórnie poświęcono<ref name=":11" />, a w 1927 r. zamontowano trzy nowe dzwony z odlewni [[Felczyńscy|Felczyńskich]] w Przemyślu<ref name=":12">N. Sarkady, Dziedzictwo w pejzaż wpisane. Opowieść o polskiej wsi Pnikut, Przemyśl 2010</ref>.
Obecnie w Pnikucie znajdują się dwie świątynie, opisywany kościół św. Mikołaja i [[cerkiew prawosławna]].
== Historia ==
Według niektórych źródeł Pnikut posiadał [[Prawo magdeburskie|magdeburskie prawa miejskie]] już w XV wieku (wcześniej niż Przemyśl)<ref>G. Rokowski, Ziemia Lwowska, OW Rewasz, Piastkw, 2005</ref>. Pierwsze pewne informacje o Pnikucie pochodzą z 1359 roku<ref name=":12" />. Kilka lat później w 1366 roku, miejscowośc Pnekolt (tak nazywał się wówczas Pnikut) nabył Piotr Radciowski<ref name=":1">Akta Grodzkie i Ziemskie, t VIII</ref>, a 8 maja 1385 roku, kolejny właściciel, Piotr Stryjski zapisał Pnekolt (Pnikut) na rzecz [[Biskupi przemyscy|biskupów przemyskich]]<ref>Akta Grodzkie i Ziemskie, t VII</ref>. W roku 1402 Kapituła Przemyska sprzedaje sołtystwo we wsi Pnikut Maciejowi, synowi krawca z Kazimierza<ref name=":1" />. Dnia 29 października 1408 roku [[Władysław II Jagiełło|Władysław Jagiełło]] uwalnia mieszkańców osiedlających się we wsi Pnikut i od wszelkich danin i ciężarów<ref name=":1" />. Pnikut wraca do Kapituły Przemyskiej w dniu 14 kwietnia 1417 roku, kupiony od "wdowy po Piotrze Fus za 212 grzywien ważnych"<ref name=":14" />. Dnia 14 czerwca 1462 r. następuje rozgraniczenie wsi Pnikut, Buchowice i Bolanowice<ref name=":14" />.
Są w Pnikucie miejsca historycznie ważne, nie tylko dla samej wsi. To tutaj miała miejsce regularna bitwa, gdy w 1672 roku podczas kolejnej wyprawy Mohamed IV w sojuszu z [[Tatarzy|Tatarami]] i Kozakami napadł na wschodnie rubieże Polski w tym ziemię przemyską. Dnia 8 października wspomnianego roku, obciążone łupami i jeńcami trzy [[Orda|ordy tatarskie]] zostały rozbite przez ochotników z [[Przemyśl]]a oraz mieszkańców Pnikuta, dowodzonych przez ks. Krystyna Szykowskiego, gwardiana o.o. Reformatów Przemyskich<ref name=":14" />. Po bitwie miejsce pochówku walecznych obrońców nazwane zostało Kalwaryjką i do dzisiaj mieszkańcy zapalają tam znicze w [[Wszystkich Świętych|Święto Zmarłych]].
W południowo - wschodniej części Pnikuta znajduje się wzniesienie do dzisiaj nazywane "Zamczyskiem". Według ludowych podań mieszkali tam dwaj strażnicy - obserwatorzy, których zadaniem było informowanie mieszkańców o zbliżającym się niebezpieczeństwie. Dziś nie wiadomo, jaki był charakter tego miejsca, czy była to wieża obronna<ref name=":15" />, czy zamek<ref>[http://www.pbc.rzeszow.pl/dlibra/docmetadata?id=4771&from=publication M. Orłowicz, Ilustrowany Przewodnik po Przemyślu i okolicy, Zjednoczenie Towarzystw Polskich, Przemyśl, 1917]</ref>.
=== I Wojna Światowa ===
Okres I Wojny Światowej to przede wszystkim olbrzymie zniszczenia, przestaje istnieć Sokolnia i mleczarnia, część gospodarstw spłonęło lub zostało rozebranych czy zburzonych. Zginęło wielu mieszkańców. Pnikuczanie walczyli na polach wielu bitew. W [[Legiony Polskie 1914-1918|Legionach]]: Walenty Miśniak (kawaler [[Order Virtuti Militari|orderu Virtuti - Militari]]), Władysław Dorosz (wielokrotnie odznaczony), Bronisław Kuśnierz, Michał Kuśnierz, Władysław Kuśnierz, Józef Żółkiewicz, Szymon Bazanowski, Bartłomiej Gawron, Błażej Dorosz, Marek Muszak, Ludwik Muszak, Ludwik Folta, Stanisław Czop, Mateusz Wiącek s. Jana, Sylwester Pawłowski, Józef Muszak. W armii Hallera służyli: Jan Miśniak, Franciszek Czerniec, Jan Czerniec, Antoni Czerniec, Fabian Paprocki, Wawrzyniec Gładysz, Jan Ździobek, Franciszek Skrabka, Antoni Dorosz<ref name=":22" />.
=== Dwudziestolecie międzywojenne ===
Po I Wojnie Światowej powstaje komórka [[Związek Strzelecki|Związku Strzeleckiego "Strzelec"]], powołana zostaje z inicjatywy mieszkańców [[Spółdzielcza kasa oszczędnościowo-kredytowa|Kasa Stefczyka]], a także tworzy się [[Ochotnicza Straż Pożarna]] pod komendą Andrzeja Piwowara. Z inicjatywy księdza Walerego Motyki, powstaje Katolicki Związek Młodzieży Żeńskiej i Męskiej ([[Akcja Katolicka w II Rzeczypospolitej|Akcja Katolicka]]). Pod przewodnictwem Walentego Miśniaka działa komórka BBWR ([[Bezpartyjny Blok Współpracy z Rządem]]). Silną organizacją jest też [[Stronnictwo Ludowe]] oraz [[Związek Młodzieży Wiejskiej|Związek Młodzieży Wiejskiej "WICI"]]<ref name=":23" />.
Pierwszego sierpnia 1934 roku na mocy ustawy<ref name=":18" /> powołano zbiorczą gminę Pnikut. W jej skład wchodzą miejscowości: [[Buchowice]], [[Chliple]], [[Czyżowice (Ukraina)|Czyżowice]], Hańkowice, [[Jatwięgi]], [[Krukienice]], [[Ostrożec (rejon mościski)|Ostrożec]], Pnikut, [[Podliski (rejon mościski)|Podliski]], [[Radenice]], [[Sudkowice]], [[Wiszenka (rejon mościski)|Wiszenka]]. W tym czasie parafia Pnikucka składała się z Pnikuta, Buchowic i Pakości. Głównym właścicielem ziemi jest Kapituła Przemyska. W okresie międzywojennym we wsi działałją dwa młyny wodne, olejarnia, trzy warsztaty tkackie, cegielnia, nowoczesna mleczarnia, trzy kuźnie, dziesięciu szewców, trzynastu krawców, trzech rymarzy, dwóch kołodziejów, przewoźnik, dwudziestu fryzjerów, ośmiu stolarzy, dziesięciu cieśli, pięciu murarzy, dwóch blacharzy i jeden studniarz<ref name=":23" />.
=== II Wojna Światowa ===
W połowie września 1939 roku do Pnikuta wkraczają Niemcy w marszu na [[Lwów]]. Po agresji [[Związek Socjalistycznych Republik Radzieckich|ZSRR]] na Polskę armia niemiecka cofa się i po raz drugi przechodzi przez wieś, a wkrótce po Niemcach przychodzą Rosjanie. W międzyczasie w Pnikucie, w drodze na [[Węgry]] stacjonuje oddział dowodzony przez gen. [[Władysław Anders|Władysława Andersa]]<ref name=":23" />. Niedaleko, pod Starym Samborem, gen. Anders zostaje dwukrotnie ranny i wzięty do niewoli (29 września).
Okres pierwszej okupacji sowieckiej to życie w strachu przed aresztowaniem i śmiercią. Antypolskie nastawienie Rosjan, denuncjacje polskich patriotów przez Żydów i nacjonalistów Ukraińskich oraz przymusowe wcielenia do Armii Radzieckiej (mężczyźni urodzeni w latach 1918 - 1921) potęgowały niepokój i niepewność jutra. Po 2 czerwca 1941 roku (atak Niemiec na ZSRR) wojska Wermachtu po raz kolejny przechodzą przez Pnikut. W okresie okupacji niemieckiej na terenie wsi odbudowuje się konspiracyjny ruch oporu.
W Pnikucie oprócz Niemców działała również Granatowa Policja rekrutowana głównie ze współpracujących z okupantem Ukraińców z Buchowic. W tym okresie Niemcy tolerowali działalność UPA i innych ukraińskich ruchów nacjonalistycznych. Polacy organizują samoobronę. Budowane są miejsca ukrycia (zamaskowane schrony), a mężczyźni uzbrojeni w widły i kosy, ale również w broń palną informowani są o zagrożeniu biciem kościelnych dzwonów<ref name=":22" />.
Na przełomie 1943 i 1944 roku do Pnikuta przybywają oddziały [[Armia Krajowa|Armii Krajowej]] które początkowo ukrywają się u mieszkańców a następnie w podpnikuckim lesie. Wielu mieszkańców przyłącza się do partyzantów, praktycznie cała wieś zaopatruje ich w żywność. W obawie przed kontrolą wiezione na wozie jedzenie ukrywano w sianie a woźnicami byli młodzi chłopcy, dzieci by nie wzbudzać podejrzeń. Okres ten to czas względnego spokoju ze strony banderowców, którzy obawiali się polskich partyzantów<ref name=":22" />.
Podczas II Wojny Światowej zginęło ponad 40 mieszkańców wsi, 27 zostało aresztowanych przez Gestapo, a 86 wywieziono na roboty do Niemiec z których większość wróciła po wojnie do rodzinnych domów<ref name=":22" />. Pnikuczanie walczyli pod Monte Cassino i w wielu innych bitwach pod dowództwem między innymi gen. Andersa. Wielu powołano w szeregi Ludowego Wojska Polskiego do I i II Armii<ref name=":23" />.
=== Okres powojenny ===
Po II Wojnie Światowej, Pnikut na mocy ustaleń w Jałcie znalazł się w granicach Związku Radzieckiego. Wielu wierzyło, że to okres przejściowy i wkrótce wszystko wróci do stanu sprzed wojny. I fala repatriacji to lata 1945 - 1947. Polacy jechali w nieznane, zostawiając wszystko, co było dla nich cenne i ważne.
Bardzo długo Pnikut opierał się kolektywizacji i prawdopodobnie był ostatnią wsią w okręgu, jaka przystąpiła do [[Kołchoz|kołchozu]].
W latach 1956 - 1958 miała miejsce druga fala repatriacji. Ludzie stracili nadzieję, że Pnikut wróci w granice Polski. Ogółem po wojnie wyjechało z Pnikuta 420 polskich rodzin, a ponad 90 rodzin zostało<ref name=":22" />.
Gdy w 1945 roku wieloletni proboszcz ks. Tomasz Szurek musiał opuścić parafię, na jego miejsce przybył [[Jerzy Ablewicz|ks. Jerzy Ablewicz]]. Po jego wyjeździe w 1946 roku władze nie wydały zezwolenia na pracę innego kapłana w Pnikuckiej parafii. Mieszkańcy jednak nigdy nie oddali kluczy od kościoła i choć wieś obciążono wysokimi podatkami, świątynia pozostała w dyspozycji parafian. Po wieloletnich zabiegach ze strony mieszkańców, dopiero w 1987 roku władza oficjalnie zezwoliła na odprawianie nabożeństw w kościele. Był to pierwszy taki przypadek w całym ZSRR.
O ile krótko po wojnie zdarzały się rozboje i napady rabunkowe, zarówno banderowców jak i zwykłych bandytów, o tyle lata późniejsze to okres stosunkowo spokojnej koegzystencji Polaków i Ukraińców, których było we wsi coraz więcej.
W 1986 roku, pomiędzy 19 a 21 września miał miejsce Pierwszy Zjazd Pnikuczan, a w 1991 roku powstał we wsi Oddział Towarzystwa Kultury Polskiej Ziemi Lwowskiej.
Po rozpadzie ZSRR Pnikut jest częścią Ukrainy. Dnia 9 sierpnia 2009 roku obchodzono uroczyście 650 lecie powstania miejscowości.
{{Przypisy}}
== Linki zewnętrzne ==
* [http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VII/335] Pnikut w Słowniku Geograficznym Królestwa Polskiego i innych krajów słowiańskich, tVII
* [http://www.pnikut.net Pnikut.net], serwis mieszkańców dawnego Pnikuta
* [http://www.pnikut.com/ Strona parafialna]
{{Cytuj Wiki}}
[[Kategoria:Wsie obwodu lwowskiego]]
[[Kategoria:Rejon mościski]]
feedec8899e37a59ad91b5ef10867512d8a9f3ca
505
391
2014-02-16T08:30:43Z
Ffkapa
2
red
wikitext
text/x-wiki
{{Spis treści}}
'''Pnikut''' (ukr. ''Пнікут'') – wieś na [[Ukraina|Ukrainie]], w [[rejon mościski|rejonie mościskim]] [[obwód lwowski|obwodu lwowskiego]]. Wieś liczy 1101 mieszkańców.
Założony w [[1359]] r. W [[II Rzeczpospolita|II Rzeczypospolitej]] do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej [[gmina Pnikut|gminy Pnikut]] w [[Powiat mościski|powiecie mościskim]] w [[województwo lwowskie|woj. lwowskim]]<ref name=":18">{{Dziennik Ustaw|rok=1934|numer=64|pozycja=547}}</ref>. Po wojnie odłączona od Polski i włączona do [[Ukraińska Socjalistyczna Republika Radziecka|Ukraińskiej SRR]].
We wsi działa oddział [[Towarzystwo Kultury Polskiej Ziemi Lwowskiej|Towarzystwa Kultury Polskiej Ziemi Lwowskiej]]<ref>[http://tkpzl.lviv.ua/pl/pages/21/ Towarzystwo Kultury Polskiej Ziemi Lwowskiej]</ref>.
== Mieszkańcy ==
=== Zmiany demograficzne ===
Od najdawniejszych lat Pnikut zamieszkiwali głównie [[Polacy]]. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiają się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów<ref name=":15">L. Świtalski, Kronika Pnikuta, Pnikut 25.X.1905</ref>.
Około 1800 roku wieś zamieszkują 722 osoby<ref name=":15" />. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie [[Kościół rzymskokatolicki|kościoła rzymskokatolickiego]], 17 to [[Kościoły greckokatolickie|grekokatolicy]] a 41 to zwolennicy [[Judaizm|wyznania mojżeszowego]]<ref name=":14">[http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VIII/335 Słownik Geograficzny Królestwa Polskiego, Warszawa 1880, t.VIII]</ref>. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców<ref name=":15" />. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób<ref>Rocznik Diecezji Przemyskiej, ob. Łać. 1938 Przemyśl 1938, Nakładem Kurii Biskupiej ob. łać.</ref>.
=== Rozwój oświaty i kultury ===
W osiemdziesiątych latach XIX wieku powstaje w Pnikucie pierwsza szkoła prowadzona przez Michała Skwirzyńskiego{{fakt|data=2014-02}} w jego domu, a przed 1890 rokiem, w budynku zbudowanym przez mieszkańców powstaje szkoła czteroklasowa, której kierownikiem zostaje Jan Filip<ref name=":23">Rys monograficzny dziejów wsi Pnikut w okresie 1914 - 1945, Praca zbiorowa pod redakcją F. Dorosza, Przemyśl,1986</ref>. Jeszcze przed 1900 rokiem powstało w Pnikucie koło organizacji "Sokół" a w jego ramach zespoły: teatralny, muzyczny, recytatorski i chóralny, natomiast w 1910 roku zbudowano budynek tzw. "Sokolni"<ref>S. Żółkiewicz, Rys historyczny Pnikuta (Ukraina), Przemyśl, 2009</ref>. Na terenie wsi działał Związek Katolicki do którego należało 320 mieszkańców<ref>Kronika Diecezji Przemyskiej, Przemyśl, 1914</ref>. W Pnikucie jeszcze przed I Wojną Światową istniała spółdzielnia mleczarska, kółko rolnicze, dwa sklepy, "Ochronka" dla dzieci i kasa Reiffeisena<ref>[http://jbc.bj.uj.edu.pl/dlibra/results?action=SearchAction&skipSearch=true&mdirids=1&server%3Atype=both&tempQueryType=-3&encode=false&isExpandable=on&isRemote=off&roleId=-3&queryType=-3&dirids=1&rootid=74846&query=pnikut&localQueryType=-3&remoteQueryType=-2 Przyjaciel Ludu, nr. 30, 21.07.1912]</ref>.
W 1921 roku powstaje w Pnikucie Dom Ludowy mieszczący między innymi salkę teatralną wraz z zapleczem i dwie sale wykładowe. Uroczystość otwarcia i poświęcenia domu uświetnił swą obecnością [[Marszałek Sejmu Rzeczypospolitej Polskiej|Marszałek Sejmu RP]] [[Maciej Rataj]]<ref name=":23" />. Po śmierci Jana Filipa w 1923 roku nowym kierownikiem szkoły zostaje Włodzimierz Raba, a po nim Stefania Weintraubowa. We wsi działa prowadzona przez Kazimierza Lecha biblioteka. W 1928 roku kierownikiem szkoły zostaje Kazimierz Kwiatkowski, były legionista. Pod jego kierownictwem szkoła zmienia się z czteroklasowej w siedmioklasową<ref name=":23" />.
W okresie okupacji istniała w Pnikucie szkoła w której nauczano w języku polskim, a języka niemieckiego nie uczono wcale. Po wojnie językiem nauczania stał się język ukraiński a dodatkowo nauczano języka rosyjskiego. Dzieci języka polskiego uczono w domach i na lekcjach religii w Kościele<ref name=":22">[http://www.pnikut.net/teksty/historia_miejscowosci_pnikut.pdf K. Zarański, Historia miejscowości Pnikut]</ref>.
=== Dzieje kościoła ===
[[Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg|thumb|223x223px|Kapliczka na miejscu starego kościoła]]
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|270x270px|Kościół św. Mikołaja w Pnikucie]]
Pierwsze wzmianki o kościele rzymskokatolickim w Pnikucie pochodzą z około 1385 roku<ref name=":15" />. Ponad dwieście lat później bo w roku 1611 na miejscu starego kościoła powstaje nowy. Budynek był drewniany, otoczony wałem i fosą z mostem zwodzonym i palisadą. W 1648 roku kościół wraz ze zgromadzonymi w nim ludźmi zostaje spalony przez kozaków<ref name=":15" />. W 1667 roku, na miejscu spalonego powstaje nowy kościół. Świątynia przetrwała prawie sto lat. Z polecenia biskupa Sierakowskiego i z funduszy Kapituły Przemyskiej w 1762 roku rozpoczęto budowę nowego kościoła. Po pięciu latach 27 lipca 1767 roku świątynię konsekrowano<ref name=":11">[http://www.pnikut.com/ Strona parafialna]</ref>. Kościół służył parafii do 1912 roku, po czym został rozebrany i złożony ponownie w 1929 roku, w [[Laszki Zawiązane|Laszkach Zawiązanych]]<ref name=":11" />. Po kościele pozostała kapliczka, istniejąca do dnia dzisiejszego.
Na przełomie wieków staraniem proboszcza parafii ks. L. Świtalskiego rozpoczynają się prace nad nową, murowaną świątynią dla Pnikuta. W 1901 r. powstaje projekt kościoła sporządzony przez Maksymiliana Jabłońskiego z Dobromila. W kwietniu 1908 roku rozpoczęto budowę, w październiku 1909 roku pokryto dach kościoła, a latem 1910 roku wytynkowano wnętrze. W dniu 6 grudnia 1912 r. kościół został poświęcony. Po usunięciu zniszczeń z okresu I wojny światowej w 1921 roku kościół powtórnie poświęcono<ref name=":11" />, a w 1927 r. zamontowano trzy nowe dzwony z odlewni [[Felczyńscy|Felczyńskich]] w Przemyślu<ref name=":12">N. Sarkady, Dziedzictwo w pejzaż wpisane. Opowieść o polskiej wsi Pnikut, Przemyśl 2010</ref>.
Obecnie w Pnikucie znajdują się dwie świątynie, opisywany kościół św. Mikołaja i [[cerkiew prawosławna]].
== Historia ==
Według niektórych źródeł Pnikut posiadał [[Prawo magdeburskie|magdeburskie prawa miejskie]] już w XV wieku (wcześniej niż Przemyśl)<ref>G. Rokowski, Ziemia Lwowska, OW Rewasz, Piastkw, 2005</ref>. Pierwsze pewne informacje o Pnikucie pochodzą z 1359 roku<ref name=":12" />. Kilka lat później w 1366 roku, miejscowośc Pnekolt (tak nazywał się wówczas Pnikut) nabył Piotr Radciowski<ref name=":1">Akta Grodzkie i Ziemskie, t VIII</ref>, a 8 maja 1385 roku, kolejny właściciel, Piotr Stryjski zapisał Pnekolt (Pnikut) na rzecz [[Biskupi przemyscy|biskupów przemyskich]]<ref>Akta Grodzkie i Ziemskie, t VII</ref>. W roku 1402 Kapituła Przemyska sprzedaje sołtystwo we wsi Pnikut Maciejowi, synowi krawca z Kazimierza<ref name=":1" />. Dnia 29 października 1408 roku [[Władysław II Jagiełło|Władysław Jagiełło]] uwalnia mieszkańców osiedlających się we wsi Pnikut i od wszelkich danin i ciężarów<ref name=":1" />. Pnikut wraca do Kapituły Przemyskiej w dniu 14 kwietnia 1417 roku, kupiony od "wdowy po Piotrze Fus za 212 grzywien ważnych"<ref name=":14" />. Dnia 14 czerwca 1462 r. następuje rozgraniczenie wsi Pnikut, Buchowice i Bolanowice<ref name=":14" />.
Są w Pnikucie miejsca historycznie ważne, nie tylko dla samej wsi. To tutaj miała miejsce regularna bitwa, gdy w 1672 roku podczas kolejnej wyprawy Mohamed IV w sojuszu z [[Tatarzy|Tatarami]] i Kozakami napadł na wschodnie rubieże Polski w tym ziemię przemyską. Dnia 8 października wspomnianego roku, obciążone łupami i jeńcami trzy [[Orda|ordy tatarskie]] zostały rozbite przez ochotników z [[Przemyśl]]a oraz mieszkańców Pnikuta, dowodzonych przez ks. Krystyna Szykowskiego, gwardiana o.o. Reformatów Przemyskich<ref name=":14" />. Po bitwie miejsce pochówku walecznych obrońców nazwane zostało Kalwaryjką i do dzisiaj mieszkańcy zapalają tam znicze w [[Wszystkich Świętych|Święto Zmarłych]].
W południowo - wschodniej części Pnikuta znajduje się wzniesienie do dzisiaj nazywane "Zamczyskiem". Według ludowych podań mieszkali tam dwaj strażnicy - obserwatorzy, których zadaniem było informowanie mieszkańców o zbliżającym się niebezpieczeństwie. Dziś nie wiadomo, jaki był charakter tego miejsca, czy była to wieża obronna<ref name=":15" />, czy zamek<ref>[http://www.pbc.rzeszow.pl/dlibra/docmetadata?id=4771&from=publication M. Orłowicz, Ilustrowany Przewodnik po Przemyślu i okolicy, Zjednoczenie Towarzystw Polskich, Przemyśl, 1917]</ref>.
=== I Wojna Światowa ===
Okres I Wojny Światowej to przede wszystkim olbrzymie zniszczenia, przestaje istnieć Sokolnia i mleczarnia, część gospodarstw spłonęło lub zostało rozebranych czy zburzonych. Zginęło wielu mieszkańców. Pnikuczanie walczyli na polach wielu bitew. W [[Legiony Polskie 1914-1918|Legionach]]: Walenty Miśniak (kawaler [[Order Virtuti Militari|orderu Virtuti - Militari]]), Władysław Dorosz (wielokrotnie odznaczony), Bronisław Kuśnierz, Michał Kuśnierz, Władysław Kuśnierz, Józef Żółkiewicz, Szymon Bazanowski, Bartłomiej Gawron, Błażej Dorosz, Marek Muszak, Ludwik Muszak, Ludwik Folta, Stanisław Czop, Mateusz Wiącek s. Jana, Sylwester Pawłowski, Józef Muszak. W armii Hallera służyli: Jan Miśniak, Franciszek Czerniec, Jan Czerniec, Antoni Czerniec, Fabian Paprocki, Wawrzyniec Gładysz, Jan Ździobek, Franciszek Skrabka, Antoni Dorosz<ref name=":22" />.
=== Dwudziestolecie międzywojenne ===
Po I Wojnie Światowej powstaje komórka [[Związek Strzelecki|Związku Strzeleckiego "Strzelec"]], powołana zostaje z inicjatywy mieszkańców [[Spółdzielcza kasa oszczędnościowo-kredytowa|Kasa Stefczyka]], a także tworzy się [[Ochotnicza Straż Pożarna]] pod komendą Andrzeja Piwowara. Z inicjatywy księdza Walerego Motyki, powstaje Katolicki Związek Młodzieży Żeńskiej i Męskiej ([[Akcja Katolicka w II Rzeczypospolitej|Akcja Katolicka]]). Pod przewodnictwem Walentego Miśniaka działa komórka BBWR ([[Bezpartyjny Blok Współpracy z Rządem]]). Silną organizacją jest też [[Stronnictwo Ludowe]] oraz [[Związek Młodzieży Wiejskiej|Związek Młodzieży Wiejskiej "WICI"]]<ref name=":23" />.
Pierwszego sierpnia 1934 roku na mocy ustawy<ref name=":18" /> powołano zbiorczą gminę Pnikut. W jej skład wchodzą miejscowości: [[Buchowice]], [[Chliple]], [[Czyżowice (Ukraina)|Czyżowice]], Hańkowice, [[Jatwięgi]], [[Krukienice]], [[Ostrożec (rejon mościski)|Ostrożec]], Pnikut, [[Podliski (rejon mościski)|Podliski]], [[Radenice]], [[Sudkowice]], [[Wiszenka (rejon mościski)|Wiszenka]]. W tym czasie parafia Pnikucka składała się z Pnikuta, Buchowic i Pakości. Głównym właścicielem ziemi jest Kapituła Przemyska. W okresie międzywojennym we wsi działałją dwa młyny wodne, olejarnia, trzy warsztaty tkackie, cegielnia, nowoczesna mleczarnia, trzy kuźnie, dziesięciu szewców, trzynastu krawców, trzech rymarzy, dwóch kołodziejów, przewoźnik, dwudziestu fryzjerów, ośmiu stolarzy, dziesięciu cieśli, pięciu murarzy, dwóch blacharzy i jeden studniarz<ref name=":23" />.
=== II Wojna Światowa ===
W połowie września 1939 roku do Pnikuta wkraczają Niemcy w marszu na [[Lwów]]. Po agresji [[Związek Socjalistycznych Republik Radzieckich|ZSRR]] na Polskę armia niemiecka cofa się i po raz drugi przechodzi przez wieś, a wkrótce po Niemcach przychodzą Rosjanie. W międzyczasie w Pnikucie, w drodze na [[Węgry]] stacjonuje oddział dowodzony przez gen. [[Władysław Anders|Władysława Andersa]]<ref name=":23" />. Niedaleko, pod Starym Samborem, gen. Anders zostaje dwukrotnie ranny i wzięty do niewoli (29 września).
Okres pierwszej okupacji sowieckiej to życie w strachu przed aresztowaniem i śmiercią. Antypolskie nastawienie Rosjan, denuncjacje polskich patriotów przez Żydów i nacjonalistów Ukraińskich oraz przymusowe wcielenia do Armii Radzieckiej (mężczyźni urodzeni w latach 1918 - 1921) potęgowały niepokój i niepewność jutra. Po 2 czerwca 1941 roku (atak Niemiec na ZSRR) wojska Wermachtu po raz kolejny przechodzą przez Pnikut. W okresie okupacji niemieckiej na terenie wsi odbudowuje się konspiracyjny ruch oporu.
W Pnikucie oprócz Niemców działała również Granatowa Policja rekrutowana głównie ze współpracujących z okupantem Ukraińców z Buchowic. W tym okresie Niemcy tolerowali działalność UPA i innych ukraińskich ruchów nacjonalistycznych. Polacy organizują samoobronę. Budowane są miejsca ukrycia (zamaskowane schrony), a mężczyźni uzbrojeni w widły i kosy, ale również w broń palną informowani są o zagrożeniu biciem kościelnych dzwonów<ref name=":22" />.
Na przełomie 1943 i 1944 roku do Pnikuta przybywają oddziały [[Armia Krajowa|Armii Krajowej]] które początkowo ukrywają się u mieszkańców a następnie w podpnikuckim lesie. Wielu mieszkańców przyłącza się do partyzantów, praktycznie cała wieś zaopatruje ich w żywność. W obawie przed kontrolą wiezione na wozie jedzenie ukrywano w sianie a woźnicami byli młodzi chłopcy, dzieci by nie wzbudzać podejrzeń. Okres ten to czas względnego spokoju ze strony banderowców, którzy obawiali się polskich partyzantów<ref name=":22" />.
Podczas II Wojny Światowej zginęło ponad 40 mieszkańców wsi, 27 zostało aresztowanych przez Gestapo, a 86 wywieziono na roboty do Niemiec z których większość wróciła po wojnie do rodzinnych domów<ref name=":22" />. Pnikuczanie walczyli pod Monte Cassino i w wielu innych bitwach pod dowództwem między innymi gen. Andersa. Wielu powołano w szeregi Ludowego Wojska Polskiego do I i II Armii<ref name=":23" />.
=== Okres powojenny ===
Po II Wojnie Światowej, Pnikut na mocy ustaleń w Jałcie znalazł się w granicach Związku Radzieckiego. Wielu wierzyło, że to okres przejściowy i wkrótce wszystko wróci do stanu sprzed wojny. I fala repatriacji to lata 1945 - 1947. Polacy jechali w nieznane, zostawiając wszystko, co było dla nich cenne i ważne.
Bardzo długo Pnikut opierał się kolektywizacji i prawdopodobnie był ostatnią wsią w okręgu, jaka przystąpiła do [[Kołchoz|kołchozu]].
W latach 1956 - 1958 miała miejsce druga fala repatriacji. Ludzie stracili nadzieję, że Pnikut wróci w granice Polski. Ogółem po wojnie wyjechało z Pnikuta 420 polskich rodzin, a ponad 90 rodzin zostało<ref name=":22" />.
Gdy w 1945 roku wieloletni proboszcz ks. Tomasz Szurek musiał opuścić parafię, na jego miejsce przybył [[Jerzy Ablewicz|ks. Jerzy Ablewicz]]. Po jego wyjeździe w 1946 roku władze nie wydały zezwolenia na pracę innego kapłana w Pnikuckiej parafii. Mieszkańcy jednak nigdy nie oddali kluczy od kościoła i choć wieś obciążono wysokimi podatkami, świątynia pozostała w dyspozycji parafian. Po wieloletnich zabiegach ze strony mieszkańców, dopiero w 1987 roku władza oficjalnie zezwoliła na odprawianie nabożeństw w kościele. Był to pierwszy taki przypadek w całym ZSRR.
O ile krótko po wojnie zdarzały się rozboje i napady rabunkowe, zarówno banderowców jak i zwykłych bandytów, o tyle lata późniejsze to okres stosunkowo spokojnej koegzystencji Polaków i Ukraińców, których było we wsi coraz więcej.
W 1986 roku, pomiędzy 19 a 21 września miał miejsce Pierwszy Zjazd Pnikuczan, a w 1991 roku powstał we wsi Oddział Towarzystwa Kultury Polskiej Ziemi Lwowskiej.
Po rozpadzie ZSRR Pnikut jest częścią Ukrainy. Dnia 9 sierpnia 2009 roku obchodzono uroczyście 650 lecie powstania miejscowości.
{{Przypisy}}
== Linki zewnętrzne ==
* [http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VII/335] Pnikut w Słowniku Geograficznym Królestwa Polskiego i innych krajów słowiańskich, tVII
* [http://www.pnikut.net Pnikut.net], serwis mieszkańców dawnego Pnikuta
* [http://www.pnikut.com/ Strona parafialna]
{{Cytuj Wiki}}
[[Kategoria:Wsie obwodu lwowskiego]]
[[Kategoria:Rejon mościski]]
862f7e81422e07202d397152c91391bfbfe97dec
391
387
2014-02-08T21:55:52Z
Ffkapa
2
wikitext
text/x-wiki
'''Pnikut''' (ukr. ''Пнікут'') – wieś na [[Ukraina|Ukrainie]], w [[rejon mościski|rejonie mościskim]] [[obwód lwowski|obwodu lwowskiego]]. Wieś liczy 1101 mieszkańców.
Założony w [[1359]] r. W [[II Rzeczpospolita|II Rzeczypospolitej]] do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej [[gmina Pnikut|gminy Pnikut]] w [[Powiat mościski|powiecie mościskim]] w [[województwo lwowskie|woj. lwowskim]]<ref name=":18">{{Dziennik Ustaw|rok=1934|numer=64|pozycja=547}}</ref>. Po wojnie odłączona od Polski i włączona do [[Ukraińska Socjalistyczna Republika Radziecka|Ukraińskiej SRR]].
We wsi działa oddział [[Towarzystwo Kultury Polskiej Ziemi Lwowskiej|Towarzystwa Kultury Polskiej Ziemi Lwowskiej]]<ref>[http://tkpzl.lviv.ua/pl/pages/21/ Towarzystwo Kultury Polskiej Ziemi Lwowskiej]</ref>.
== Mieszkańcy ==
=== Zmiany demograficzne ===
Od najdawniejszych lat Pnikut zamieszkiwali głównie [[Polacy]]. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiają się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów<ref name=":15">L. Świtalski, Kronika Pnikuta, Pnikut 25.X.1905</ref>.
Około 1800 roku wieś zamieszkują 722 osoby<ref name=":15" />. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie [[Kościół rzymskokatolicki|kościoła rzymskokatolickiego]], 17 to [[Kościoły greckokatolickie|grekokatolicy]] a 41 to zwolennicy [[Judaizm|wyznania mojżeszowego]]<ref name=":14">[http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VIII/335 Słownik Geograficzny Królestwa Polskiego, Warszawa 1880, t.VIII]</ref>. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców<ref name=":15" />. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób<ref>Rocznik Diecezji Przemyskiej, ob. Łać. 1938 Przemyśl 1938, Nakładem Kurii Biskupiej ob. łać.</ref>.
=== Rozwój oświaty i kultury ===
W osiemdziesiątych latach XIX wieku powstaje w Pnikucie pierwsza szkoła prowadzona przez Michała Skwirzyńskiego{{fakt|data=2014-02}} w jego domu, a przed 1890 rokiem, w budynku zbudowanym przez mieszkańców powstaje szkoła czteroklasowa, której kierownikiem zostaje Jan Filip<ref name=":23">Rys monograficzny dziejów wsi Pnikut w okresie 1914 - 1945, Praca zbiorowa pod redakcją F. Dorosza, Przemyśl,1986</ref>. Jeszcze przed 1900 rokiem powstało w Pnikucie koło organizacji "Sokół" a w jego ramach zespoły: teatralny, muzyczny, recytatorski i chóralny, natomiast w 1910 roku zbudowano budynek tzw. "Sokolni"<ref>S. Żółkiewicz, Rys historyczny Pnikuta (Ukraina), Przemyśl, 2009</ref>. Na terenie wsi działał Związek Katolicki do którego należało 320 mieszkańców<ref>Kronika Diecezji Przemyskiej, Przemyśl, 1914</ref>. W Pnikucie jeszcze przed I Wojną Światową istniała spółdzielnia mleczarska, kółko rolnicze, dwa sklepy, "Ochronka" dla dzieci i kasa Reiffeisena<ref>[http://jbc.bj.uj.edu.pl/dlibra/results?action=SearchAction&skipSearch=true&mdirids=1&server%3Atype=both&tempQueryType=-3&encode=false&isExpandable=on&isRemote=off&roleId=-3&queryType=-3&dirids=1&rootid=74846&query=pnikut&localQueryType=-3&remoteQueryType=-2 Przyjaciel Ludu, nr. 30, 21.07.1912]</ref>.
W 1921 roku powstaje w Pnikucie Dom Ludowy mieszczący między innymi salkę teatralną wraz z zapleczem i dwie sale wykładowe. Uroczystość otwarcia i poświęcenia domu uświetnił swą obecnością [[Marszałek Sejmu Rzeczypospolitej Polskiej|Marszałek Sejmu RP]] [[Maciej Rataj]]<ref name=":23" />. Po śmierci Jana Filipa w 1923 roku nowym kierownikiem szkoły zostaje Włodzimierz Raba, a po nim Stefania Weintraubowa. We wsi działa prowadzona przez Kazimierza Lecha biblioteka. W 1928 roku kierownikiem szkoły zostaje Kazimierz Kwiatkowski, były legionista. Pod jego kierownictwem szkoła zmienia się z czteroklasowej w siedmioklasową<ref name=":23" />.
W okresie okupacji istniała w Pnikucie szkoła w której nauczano w języku polskim, a języka niemieckiego nie uczono wcale. Po wojnie językiem nauczania stał się język ukraiński a dodatkowo nauczano języka rosyjskiego. Dzieci języka polskiego uczono w domach i na lekcjach religii w Kościele<ref name=":22">[http://www.pnikut.net/teksty/historia_miejscowosci_pnikut.pdf K. Zarański, Historia miejscowości Pnikut]</ref>.
=== Dzieje kościoła ===
[[Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg|thumb|223x223px|Kapliczka na miejscu starego kościoła]]
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|270x270px|Kościół św. Mikołaja w Pnikucie]]
Pierwsze wzmianki o kościele rzymskokatolickim w Pnikucie pochodzą z około 1385 roku<ref name=":15" />. Ponad dwieście lat później bo w roku 1611 na miejscu starego kościoła powstaje nowy. Budynek był drewniany, otoczony wałem i fosą z mostem zwodzonym i palisadą. W 1648 roku kościół wraz ze zgromadzonymi w nim ludźmi zostaje spalony przez kozaków<ref name=":15" />. W 1667 roku, na miejscu spalonego powstaje nowy kościół. Świątynia przetrwała prawie sto lat. Z polecenia biskupa Sierakowskiego i z funduszy Kapituły Przemyskiej w 1762 roku rozpoczęto budowę nowego kościoła. Po pięciu latach 27 lipca 1767 roku świątynię konsekrowano<ref name=":11">[http://www.pnikut.com/ Strona parafialna]</ref>. Kościół służył parafii do 1912 roku, po czym został rozebrany i złożony ponownie w 1929 roku, w [[Laszki Zawiązane|Laszkach Zawiązanych]]<ref name=":11" />. Po kościele pozostała kapliczka, istniejąca do dnia dzisiejszego.
Na przełomie wieków staraniem proboszcza parafii ks. L. Świtalskiego rozpoczynają się prace nad nową, murowaną świątynią dla Pnikuta. W 1901 r. powstaje projekt kościoła sporządzony przez Maksymiliana Jabłońskiego z Dobromila. W kwietniu 1908 roku rozpoczęto budowę, w październiku 1909 roku pokryto dach kościoła, a latem 1910 roku wytynkowano wnętrze. W dniu 6 grudnia 1912 r. kościół został poświęcony. Po usunięciu zniszczeń z okresu I wojny światowej w 1921 roku kościół powtórnie poświęcono<ref name=":11" />, a w 1927 r. zamontowano trzy nowe dzwony z odlewni [[Felczyńscy|Felczyńskich]] w Przemyślu<ref name=":12">N. Sarkady, Dziedzictwo w pejzaż wpisane. Opowieść o polskiej wsi Pnikut, Przemyśl 2010</ref>.
Obecnie w Pnikucie znajdują się dwie świątynie, opisywany kościół św. Mikołaja i [[cerkiew prawosławna]].
== Historia ==
Według niektórych źródeł Pnikut posiadał [[Prawo magdeburskie|magdeburskie prawa miejskie]] już w XV wieku (wcześniej niż Przemyśl)<ref>G. Rokowski, Ziemia Lwowska, OW Rewasz, Piastkw, 2005</ref>. Pierwsze pewne informacje o Pnikucie pochodzą z 1359 roku<ref name=":12" />. Kilka lat później w 1366 roku, miejscowośc Pnekolt (tak nazywał się wówczas Pnikut) nabył Piotr Radciowski<ref name=":1">Akta Grodzkie i Ziemskie, t VIII</ref>, a 8 maja 1385 roku, kolejny właściciel, Piotr Stryjski zapisał Pnekolt (Pnikut) na rzecz [[Biskupi przemyscy|biskupów przemyskich]]<ref>Akta Grodzkie i Ziemskie, t VII</ref>. W roku 1402 Kapituła Przemyska sprzedaje sołtystwo we wsi Pnikut Maciejowi, synowi krawca z Kazimierza<ref name=":1" />. Dnia 29 października 1408 roku [[Władysław II Jagiełło|Władysław Jagiełło]] uwalnia mieszkańców osiedlających się we wsi Pnikut i od wszelkich danin i ciężarów<ref name=":1" />. Pnikut wraca do Kapituły Przemyskiej w dniu 14 kwietnia 1417 roku, kupiony od "wdowy po Piotrze Fus za 212 grzywien ważnych"<ref name=":14" />. Dnia 14 czerwca 1462 r. następuje rozgraniczenie wsi Pnikut, Buchowice i Bolanowice<ref name=":14" />.
Są w Pnikucie miejsca historycznie ważne, nie tylko dla samej wsi. To tutaj miała miejsce regularna bitwa, gdy w 1672 roku podczas kolejnej wyprawy Mohamed IV w sojuszu z [[Tatarzy|Tatarami]] i Kozakami napadł na wschodnie rubieże Polski w tym ziemię przemyską. Dnia 8 października wspomnianego roku, obciążone łupami i jeńcami trzy [[Orda|ordy tatarskie]] zostały rozbite przez ochotników z [[Przemyśl]]a oraz mieszkańców Pnikuta, dowodzonych przez ks. Krystyna Szykowskiego, gwardiana o.o. Reformatów Przemyskich<ref name=":14" />. Po bitwie miejsce pochówku walecznych obrońców nazwane zostało Kalwaryjką i do dzisiaj mieszkańcy zapalają tam znicze w [[Wszystkich Świętych|Święto Zmarłych]].
W południowo - wschodniej części Pnikuta znajduje się wzniesienie do dzisiaj nazywane "Zamczyskiem". Według ludowych podań mieszkali tam dwaj strażnicy - obserwatorzy, których zadaniem było informowanie mieszkańców o zbliżającym się niebezpieczeństwie. Dziś nie wiadomo, jaki był charakter tego miejsca, czy była to wieża obronna<ref name=":15" />, czy zamek<ref>[http://www.pbc.rzeszow.pl/dlibra/docmetadata?id=4771&from=publication M. Orłowicz, Ilustrowany Przewodnik po Przemyślu i okolicy, Zjednoczenie Towarzystw Polskich, Przemyśl, 1917]</ref>.
=== I Wojna Światowa ===
Okres I Wojny Światowej to przede wszystkim olbrzymie zniszczenia, przestaje istnieć Sokolnia i mleczarnia, część gospodarstw spłonęło lub zostało rozebranych czy zburzonych. Zginęło wielu mieszkańców. Pnikuczanie walczyli na polach wielu bitew. W [[Legiony Polskie 1914-1918|Legionach]]: Walenty Miśniak (kawaler [[Order Virtuti Militari|orderu Virtuti - Militari]]), Władysław Dorosz (wielokrotnie odznaczony), Bronisław Kuśnierz, Michał Kuśnierz, Władysław Kuśnierz, Józef Żółkiewicz, Szymon Bazanowski, Bartłomiej Gawron, Błażej Dorosz, Marek Muszak, Ludwik Muszak, Ludwik Folta, Stanisław Czop, Mateusz Wiącek s. Jana, Sylwester Pawłowski, Józef Muszak. W armii Hallera służyli: Jan Miśniak, Franciszek Czerniec, Jan Czerniec, Antoni Czerniec, Fabian Paprocki, Wawrzyniec Gładysz, Jan Ździobek, Franciszek Skrabka, Antoni Dorosz<ref name=":22" />.
=== Dwudziestolecie międzywojenne ===
Po I Wojnie Światowej powstaje komórka [[Związek Strzelecki|Związku Strzeleckiego "Strzelec"]], powołana zostaje z inicjatywy mieszkańców [[Spółdzielcza kasa oszczędnościowo-kredytowa|Kasa Stefczyka]], a także tworzy się [[Ochotnicza Straż Pożarna]] pod komendą Andrzeja Piwowara. Z inicjatywy księdza Walerego Motyki, powstaje Katolicki Związek Młodzieży Żeńskiej i Męskiej ([[Akcja Katolicka w II Rzeczypospolitej|Akcja Katolicka]]). Pod przewodnictwem Walentego Miśniaka działa komórka BBWR ([[Bezpartyjny Blok Współpracy z Rządem]]). Silną organizacją jest też [[Stronnictwo Ludowe]] oraz [[Związek Młodzieży Wiejskiej|Związek Młodzieży Wiejskiej "WICI"]]<ref name=":23" />.
Pierwszego sierpnia 1934 roku na mocy ustawy<ref name=":18" /> powołano zbiorczą gminę Pnikut. W jej skład wchodzą miejscowości: [[Buchowice]], [[Chliple]], [[Czyżowice (Ukraina)|Czyżowice]], Hańkowice, [[Jatwięgi]], [[Krukienice]], [[Ostrożec (rejon mościski)|Ostrożec]], Pnikut, [[Podliski (rejon mościski)|Podliski]], [[Radenice]], [[Sudkowice]], [[Wiszenka (rejon mościski)|Wiszenka]]. W tym czasie parafia Pnikucka składała się z Pnikuta, Buchowic i Pakości. Głównym właścicielem ziemi jest Kapituła Przemyska. W okresie międzywojennym we wsi działałją dwa młyny wodne, olejarnia, trzy warsztaty tkackie, cegielnia, nowoczesna mleczarnia, trzy kuźnie, dziesięciu szewców, trzynastu krawców, trzech rymarzy, dwóch kołodziejów, przewoźnik, dwudziestu fryzjerów, ośmiu stolarzy, dziesięciu cieśli, pięciu murarzy, dwóch blacharzy i jeden studniarz<ref name=":23" />.
=== II Wojna Światowa ===
W połowie września 1939 roku do Pnikuta wkraczają Niemcy w marszu na [[Lwów]]. Po agresji [[Związek Socjalistycznych Republik Radzieckich|ZSRR]] na Polskę armia niemiecka cofa się i po raz drugi przechodzi przez wieś, a wkrótce po Niemcach przychodzą Rosjanie. W międzyczasie w Pnikucie, w drodze na [[Węgry]] stacjonuje oddział dowodzony przez gen. [[Władysław Anders|Władysława Andersa]]<ref name=":23" />. Niedaleko, pod Starym Samborem, gen. Anders zostaje dwukrotnie ranny i wzięty do niewoli (29 września).
Okres pierwszej okupacji sowieckiej to życie w strachu przed aresztowaniem i śmiercią. Antypolskie nastawienie Rosjan, denuncjacje polskich patriotów przez Żydów i nacjonalistów Ukraińskich oraz przymusowe wcielenia do Armii Radzieckiej (mężczyźni urodzeni w latach 1918 - 1921) potęgowały niepokój i niepewność jutra. Po 2 czerwca 1941 roku (atak Niemiec na ZSRR) wojska Wermachtu po raz kolejny przechodzą przez Pnikut. W okresie okupacji niemieckiej na terenie wsi odbudowuje się konspiracyjny ruch oporu.
W Pnikucie oprócz Niemców działała również Granatowa Policja rekrutowana głównie ze współpracujących z okupantem Ukraińców z Buchowic. W tym okresie Niemcy tolerowali działalność UPA i innych ukraińskich ruchów nacjonalistycznych. Polacy organizują samoobronę. Budowane są miejsca ukrycia (zamaskowane schrony), a mężczyźni uzbrojeni w widły i kosy, ale również w broń palną informowani są o zagrożeniu biciem kościelnych dzwonów<ref name=":22" />.
Na przełomie 1943 i 1944 roku do Pnikuta przybywają oddziały [[Armia Krajowa|Armii Krajowej]] które początkowo ukrywają się u mieszkańców a następnie w podpnikuckim lesie. Wielu mieszkańców przyłącza się do partyzantów, praktycznie cała wieś zaopatruje ich w żywność. W obawie przed kontrolą wiezione na wozie jedzenie ukrywano w sianie a woźnicami byli młodzi chłopcy, dzieci by nie wzbudzać podejrzeń. Okres ten to czas względnego spokoju ze strony banderowców, którzy obawiali się polskich partyzantów<ref name=":22" />.
Podczas II Wojny Światowej zginęło ponad 40 mieszkańców wsi, 27 zostało aresztowanych przez Gestapo, a 86 wywieziono na roboty do Niemiec z których większość wróciła po wojnie do rodzinnych domów<ref name=":22" />. Pnikuczanie walczyli pod Monte Cassino i w wielu innych bitwach pod dowództwem między innymi gen. Andersa. Wielu powołano w szeregi Ludowego Wojska Polskiego do I i II Armii<ref name=":23" />.
=== Okres powojenny ===
Po II Wojnie Światowej, Pnikut na mocy ustaleń w Jałcie znalazł się w granicach Związku Radzieckiego. Wielu wierzyło, że to okres przejściowy i wkrótce wszystko wróci do stanu sprzed wojny. I fala repatriacji to lata 1945 - 1947. Polacy jechali w nieznane, zostawiając wszystko, co było dla nich cenne i ważne.
Bardzo długo Pnikut opierał się kolektywizacji i prawdopodobnie był ostatnią wsią w okręgu, jaka przystąpiła do [[Kołchoz|kołchozu]].
W latach 1956 - 1958 miała miejsce druga fala repatriacji. Ludzie stracili nadzieję, że Pnikut wróci w granice Polski. Ogółem po wojnie wyjechało z Pnikuta 420 polskich rodzin, a ponad 90 rodzin zostało<ref name=":22" />.
Gdy w 1945 roku wieloletni proboszcz ks. Tomasz Szurek musiał opuścić parafię, na jego miejsce przybył [[Jerzy Ablewicz|ks. Jerzy Ablewicz]]. Po jego wyjeździe w 1946 roku władze nie wydały zezwolenia na pracę innego kapłana w Pnikuckiej parafii. Mieszkańcy jednak nigdy nie oddali kluczy od kościoła i choć wieś obciążono wysokimi podatkami, świątynia pozostała w dyspozycji parafian. Po wieloletnich zabiegach ze strony mieszkańców, dopiero w 1987 roku władza oficjalnie zezwoliła na odprawianie nabożeństw w kościele. Był to pierwszy taki przypadek w całym ZSRR.
O ile krótko po wojnie zdarzały się rozboje i napady rabunkowe, zarówno banderowców jak i zwykłych bandytów, o tyle lata późniejsze to okres stosunkowo spokojnej koegzystencji Polaków i Ukraińców, których było we wsi coraz więcej.
W 1986 roku, pomiędzy 19 a 21 września miał miejsce Pierwszy Zjazd Pnikuczan, a w 1991 roku powstał we wsi Oddział Towarzystwa Kultury Polskiej Ziemi Lwowskiej.
Po rozpadzie ZSRR Pnikut jest częścią Ukrainy. Dnia 9 sierpnia 2009 roku obchodzono uroczyście 650 lecie powstania miejscowości.
{{Przypisy}}
== Linki zewnętrzne ==
* [http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VII/335] Pnikut w Słowniku Geograficznym Królestwa Polskiego i innych krajów słowiańskich, tVII
* [http://www.pnikut.net Pnikut.net], serwis mieszkańców dawnego Pnikuta
* [http://www.pnikut.com/ Strona parafialna]
{{Cytuj Wiki}}
[[Kategoria:Wsie obwodu lwowskiego]]
[[Kategoria:Rejon mościski]]
8c530277c5a3fa7fd963c9a59c0970c7fb46daa3
387
384
2014-02-08T21:44:14Z
Ffkapa
2
dodany szablon
wikitext
text/x-wiki
'''Pnikut''' (ukr. ''Пнікут'') – wieś na [[Ukraina|Ukrainie]], w [[rejon mościski|rejonie mościskim]] [[obwód lwowski|obwodu lwowskiego]]. Wieś liczy 1101 mieszkańców.
Założony w [[1359]] r. W [[II Rzeczpospolita|II Rzeczypospolitej]] do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej [[gmina Pnikut|gminy Pnikut]] w [[Powiat mościski|powiecie mościskim]] w [[województwo lwowskie|woj. lwowskim]]<ref name=":18">{{Dziennik Ustaw|rok=1934|numer=64|pozycja=547}}</ref>. Po wojnie odłączona od Polski i włączona do [[Ukraińska Socjalistyczna Republika Radziecka|Ukraińskiej SRR]].
We wsi działa oddział [[Towarzystwo Kultury Polskiej Ziemi Lwowskiej|Towarzystwa Kultury Polskiej Ziemi Lwowskiej]]<ref>[http://tkpzl.lviv.ua/pl/pages/21/ Towarzystwo Kultury Polskiej Ziemi Lwowskiej]</ref>.
== Mieszkańcy ==
=== Zmiany demograficzne ===
Od najdawniejszych lat Pnikut zamieszkiwali głównie [[Polacy]]. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiają się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów<ref name=":15">L. Świtalski, Kronika Pnikuta, Pnikut 25.X.1905</ref>.
Około 1800 roku wieś zamieszkują 722 osoby<ref name=":15" />. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie [[Kościół rzymskokatolicki|kościoła rzymskokatolickiego]], 17 to [[Kościoły greckokatolickie|grekokatolicy]] a 41 to zwolennicy [[Judaizm|wyznania mojżeszowego]]<ref name=":14">[http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VIII/335 Słownik Geograficzny Królestwa Polskiego, Warszawa 1880, t.VIII]</ref>. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców<ref name=":15" />. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób<ref>Rocznik Diecezji Przemyskiej, ob. Łać. 1938 Przemyśl 1938, Nakładem Kurii Biskupiej ob. łać.</ref>.
=== Rozwój oświaty i kultury ===
W osiemdziesiątych latach XIX wieku powstaje w Pnikucie pierwsza szkoła prowadzona przez Michała Skwirzyńskiego{{fakt|data=2014-02}} w jego domu, a przed 1890 rokiem, w budynku zbudowanym przez mieszkańców powstaje szkoła czteroklasowa, której kierownikiem zostaje Jan Filip<ref name=":23">Rys monograficzny dziejów wsi Pnikut w okresie 1914 - 1945, Praca zbiorowa pod redakcją F. Dorosza, Przemyśl,1986</ref>. Jeszcze przed 1900 rokiem powstało w Pnikucie koło organizacji "Sokół" a w jego ramach zespoły: teatralny, muzyczny, recytatorski i chóralny, natomiast w 1910 roku zbudowano budynek tzw. "Sokolni"<ref>S. Żółkiewicz, Rys historyczny Pnikuta (Ukraina), Przemyśl, 2009</ref>. Na terenie wsi działał Związek Katolicki do którego należało 320 mieszkańców<ref>Kronika Diecezji Przemyskiej, Przemyśl, 1914</ref>. W Pnikucie jeszcze przed I Wojną Światową istniała spółdzielnia mleczarska, kółko rolnicze, dwa sklepy, "Ochronka" dla dzieci i kasa Reiffeisena<ref>[http://jbc.bj.uj.edu.pl/dlibra/results?action=SearchAction&skipSearch=true&mdirids=1&server%3Atype=both&tempQueryType=-3&encode=false&isExpandable=on&isRemote=off&roleId=-3&queryType=-3&dirids=1&rootid=74846&query=pnikut&localQueryType=-3&remoteQueryType=-2 Przyjaciel Ludu, nr. 30, 21.07.1912]</ref>.
W 1921 roku powstaje w Pnikucie Dom Ludowy mieszczący między innymi salkę teatralną wraz z zapleczem i dwie sale wykładowe. Uroczystość otwarcia i poświęcenia domu uświetnił swą obecnością [[Marszałek Sejmu Rzeczypospolitej Polskiej|Marszałek Sejmu RP]] [[Maciej Rataj]]<ref name=":23" />. Po śmierci Jana Filipa w 1923 roku nowym kierownikiem szkoły zostaje Włodzimierz Raba, a po nim Stefania Weintraubowa. We wsi działa prowadzona przez Kazimierza Lecha biblioteka. W 1928 roku kierownikiem szkoły zostaje Kazimierz Kwiatkowski, były legionista. Pod jego kierownictwem szkoła zmienia się z czteroklasowej w siedmioklasową<ref name=":23" />.
W okresie okupacji istniała w Pnikucie szkoła w której nauczano w języku polskim, a języka niemieckiego nie uczono wcale. Po wojnie językiem nauczania stał się język ukraiński a dodatkowo nauczano języka rosyjskiego. Dzieci języka polskiego uczono w domach i na lekcjach religii w Kościele<ref name=":22">[http://www.pnikut.net/teksty/historia_miejscowosci_pnikut.pdf K. Zarański, Historia miejscowości Pnikut]</ref>.
=== Dzieje kościoła ===
[[Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg|thumb|223x223px|Kapliczka na miejscu starego kościoła]]
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|270x270px|Kościół św. Mikołaja w Pnikucie]]
Pierwsze wzmianki o kościele rzymskokatolickim w Pnikucie pochodzą z około 1385 roku<ref name=":15" />. Ponad dwieście lat później bo w roku 1611 na miejscu starego kościoła powstaje nowy. Budynek był drewniany, otoczony wałem i fosą z mostem zwodzonym i palisadą. W 1648 roku kościół wraz ze zgromadzonymi w nim ludźmi zostaje spalony przez kozaków<ref name=":15" />. W 1667 roku, na miejscu spalonego powstaje nowy kościół. Świątynia przetrwała prawie sto lat. Z polecenia biskupa Sierakowskiego i z funduszy Kapituły Przemyskiej w 1762 roku rozpoczęto budowę nowego kościoła. Po pięciu latach 27 lipca 1767 roku świątynię konsekrowano<ref name=":11">[http://www.pnikut.com/ Strona parafialna]</ref>. Kościół służył parafii do 1912 roku, po czym został rozebrany i złożony ponownie w 1929 roku, w [[Laszki Zawiązane|Laszkach Zawiązanych]]<ref name=":11" />. Po kościele pozostała kapliczka, istniejąca do dnia dzisiejszego.
Na przełomie wieków staraniem proboszcza parafii ks. L. Świtalskiego rozpoczynają się prace nad nową, murowaną świątynią dla Pnikuta. W 1901 r. powstaje projekt kościoła sporządzony przez Maksymiliana Jabłońskiego z Dobromila. W kwietniu 1908 roku rozpoczęto budowę, w październiku 1909 roku pokryto dach kościoła, a latem 1910 roku wytynkowano wnętrze. W dniu 6 grudnia 1912 r. kościół został poświęcony. Po usunięciu zniszczeń z okresu I wojny światowej w 1921 roku kościół powtórnie poświęcono<ref name=":11" />, a w 1927 r. zamontowano trzy nowe dzwony z odlewni [[Felczyńscy|Felczyńskich]] w Przemyślu<ref name=":12">N. Sarkady, Dziedzictwo w pejzaż wpisane. Opowieść o polskiej wsi Pnikut, Przemyśl 2010</ref>.
Obecnie w Pnikucie znajdują się dwie świątynie, opisywany kościół św. Mikołaja i [[cerkiew prawosławna]].
== Historia ==
Według niektórych źródeł Pnikut posiadał [[Prawo magdeburskie|magdeburskie prawa miejskie]] już w XV wieku (wcześniej niż Przemyśl)<ref>G. Rokowski, Ziemia Lwowska, OW Rewasz, Piastkw, 2005</ref>. Pierwsze pewne informacje o Pnikucie pochodzą z 1359 roku<ref name=":12" />. Kilka lat później w 1366 roku, miejscowośc Pnekolt (tak nazywał się wówczas Pnikut) nabył Piotr Radciowski<ref name=":1">Akta Grodzkie i Ziemskie, t VIII</ref>, a 8 maja 1385 roku, kolejny właściciel, Piotr Stryjski zapisał Pnekolt (Pnikut) na rzecz [[Biskupi przemyscy|biskupów przemyskich]]<ref>Akta Grodzkie i Ziemskie, t VII</ref>. W roku 1402 Kapituła Przemyska sprzedaje sołtystwo we wsi Pnikut Maciejowi, synowi krawca z Kazimierza<ref name=":1" />. Dnia 29 października 1408 roku [[Władysław II Jagiełło|Władysław Jagiełło]] uwalnia mieszkańców osiedlających się we wsi Pnikut i od wszelkich danin i ciężarów<ref name=":1" />. Pnikut wraca do Kapituły Przemyskiej w dniu 14 kwietnia 1417 roku, kupiony od "wdowy po Piotrze Fus za 212 grzywien ważnych"<ref name=":14" />. Dnia 14 czerwca 1462 r. następuje rozgraniczenie wsi Pnikut, Buchowice i Bolanowice<ref name=":14" />.
Są w Pnikucie miejsca historycznie ważne, nie tylko dla samej wsi. To tutaj miała miejsce regularna bitwa, gdy w 1672 roku podczas kolejnej wyprawy Mohamed IV w sojuszu z [[Tatarzy|Tatarami]] i Kozakami napadł na wschodnie rubieże Polski w tym ziemię przemyską. Dnia 8 października wspomnianego roku, obciążone łupami i jeńcami trzy [[Orda|ordy tatarskie]] zostały rozbite przez ochotników z [[Przemyśl]]a oraz mieszkańców Pnikuta, dowodzonych przez ks. Krystyna Szykowskiego, gwardiana o.o. Reformatów Przemyskich<ref name=":14" />. Po bitwie miejsce pochówku walecznych obrońców nazwane zostało Kalwaryjką i do dzisiaj mieszkańcy zapalają tam znicze w [[Wszystkich Świętych|Święto Zmarłych]].
W południowo - wschodniej części Pnikuta znajduje się wzniesienie do dzisiaj nazywane "Zamczyskiem". Według ludowych podań mieszkali tam dwaj strażnicy - obserwatorzy, których zadaniem było informowanie mieszkańców o zbliżającym się niebezpieczeństwie. Dziś nie wiadomo, jaki był charakter tego miejsca, czy była to wieża obronna<ref name=":15" />, czy zamek<ref>[http://www.pbc.rzeszow.pl/dlibra/docmetadata?id=4771&from=publication M. Orłowicz, Ilustrowany Przewodnik po Przemyślu i okolicy, Zjednoczenie Towarzystw Polskich, Przemyśl, 1917]</ref>.
=== I Wojna Światowa ===
Okres I Wojny Światowej to przede wszystkim olbrzymie zniszczenia, przestaje istnieć Sokolnia i mleczarnia, część gospodarstw spłonęło lub zostało rozebranych czy zburzonych. Zginęło wielu mieszkańców. Pnikuczanie walczyli na polach wielu bitew. W [[Legiony Polskie 1914-1918|Legionach]]: Walenty Miśniak (kawaler [[Order Virtuti Militari|orderu Virtuti - Militari]]), Władysław Dorosz (wielokrotnie odznaczony), Bronisław Kuśnierz, Michał Kuśnierz, Władysław Kuśnierz, Józef Żółkiewicz, Szymon Bazanowski, Bartłomiej Gawron, Błażej Dorosz, Marek Muszak, Ludwik Muszak, Ludwik Folta, Stanisław Czop, Mateusz Wiącek s. Jana, Sylwester Pawłowski, Józef Muszak. W armii Hallera służyli: Jan Miśniak, Franciszek Czerniec, Jan Czerniec, Antoni Czerniec, Fabian Paprocki, Wawrzyniec Gładysz, Jan Ździobek, Franciszek Skrabka, Antoni Dorosz<ref name=":22" />.
=== Dwudziestolecie międzywojenne ===
Po I Wojnie Światowej powstaje komórka [[Związek Strzelecki|Związku Strzeleckiego "Strzelec"]], powołana zostaje z inicjatywy mieszkańców [[Spółdzielcza kasa oszczędnościowo-kredytowa|Kasa Stefczyka]], a także tworzy się [[Ochotnicza Straż Pożarna]] pod komendą Andrzeja Piwowara. Z inicjatywy księdza Walerego Motyki, powstaje Katolicki Związek Młodzieży Żeńskiej i Męskiej ([[Akcja Katolicka w II Rzeczypospolitej|Akcja Katolicka]]). Pod przewodnictwem Walentego Miśniaka działa komórka BBWR ([[Bezpartyjny Blok Współpracy z Rządem]]). Silną organizacją jest też [[Stronnictwo Ludowe]] oraz [[Związek Młodzieży Wiejskiej|Związek Młodzieży Wiejskiej "WICI"]]<ref name=":23" />.
Pierwszego sierpnia 1934 roku na mocy ustawy<ref name=":18" /> powołano zbiorczą gminę Pnikut. W jej skład wchodzą miejscowości: [[Buchowice]], [[Chliple]], [[Czyżowice (Ukraina)|Czyżowice]], Hańkowice, [[Jatwięgi]], [[Krukienice]], [[Ostrożec (rejon mościski)|Ostrożec]], Pnikut, [[Podliski (rejon mościski)|Podliski]], [[Radenice]], [[Sudkowice]], [[Wiszenka (rejon mościski)|Wiszenka]]. W tym czasie parafia Pnikucka składała się z Pnikuta, Buchowic i Pakości. Głównym właścicielem ziemi jest Kapituła Przemyska. W okresie międzywojennym we wsi działałją dwa młyny wodne, olejarnia, trzy warsztaty tkackie, cegielnia, nowoczesna mleczarnia, trzy kuźnie, dziesięciu szewców, trzynastu krawców, trzech rymarzy, dwóch kołodziejów, przewoźnik, dwudziestu fryzjerów, ośmiu stolarzy, dziesięciu cieśli, pięciu murarzy, dwóch blacharzy i jeden studniarz<ref name=":23" />.
=== II Wojna Światowa ===
W połowie września 1939 roku do Pnikuta wkraczają Niemcy w marszu na [[Lwów]]. Po agresji [[Związek Socjalistycznych Republik Radzieckich|ZSRR]] na Polskę armia niemiecka cofa się i po raz drugi przechodzi przez wieś, a wkrótce po Niemcach przychodzą Rosjanie. W międzyczasie w Pnikucie, w drodze na [[Węgry]] stacjonuje oddział dowodzony przez gen. [[Władysław Anders|Władysława Andersa]]<ref name=":23" />. Niedaleko, pod Starym Samborem, gen. Anders zostaje dwukrotnie ranny i wzięty do niewoli (29 września).
Okres pierwszej okupacji sowieckiej to życie w strachu przed aresztowaniem i śmiercią. Antypolskie nastawienie Rosjan, denuncjacje polskich patriotów przez Żydów i nacjonalistów Ukraińskich oraz przymusowe wcielenia do Armii Radzieckiej (mężczyźni urodzeni w latach 1918 - 1921) potęgowały niepokój i niepewność jutra. Po 2 czerwca 1941 roku (atak Niemiec na ZSRR) wojska Wermachtu po raz kolejny przechodzą przez Pnikut. W okresie okupacji niemieckiej na terenie wsi odbudowuje się konspiracyjny ruch oporu.
W Pnikucie oprócz Niemców działała również Granatowa Policja rekrutowana głównie ze współpracujących z okupantem Ukraińców z Buchowic. W tym okresie Niemcy tolerowali działalność UPA i innych ukraińskich ruchów nacjonalistycznych. Polacy organizują samoobronę. Budowane są miejsca ukrycia (zamaskowane schrony), a mężczyźni uzbrojeni w widły i kosy, ale również w broń palną informowani są o zagrożeniu biciem kościelnych dzwonów<ref name=":22" />.
Na przełomie 1943 i 1944 roku do Pnikuta przybywają oddziały [[Armia Krajowa|Armii Krajowej]] które początkowo ukrywają się u mieszkańców a następnie w podpnikuckim lesie. Wielu mieszkańców przyłącza się do partyzantów, praktycznie cała wieś zaopatruje ich w żywność. W obawie przed kontrolą wiezione na wozie jedzenie ukrywano w sianie a woźnicami byli młodzi chłopcy, dzieci by nie wzbudzać podejrzeń. Okres ten to czas względnego spokoju ze strony banderowców, którzy obawiali się polskich partyzantów<ref name=":22" />.
Podczas II Wojny Światowej zginęło ponad 40 mieszkańców wsi, 27 zostało aresztowanych przez Gestapo, a 86 wywieziono na roboty do Niemiec z których większość wróciła po wojnie do rodzinnych domów<ref name=":22" />. Pnikuczanie walczyli pod Monte Cassino i w wielu innych bitwach pod dowództwem między innymi gen. Andersa. Wielu powołano w szeregi Ludowego Wojska Polskiego do I i II Armii<ref name=":23" />.
=== Okres powojenny ===
Po II Wojnie Światowej, Pnikut na mocy ustaleń w Jałcie znalazł się w granicach Związku Radzieckiego. Wielu wierzyło, że to okres przejściowy i wkrótce wszystko wróci do stanu sprzed wojny. I fala repatriacji to lata 1945 - 1947. Polacy jechali w nieznane, zostawiając wszystko, co było dla nich cenne i ważne.
Bardzo długo Pnikut opierał się kolektywizacji i prawdopodobnie był ostatnią wsią w okręgu, jaka przystąpiła do [[Kołchoz|kołchozu]].
W latach 1956 - 1958 miała miejsce druga fala repatriacji. Ludzie stracili nadzieję, że Pnikut wróci w granice Polski. Ogółem po wojnie wyjechało z Pnikuta 420 polskich rodzin, a ponad 90 rodzin zostało<ref name=":22" />.
Gdy w 1945 roku wieloletni proboszcz ks. Tomasz Szurek musiał opuścić parafię, na jego miejsce przybył [[Jerzy Ablewicz|ks. Jerzy Ablewicz]]. Po jego wyjeździe w 1946 roku władze nie wydały zezwolenia na pracę innego kapłana w Pnikuckiej parafii. Mieszkańcy jednak nigdy nie oddali kluczy od kościoła i choć wieś obciążono wysokimi podatkami, świątynia pozostała w dyspozycji parafian. Po wieloletnich zabiegach ze strony mieszkańców, dopiero w 1987 roku władza oficjalnie zezwoliła na odprawianie nabożeństw w kościele. Był to pierwszy taki przypadek w całym ZSRR.
O ile krótko po wojnie zdarzały się rozboje i napady rabunkowe, zarówno banderowców jak i zwykłych bandytów, o tyle lata późniejsze to okres stosunkowo spokojnej koegzystencji Polaków i Ukraińców, których było we wsi coraz więcej.
W 1986 roku, pomiędzy 19 a 21 września miał miejsce Pierwszy Zjazd Pnikuczan, a w 1991 roku powstał we wsi Oddział Towarzystwa Kultury Polskiej Ziemi Lwowskiej.
Po rozpadzie ZSRR Pnikut jest częścią Ukrainy. Dnia 9 sierpnia 2009 roku obchodzono uroczyście 650 lecie powstania miejscowości.
{{Przypisy}}
== Linki zewnętrzne ==
* [http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VII/335] Pnikut w Słowniku Geograficznym Królestwa Polskiego i innych krajów słowiańskich, tVII
* [http://www.pnikut.net Pnikut.net], serwis mieszkańców dawnego Pnikuta
* [http://www.pnikut.com/ Strona parafialna]
{{Cytuj Wiki}}
{{Rejon mościski}}
[[Kategoria:Wsie obwodu lwowskiego]]
[[Kategoria:Rejon mościski]]
c04dbdfe18d0daf0bcc7fba756608f38a2a7526f
384
383
2014-02-08T21:34:35Z
Ffkapa
2
wikitext
text/x-wiki
'''Pnikut''' (ukr. ''Пнікут'') – wieś na [[Ukraina|Ukrainie]], w [[rejon mościski|rejonie mościskim]] [[obwód lwowski|obwodu lwowskiego]]. Wieś liczy 1101 mieszkańców.
Założony w [[1359]] r. W [[II Rzeczpospolita|II Rzeczypospolitej]] do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej [[gmina Pnikut|gminy Pnikut]] w [[Powiat mościski|powiecie mościskim]] w [[województwo lwowskie|woj. lwowskim]]<ref name=":18">{{Dziennik Ustaw|rok=1934|numer=64|pozycja=547}}</ref>. Po wojnie odłączona od Polski i włączona do [[Ukraińska Socjalistyczna Republika Radziecka|Ukraińskiej SRR]].
We wsi działa oddział [[Towarzystwo Kultury Polskiej Ziemi Lwowskiej|Towarzystwa Kultury Polskiej Ziemi Lwowskiej]]<ref>[http://tkpzl.lviv.ua/pl/pages/21/ Towarzystwo Kultury Polskiej Ziemi Lwowskiej]</ref>.
== Mieszkańcy ==
=== Zmiany demograficzne ===
Od najdawniejszych lat Pnikut zamieszkiwali głównie [[Polacy]]. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiają się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów<ref name=":15">L. Świtalski, Kronika Pnikuta, Pnikut 25.X.1905</ref>.
Około 1800 roku wieś zamieszkują 722 osoby<ref name=":15" />. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie [[Kościół rzymskokatolicki|kościoła rzymskokatolickiego]], 17 to [[Kościoły greckokatolickie|grekokatolicy]] a 41 to zwolennicy [[Judaizm|wyznania mojżeszowego]]<ref name=":14">[http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VIII/335 Słownik Geograficzny Królestwa Polskiego, Warszawa 1880, t.VIII]</ref>. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców<ref name=":15" />. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób<ref>Rocznik Diecezji Przemyskiej, ob. Łać. 1938 Przemyśl 1938, Nakładem Kurii Biskupiej ob. łać.</ref>.
=== Rozwój oświaty i kultury ===
W osiemdziesiątych latach XIX wieku powstaje w Pnikucie pierwsza szkoła prowadzona przez Michała Skwirzyńskiego{{fakt|data=2014-02}} w jego domu, a przed 1890 rokiem, w budynku zbudowanym przez mieszkańców powstaje szkoła czteroklasowa, której kierownikiem zostaje Jan Filip<ref name=":23">Rys monograficzny dziejów wsi Pnikut w okresie 1914 - 1945, Praca zbiorowa pod redakcją F. Dorosza, Przemyśl,1986</ref>. Jeszcze przed 1900 rokiem powstało w Pnikucie koło organizacji "Sokół" a w jego ramach zespoły: teatralny, muzyczny, recytatorski i chóralny, natomiast w 1910 roku zbudowano budynek tzw. "Sokolni"<ref>S. Żółkiewicz, Rys historyczny Pnikuta (Ukraina), Przemyśl, 2009</ref>. Na terenie wsi działał Związek Katolicki do którego należało 320 mieszkańców<ref>Kronika Diecezji Przemyskiej, Przemyśl, 1914</ref>. W Pnikucie jeszcze przed I Wojną Światową istniała spółdzielnia mleczarska, kółko rolnicze, dwa sklepy, "Ochronka" dla dzieci i kasa Reiffeisena<ref>[http://jbc.bj.uj.edu.pl/dlibra/results?action=SearchAction&skipSearch=true&mdirids=1&server%3Atype=both&tempQueryType=-3&encode=false&isExpandable=on&isRemote=off&roleId=-3&queryType=-3&dirids=1&rootid=74846&query=pnikut&localQueryType=-3&remoteQueryType=-2 Przyjaciel Ludu, nr. 30, 21.07.1912]</ref>.
W 1921 roku powstaje w Pnikucie Dom Ludowy mieszczący między innymi salkę teatralną wraz z zapleczem i dwie sale wykładowe. Uroczystość otwarcia i poświęcenia domu uświetnił swą obecnością [[Marszałek Sejmu Rzeczypospolitej Polskiej|Marszałek Sejmu RP]] [[Maciej Rataj]]<ref name=":23" />. Po śmierci Jana Filipa w 1923 roku nowym kierownikiem szkoły zostaje Włodzimierz Raba, a po nim Stefania Weintraubowa. We wsi działa prowadzona przez Kazimierza Lecha biblioteka. W 1928 roku kierownikiem szkoły zostaje Kazimierz Kwiatkowski, były legionista. Pod jego kierownictwem szkoła zmienia się z czteroklasowej w siedmioklasową<ref name=":23" />.
W okresie okupacji istniała w Pnikucie szkoła w której nauczano w języku polskim, a języka niemieckiego nie uczono wcale. Po wojnie językiem nauczania stał się język ukraiński a dodatkowo nauczano języka rosyjskiego. Dzieci języka polskiego uczono w domach i na lekcjach religii w Kościele<ref name=":22">[http://www.pnikut.net/teksty/historia_miejscowosci_pnikut.pdf K. Zarański, Historia miejscowości Pnikut]</ref>.
=== Dzieje kościoła ===
[[Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg|thumb|223x223px|Kapliczka na miejscu starego kościoła]]
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|270x270px|Kościół św. Mikołaja w Pnikucie]]
Pierwsze wzmianki o kościele rzymskokatolickim w Pnikucie pochodzą z około 1385 roku<ref name=":15" />. Ponad dwieście lat później bo w roku 1611 na miejscu starego kościoła powstaje nowy. Budynek był drewniany, otoczony wałem i fosą z mostem zwodzonym i palisadą. W 1648 roku kościół wraz ze zgromadzonymi w nim ludźmi zostaje spalony przez kozaków<ref name=":15" />. W 1667 roku, na miejscu spalonego powstaje nowy kościół. Świątynia przetrwała prawie sto lat. Z polecenia biskupa Sierakowskiego i z funduszy Kapituły Przemyskiej w 1762 roku rozpoczęto budowę nowego kościoła. Po pięciu latach 27 lipca 1767 roku świątynię konsekrowano<ref name=":11">[http://www.pnikut.com/ Strona parafialna]</ref>. Kościół służył parafii do 1912 roku, po czym został rozebrany i złożony ponownie w 1929 roku, w [[Laszki Zawiązane|Laszkach Zawiązanych]]<ref name=":11" />. Po kościele pozostała kapliczka, istniejąca do dnia dzisiejszego.
Na przełomie wieków staraniem proboszcza parafii ks. L. Świtalskiego rozpoczynają się prace nad nową, murowaną świątynią dla Pnikuta. W 1901 r. powstaje projekt kościoła sporządzony przez Maksymiliana Jabłońskiego z Dobromila. W kwietniu 1908 roku rozpoczęto budowę, w październiku 1909 roku pokryto dach kościoła, a latem 1910 roku wytynkowano wnętrze. W dniu 6 grudnia 1912 r. kościół został poświęcony. Po usunięciu zniszczeń z okresu I wojny światowej w 1921 roku kościół powtórnie poświęcono<ref name=":11" />, a w 1927 r. zamontowano trzy nowe dzwony z odlewni [[Felczyńscy|Felczyńskich]] w Przemyślu<ref name=":12">N. Sarkady, Dziedzictwo w pejzaż wpisane. Opowieść o polskiej wsi Pnikut, Przemyśl 2010</ref>.
Obecnie w Pnikucie znajdują się dwie świątynie, opisywany kościół św. Mikołaja i [[cerkiew prawosławna]].
== Historia ==
Według niektórych źródeł Pnikut posiadał [[Prawo magdeburskie|magdeburskie prawa miejskie]] już w XV wieku (wcześniej niż Przemyśl)<ref>G. Rokowski, Ziemia Lwowska, OW Rewasz, Piastkw, 2005</ref>. Pierwsze pewne informacje o Pnikucie pochodzą z 1359 roku<ref name=":12" />. Kilka lat później w 1366 roku, miejscowośc Pnekolt (tak nazywał się wówczas Pnikut) nabył Piotr Radciowski<ref name=":1">Akta Grodzkie i Ziemskie, t VIII</ref>, a 8 maja 1385 roku, kolejny właściciel, Piotr Stryjski zapisał Pnekolt (Pnikut) na rzecz [[Biskupi przemyscy|biskupów przemyskich]]<ref>Akta Grodzkie i Ziemskie, t VII</ref>. W roku 1402 Kapituła Przemyska sprzedaje sołtystwo we wsi Pnikut Maciejowi, synowi krawca z Kazimierza<ref name=":1" />. Dnia 29 października 1408 roku [[Władysław II Jagiełło|Władysław Jagiełło]] uwalnia mieszkańców osiedlających się we wsi Pnikut i od wszelkich danin i ciężarów<ref name=":1" />. Pnikut wraca do Kapituły Przemyskiej w dniu 14 kwietnia 1417 roku, kupiony od "wdowy po Piotrze Fus za 212 grzywien ważnych"<ref name=":14" />. Dnia 14 czerwca 1462 r. następuje rozgraniczenie wsi Pnikut, Buchowice i Bolanowice<ref name=":14" />.
Są w Pnikucie miejsca historycznie ważne, nie tylko dla samej wsi. To tutaj miała miejsce regularna bitwa, gdy w 1672 roku podczas kolejnej wyprawy Mohamed IV w sojuszu z [[Tatarzy|Tatarami]] i Kozakami napadł na wschodnie rubieże Polski w tym ziemię przemyską. Dnia 8 października wspomnianego roku, obciążone łupami i jeńcami trzy [[Orda|ordy tatarskie]] zostały rozbite przez ochotników z [[Przemyśl]]a oraz mieszkańców Pnikuta, dowodzonych przez ks. Krystyna Szykowskiego, gwardiana o.o. Reformatów Przemyskich<ref name=":14" />. Po bitwie miejsce pochówku walecznych obrońców nazwane zostało Kalwaryjką i do dzisiaj mieszkańcy zapalają tam znicze w [[Wszystkich Świętych|Święto Zmarłych]].
W południowo - wschodniej części Pnikuta znajduje się wzniesienie do dzisiaj nazywane "Zamczyskiem". Według ludowych podań mieszkali tam dwaj strażnicy - obserwatorzy, których zadaniem było informowanie mieszkańców o zbliżającym się niebezpieczeństwie. Dziś nie wiadomo, jaki był charakter tego miejsca, czy była to wieża obronna<ref name=":15" />, czy zamek<ref>[http://www.pbc.rzeszow.pl/dlibra/docmetadata?id=4771&from=publication M. Orłowicz, Ilustrowany Przewodnik po Przemyślu i okolicy, Zjednoczenie Towarzystw Polskich, Przemyśl, 1917]</ref>.
=== I Wojna Światowa ===
Okres I Wojny Światowej to przede wszystkim olbrzymie zniszczenia, przestaje istnieć Sokolnia i mleczarnia, część gospodarstw spłonęło lub zostało rozebranych czy zburzonych. Zginęło wielu mieszkańców. Pnikuczanie walczyli na polach wielu bitew. W [[Legiony Polskie 1914-1918|Legionach]]: Walenty Miśniak (kawaler [[Order Virtuti Militari|orderu Virtuti - Militari]]), Władysław Dorosz (wielokrotnie odznaczony), Bronisław Kuśnierz, Michał Kuśnierz, Władysław Kuśnierz, Józef Żółkiewicz, Szymon Bazanowski, Bartłomiej Gawron, Błażej Dorosz, Marek Muszak, Ludwik Muszak, Ludwik Folta, Stanisław Czop, Mateusz Wiącek s. Jana, Sylwester Pawłowski, Józef Muszak. W armii Hallera służyli: Jan Miśniak, Franciszek Czerniec, Jan Czerniec, Antoni Czerniec, Fabian Paprocki, Wawrzyniec Gładysz, Jan Ździobek, Franciszek Skrabka, Antoni Dorosz<ref name=":22" />.
=== Dwudziestolecie międzywojenne ===
Po I Wojnie Światowej powstaje komórka [[Związek Strzelecki|Związku Strzeleckiego "Strzelec"]], powołana zostaje z inicjatywy mieszkańców [[Spółdzielcza kasa oszczędnościowo-kredytowa|Kasa Stefczyka]], a także tworzy się [[Ochotnicza Straż Pożarna]] pod komendą Andrzeja Piwowara. Z inicjatywy księdza Walerego Motyki, powstaje Katolicki Związek Młodzieży Żeńskiej i Męskiej ([[Akcja Katolicka w II Rzeczypospolitej|Akcja Katolicka]]). Pod przewodnictwem Walentego Miśniaka działa komórka BBWR ([[Bezpartyjny Blok Współpracy z Rządem]]). Silną organizacją jest też [[Stronnictwo Ludowe]] oraz [[Związek Młodzieży Wiejskiej|Związek Młodzieży Wiejskiej "WICI"]]<ref name=":23" />.
Pierwszego sierpnia 1934 roku na mocy ustawy<ref name=":18" /> powołano zbiorczą gminę Pnikut. W jej skład wchodzą miejscowości: [[Buchowice]], [[Chliple]], [[Czyżowice (Ukraina)|Czyżowice]], Hańkowice, [[Jatwięgi]], [[Krukienice]], [[Ostrożec (rejon mościski)|Ostrożec]], Pnikut, [[Podliski (rejon mościski)|Podliski]], [[Radenice]], [[Sudkowice]], [[Wiszenka (rejon mościski)|Wiszenka]]. W tym czasie parafia Pnikucka składała się z Pnikuta, Buchowic i Pakości. Głównym właścicielem ziemi jest Kapituła Przemyska. W okresie międzywojennym we wsi działałją dwa młyny wodne, olejarnia, trzy warsztaty tkackie, cegielnia, nowoczesna mleczarnia, trzy kuźnie, dziesięciu szewców, trzynastu krawców, trzech rymarzy, dwóch kołodziejów, przewoźnik, dwudziestu fryzjerów, ośmiu stolarzy, dziesięciu cieśli, pięciu murarzy, dwóch blacharzy i jeden studniarz<ref name=":23" />.
=== II Wojna Światowa ===
W połowie września 1939 roku do Pnikuta wkraczają Niemcy w marszu na [[Lwów]]. Po agresji [[Związek Socjalistycznych Republik Radzieckich|ZSRR]] na Polskę armia niemiecka cofa się i po raz drugi przechodzi przez wieś, a wkrótce po Niemcach przychodzą Rosjanie. W międzyczasie w Pnikucie, w drodze na [[Węgry]] stacjonuje oddział dowodzony przez gen. [[Władysław Anders|Władysława Andersa]]<ref name=":23" />. Niedaleko, pod Starym Samborem, gen. Anders zostaje dwukrotnie ranny i wzięty do niewoli (29 września).
Okres pierwszej okupacji sowieckiej to życie w strachu przed aresztowaniem i śmiercią. Antypolskie nastawienie Rosjan, denuncjacje polskich patriotów przez Żydów i nacjonalistów Ukraińskich oraz przymusowe wcielenia do Armii Radzieckiej (mężczyźni urodzeni w latach 1918 - 1921) potęgowały niepokój i niepewność jutra. Po 2 czerwca 1941 roku (atak Niemiec na ZSRR) wojska Wermachtu po raz kolejny przechodzą przez Pnikut. W okresie okupacji niemieckiej na terenie wsi odbudowuje się konspiracyjny ruch oporu.
W Pnikucie oprócz Niemców działała również Granatowa Policja rekrutowana głównie ze współpracujących z okupantem Ukraińców z Buchowic. W tym okresie Niemcy tolerowali działalność UPA i innych ukraińskich ruchów nacjonalistycznych. Polacy organizują samoobronę. Budowane są miejsca ukrycia (zamaskowane schrony), a mężczyźni uzbrojeni w widły i kosy, ale również w broń palną informowani są o zagrożeniu biciem kościelnych dzwonów<ref name=":22" />.
Na przełomie 1943 i 1944 roku do Pnikuta przybywają oddziały [[Armia Krajowa|Armii Krajowej]] które początkowo ukrywają się u mieszkańców a następnie w podpnikuckim lesie. Wielu mieszkańców przyłącza się do partyzantów, praktycznie cała wieś zaopatruje ich w żywność. W obawie przed kontrolą wiezione na wozie jedzenie ukrywano w sianie a woźnicami byli młodzi chłopcy, dzieci by nie wzbudzać podejrzeń. Okres ten to czas względnego spokoju ze strony banderowców, którzy obawiali się polskich partyzantów<ref name=":22" />.
Podczas II Wojny Światowej zginęło ponad 40 mieszkańców wsi, 27 zostało aresztowanych przez Gestapo, a 86 wywieziono na roboty do Niemiec z których większość wróciła po wojnie do rodzinnych domów<ref name=":22" />. Pnikuczanie walczyli pod Monte Cassino i w wielu innych bitwach pod dowództwem między innymi gen. Andersa. Wielu powołano w szeregi Ludowego Wojska Polskiego do I i II Armii<ref name=":23" />.
=== Okres powojenny ===
Po II Wojnie Światowej, Pnikut na mocy ustaleń w Jałcie znalazł się w granicach Związku Radzieckiego. Wielu wierzyło, że to okres przejściowy i wkrótce wszystko wróci do stanu sprzed wojny. I fala repatriacji to lata 1945 - 1947. Polacy jechali w nieznane, zostawiając wszystko, co było dla nich cenne i ważne.
Bardzo długo Pnikut opierał się kolektywizacji i prawdopodobnie był ostatnią wsią w okręgu, jaka przystąpiła do [[Kołchoz|kołchozu]].
W latach 1956 - 1958 miała miejsce druga fala repatriacji. Ludzie stracili nadzieję, że Pnikut wróci w granice Polski. Ogółem po wojnie wyjechało z Pnikuta 420 polskich rodzin, a ponad 90 rodzin zostało<ref name=":22" />.
Gdy w 1945 roku wieloletni proboszcz ks. Tomasz Szurek musiał opuścić parafię, na jego miejsce przybył [[Jerzy Ablewicz|ks. Jerzy Ablewicz]]. Po jego wyjeździe w 1946 roku władze nie wydały zezwolenia na pracę innego kapłana w Pnikuckiej parafii. Mieszkańcy jednak nigdy nie oddali kluczy od kościoła i choć wieś obciążono wysokimi podatkami, świątynia pozostała w dyspozycji parafian. Po wieloletnich zabiegach ze strony mieszkańców, dopiero w 1987 roku władza oficjalnie zezwoliła na odprawianie nabożeństw w kościele. Był to pierwszy taki przypadek w całym ZSRR.
O ile krótko po wojnie zdarzały się rozboje i napady rabunkowe, zarówno banderowców jak i zwykłych bandytów, o tyle lata późniejsze to okres stosunkowo spokojnej koegzystencji Polaków i Ukraińców, których było we wsi coraz więcej.
W 1986 roku, pomiędzy 19 a 21 września miał miejsce Pierwszy Zjazd Pnikuczan, a w 1991 roku powstał we wsi Oddział Towarzystwa Kultury Polskiej Ziemi Lwowskiej.
Po rozpadzie ZSRR Pnikut jest częścią Ukrainy. Dnia 9 sierpnia 2009 roku obchodzono uroczyście 650 lecie powstania miejscowości.
{{Przypisy}}
== Linki zewnętrzne ==
* [http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VII/335] Pnikut w Słowniku Geograficznym Królestwa Polskiego i innych krajów słowiańskich, tVII
* [http://www.pnikut.net Pnikut.net], serwis mieszkańców dawnego Pnikuta
* [http://www.pnikut.com/ Strona parafialna]
{{Rejon mościski}}
[[Kategoria:Wsie obwodu lwowskiego]]
[[Kategoria:Rejon mościski]]
da33dd77d855a7b13d58ffb2a696e586bf1b0901
383
379
2014-02-08T21:30:23Z
Ffkapa
2
wikitext
text/x-wiki
'''Pnikut''' (ukr. ''Пнікут'') – wieś na [[Ukraina|Ukrainie]], w [[rejon mościski|rejonie mościskim]] [[obwód lwowski|obwodu lwowskiego]]. Wieś liczy 1101 mieszkańców.
Założony w [[1359]] r. W [[II Rzeczpospolita|II Rzeczypospolitej]] do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej [[gmina Pnikut|gminy Pnikut]] w [[Powiat mościski|powiecie mościskim]] w [[województwo lwowskie|woj. lwowskim]]<ref name=":18">{{Dziennik Ustaw|rok=1934|numer=64|pozycja=547}}</ref>. Po wojnie odłączona od Polski i włączona do [[Ukraińska Socjalistyczna Republika Radziecka|Ukraińskiej SRR]].
We wsi działa oddział [[Towarzystwo Kultury Polskiej Ziemi Lwowskiej|Towarzystwa Kultury Polskiej Ziemi Lwowskiej]]<ref>[http://tkpzl.lviv.ua/pl/pages/21/ Towarzystwo Kultury Polskiej Ziemi Lwowskiej]</ref>.
== Mieszkańcy ==
=== Zmiany demograficzne ===
Od najdawniejszych lat Pnikut zamieszkiwali głównie [[Polacy]]. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiają się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów<ref name=":15">L. Świtalski, Kronika Pnikuta, Pnikut 25.X.1905</ref>.
Około 1800 roku wieś zamieszkują 722 osoby<ref name=":15" />. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie [[Kościół rzymskokatolicki|kościoła rzymskokatolickiego]], 17 to [[Kościoły greckokatolickie|grekokatolicy]] a 41 to zwolennicy [[Judaizm|wyznania mojżeszowego]]<ref name=":14">[http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VIII/335 Słownik Geograficzny Królestwa Polskiego, Warszawa 1880, t.VIII]</ref>. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców<ref name=":15" />. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób<ref>Rocznik Diecezji Przemyskiej, ob. Łać. 1938 Przemyśl 1938, Nakładem Kurii Biskupiej ob. łać.</ref>.
=== Rozwój oświaty i kultury ===
W osiemdziesiątych latach XIX wieku powstaje w Pnikucie pierwsza szkoła prowadzona przez Michała Skwirzyńskiego{{fakt|data=2014-02}} w jego domu, a przed 1890 rokiem, w budynku zbudowanym przez mieszkańców powstaje szkoła czteroklasowa, której kierownikiem zostaje Jan Filip<ref name=":23">Rys monograficzny dziejów wsi Pnikut w okresie 1914 - 1945, Praca zbiorowa pod redakcją F. Dorosza, Przemyśl,1986</ref>. Jeszcze przed 1900 rokiem powstało w Pnikucie koło organizacji "Sokół" a w jego ramach zespoły: teatralny, muzyczny, recytatorski i chóralny, natomiast w 1910 roku zbudowano budynek tzw. "Sokolni"<ref>S. Żółkiewicz, Rys historyczny Pnikuta (Ukraina), Przemyśl, 2009</ref>. Na terenie wsi działał Związek Katolicki do którego należało 320 mieszkańców<ref>Kronika Diecezji Przemyskiej, Przemyśl, 1914</ref>. W Pnikucie jeszcze przed I Wojną Światową istniała spółdzielnia mleczarska, kółko rolnicze, dwa sklepy, "Ochronka" dla dzieci i kasa Reiffeisena<ref>[http://jbc.bj.uj.edu.pl/dlibra/results?action=SearchAction&skipSearch=true&mdirids=1&server%3Atype=both&tempQueryType=-3&encode=false&isExpandable=on&isRemote=off&roleId=-3&queryType=-3&dirids=1&rootid=74846&query=pnikut&localQueryType=-3&remoteQueryType=-2 Przyjaciel Ludu, nr. 30, 21.07.1912]</ref>.
W 1921 roku powstaje w Pnikucie Dom Ludowy mieszczący między innymi salkę teatralną wraz z zapleczem i dwie sale wykładowe. Uroczystość otwarcia i poświęcenia domu uświetnił swą obecnością [[Marszałek Sejmu Rzeczypospolitej Polskiej|Marszałek Sejmu RP]] [[Maciej Rataj]]<ref name=":23" />. Po śmierci Jana Filipa w 1923 roku nowym kierownikiem szkoły zostaje Włodzimierz Raba, a po nim Stefania Weintraubowa. We wsi działa prowadzona przez Kazimierza Lecha biblioteka. W 1928 roku kierownikiem szkoły zostaje Kazimierz Kwiatkowski, były legionista. Pod jego kierownictwem szkoła zmienia się z czteroklasowej w siedmioklasową<ref name=":23" />.
W okresie okupacji istniała w Pnikucie szkoła w której nauczano w języku polskim, a języka niemieckiego nie uczono wcale. Po wojnie językiem nauczania stał się język ukraiński a dodatkowo nauczano języka rosyjskiego. Dzieci języka polskiego uczono w domach i na lekcjach religii w Kościele<ref name=":22">[http://www.pnikut.net/teksty/historia_miejscowosci_pnikut.pdf K. Zarański, Historia miejscowości Pnikut]</ref>.
=== Dzieje kościoła ===
[[Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg|thumb|223x223px|Kapliczka na miejscu starego kościoła]]
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|270x270px|Kościół św. Mikołaja w Pnikucie]]
Pierwsze wzmianki o kościele rzymskokatolickim w Pnikucie pochodzą z około 1385 roku<ref name=":15" />. Ponad dwieście lat później bo w roku 1611 na miejscu starego kościoła powstaje nowy. Budynek był drewniany, otoczony wałem i fosą z mostem zwodzonym i palisadą. W 1648 roku kościół wraz ze zgromadzonymi w nim ludźmi zostaje spalony przez kozaków<ref name=":15" />. W 1667 roku, na miejscu spalonego powstaje nowy kościół. Świątynia przetrwała prawie sto lat. Z polecenia biskupa Sierakowskiego i z funduszy Kapituły Przemyskiej w 1762 roku rozpoczęto budowę nowego kościoła. Po pięciu latach 27 lipca 1767 roku świątynię konsekrowano<ref name=":11">[http://www.pnikut.com/ Strona parafialna]</ref>. Kościół służył parafii do 1912 roku, po czym został rozebrany i złożony ponownie w 1929 roku, w [[Laszki Zawiązane|Laszkach Zawiązanych]]<ref name=":11" />. Po kościele pozostała kapliczka, istniejąca do dnia dzisiejszego.
Na przełomie wieków staraniem proboszcza parafii ks. L. Świtalskiego rozpoczynają się prace nad nową, murowaną świątynią dla Pnikuta. W 1901 r. powstaje projekt kościoła sporządzony przez Maksymiliana Jabłońskiego z Dobromila. W kwietniu 1908 roku rozpoczęto budowę, w październiku 1909 roku pokryto dach kościoła, a latem 1910 roku wytynkowano wnętrze. W dniu 6 grudnia 1912 r. kościół został poświęcony. Po usunięciu zniszczeń z okresu I wojny światowej w 1921 roku kościół powtórnie poświęcono<ref name=":11" />, a w 1927 r. zamontowano trzy nowe dzwony z odlewni [[Felczyńscy|Felczyńskich]] w Przemyślu<ref name=":12">N. Sarkady, Dziedzictwo w pejzaż wpisane. Opowieść o polskiej wsi Pnikut, Przemyśl 2010</ref>.
Obecnie w Pnikucie znajdują się dwie świątynie, opisywany kościół św. Mikołaja i [[cerkiew prawosławna]].
== Historia ==
Według niektórych źródeł Pnikut posiadał [[Prawo magdeburskie|magdeburskie prawa miejskie]] już w XV wieku (wcześniej niż Przemyśl)<ref>G. Rokowski, Ziemia Lwowska, OW Rewasz, Piastkw, 2005</ref>. Pierwsze pewne informacje o Pnikucie pochodzą z 1359 roku<ref name=":12" />. Kilka lat później w 1366 roku, miejscowośc Pnekolt (tak nazywał się wówczas Pnikut) nabył Piotr Radciowski<ref name=":1">Akta Grodzkie i Ziemskie, t VIII</ref>, a 8 maja 1385 roku, kolejny właściciel, Piotr Stryjski zapisał Pnekolt (Pnikut) na rzecz [[Biskupi przemyscy|biskupów przemyskich]]<ref>Akta Grodzkie i Ziemskie, t VII</ref>. W roku 1402 Kapituła Przemyska sprzedaje sołtystwo we wsi Pnikut Maciejowi, synowi krawca z Kazimierza<ref name=":1" />. Dnia 29 października 1408 roku [[Władysław II Jagiełło|Władysław Jagiełło]] uwalnia mieszkańców osiedlających się we wsi Pnikut i od wszelkich danin i ciężarów<ref name=":1" />. Pnikut wraca do Kapituły Przemyskiej w dniu 14 kwietnia 1417 roku, kupiony od "wdowy po Piotrze Fus za 212 grzywien ważnych"<ref name=":14" />. Dnia 14 czerwca 1462 r. następuje rozgraniczenie wsi Pnikut, Buchowice i Bolanowice<ref name=":14" />.
Są w Pnikucie miejsca historycznie ważne, nie tylko dla samej wsi. To tutaj miała miejsce regularna bitwa, gdy w 1672 roku podczas kolejnej wyprawy Mohamed IV w sojuszu z [[Tatarzy|Tatarami]] i Kozakami napadł na wschodnie rubieże Polski w tym ziemię przemyską. Dnia 8 października wspomnianego roku, obciążone łupami i jeńcami trzy [[Orda|ordy tatarskie]] zostały rozbite przez ochotników z [[Przemyśl]]a oraz mieszkańców Pnikuta, dowodzonych przez ks. Krystyna Szykowskiego, gwardiana o.o. Reformatów Przemyskich<ref name=":14" />. Po bitwie miejsce pochówku walecznych obrońców nazwane zostało Kalwaryjką i do dzisiaj mieszkańcy zapalają tam znicze w [[Wszystkich Świętych|Święto Zmarłych]].
W południowo - wschodniej części Pnikuta znajduje się wzniesienie do dzisiaj nazywane "Zamczyskiem". Według ludowych podań mieszkali tam dwaj strażnicy - obserwatorzy, których zadaniem było informowanie mieszkańców o zbliżającym się niebezpieczeństwie. Dziś nie wiadomo, jaki był charakter tego miejsca, czy była to wieża obronna<ref name=":15" />, czy zamek<ref>[http://www.pbc.rzeszow.pl/dlibra/docmetadata?id=4771&from=publication M. Orłowicz, Ilustrowany Przewodnik po Przemyślu i okolicy, Zjednoczenie Towarzystw Polskich, Przemyśl, 1917]</ref>.
=== I Wojna Światowa ===
Okres I Wojny Światowej to przede wszystkim olbrzymie zniszczenia, przestaje istnieć Sokolnia i mleczarnia, część gospodarstw spłonęło lub zostało rozebranych czy zburzonych. Zginęło wielu mieszkańców. Pnikuczanie walczyli na polach wielu bitew. W [[Legiony Polskie 1914-1918|Legionach]]: Walenty Miśniak (kawaler [[Order Virtuti Militari|orderu Virtuti - Militari]]), Władysław Dorosz (wielokrotnie odznaczony), Bronisław Kuśnierz, Michał Kuśnierz, Władysław Kuśnierz, Józef Żółkiewicz, Szymon Bazanowski, Bartłomiej Gawron, Błażej Dorosz, Marek Muszak, Ludwik Muszak, Ludwik Folta, Stanisław Czop, Mateusz Wiącek s. Jana, Sylwester Pawłowski, Józef Muszak. W armii Hallera służyli: Jan Miśniak, Franciszek Czerniec, Jan Czerniec, Antoni Czerniec, Fabian Paprocki, Wawrzyniec Gładysz, Jan Ździobek, Franciszek Skrabka, Antoni Dorosz<ref name=":22" />.
=== Dwudziestolecie międzywojenne ===
Po I Wojnie Światowej powstaje komórka [[Związek Strzelecki|Związku Strzeleckiego "Strzelec"]], powołana zostaje z inicjatywy mieszkańców [[Spółdzielcza kasa oszczędnościowo-kredytowa|Kasa Stefczyka]], a także tworzy się [[Ochotnicza Straż Pożarna]] pod komendą Andrzeja Piwowara. Z inicjatywy księdza Walerego Motyki, powstaje Katolicki Związek Młodzieży Żeńskiej i Męskiej ([[Akcja Katolicka w II Rzeczypospolitej|Akcja Katolicka]]). Pod przewodnictwem Walentego Miśniaka działa komórka BBWR ([[Bezpartyjny Blok Współpracy z Rządem]]). Silną organizacją jest też [[Stronnictwo Ludowe]] oraz [[Związek Młodzieży Wiejskiej|Związek Młodzieży Wiejskiej "WICI"]]<ref name=":23" />.
Pierwszego sierpnia 1934 roku na mocy ustawy<ref name=":18" /> powołano zbiorczą gminę Pnikut. W jej skład wchodzą miejscowości: [[Buchowice]], [[Chliple]], [[Czyżowice (Ukraina)|Czyżowice]], Hańkowice, [[Jatwięgi]], [[Krukienice]], [[Ostrożec (rejon mościski)|Ostrożec]], Pnikut, [[Podliski (rejon mościski)|Podliski]], [[Radenice]], [[Sudkowice]], [[Wiszenka (rejon mościski)|Wiszenka]]. W tym czasie parafia Pnikucka składała się z Pnikuta, Buchowic i Pakości. Głównym właścicielem ziemi jest Kapituła Przemyska. W okresie międzywojennym we wsi działałją dwa młyny wodne, olejarnia, trzy warsztaty tkackie, cegielnia, nowoczesna mleczarnia, trzy kuźnie, dziesięciu szewców, trzynastu krawców, trzech rymarzy, dwóch kołodziejów, przewoźnik, dwudziestu fryzjerów, ośmiu stolarzy, dziesięciu cieśli, pięciu murarzy, dwóch blacharzy i jeden studniarz<ref name=":23" />.
=== II Wojna Światowa ===
W połowie września 1939 roku do Pnikuta wkraczają Niemcy w marszu na [[Lwów]]. Po agresji [[Związek Socjalistycznych Republik Radzieckich|ZSRR]] na Polskę armia niemiecka cofa się i po raz drugi przechodzi przez wieś, a wkrótce po Niemcach przychodzą Rosjanie. W międzyczasie w Pnikucie, w drodze na [[Węgry]] stacjonuje oddział dowodzony przez gen. [[Władysław Anders|Władysława Andersa]]<ref name=":23" />. Niedaleko, pod Starym Samborem, gen. Anders zostaje dwukrotnie ranny i wzięty do niewoli (29 września).
Okres pierwszej okupacji sowieckiej to życie w strachu przed aresztowaniem i śmiercią. Antypolskie nastawienie Rosjan, denuncjacje polskich patriotów przez Żydów i nacjonalistów Ukraińskich oraz przymusowe wcielenia do Armii Radzieckiej (mężczyźni urodzeni w latach 1918 - 1921) potęgowały niepokój i niepewność jutra. Po 2 czerwca 1941 roku (atak Niemiec na ZSRR) wojska Wermachtu po raz kolejny przechodzą przez Pnikut. W okresie okupacji niemieckiej na terenie wsi odbudowuje się konspiracyjny ruch oporu.
W Pnikucie oprócz Niemców działała również Granatowa Policja rekrutowana głównie ze współpracujących z okupantem Ukraińców z Buchowic. W tym okresie Niemcy tolerowali działalność UPA i innych ukraińskich ruchów nacjonalistycznych. Polacy organizują samoobronę. Budowane są miejsca ukrycia (zamaskowane schrony), a mężczyźni uzbrojeni w widły i kosy, ale również w broń palną informowani są o zagrożeniu biciem kościelnych dzwonów<ref name=":22" />.
Na przełomie 1943 i 1944 roku do Pnikuta przybywają oddziały [[Armia Krajowa|Armii Krajowej]] które początkowo ukrywają się u mieszkańców a następnie w podpnikuckim lesie. Wielu mieszkańców przyłącza się do partyzantów, praktycznie cała wieś zaopatruje ich w żywność. W obawie przed kontrolą wiezione na wozie jedzenie ukrywano w sianie a woźnicami byli młodzi chłopcy, dzieci by nie wzbudzać podejrzeń. Okres ten to czas względnego spokoju ze strony banderowców, którzy obawiali się polskich partyzantów<ref name=":22" />.
Podczas II Wojny Światowej zginęło ponad 40 mieszkańców wsi, 27 zostało aresztowanych przez Gestapo, a 86 wywieziono na roboty do Niemiec z których większość wróciła po wojnie do rodzinnych domów<ref name=":22" />. Pnikuczanie walczyli pod Monte Cassino i w wielu innych bitwach pod dowództwem między innymi gen. Andersa. Wielu powołano w szeregi Ludowego Wojska Polskiego do I i II Armii<ref name=":23" />.
=== Okres powojenny ===
Po II Wojnie Światowej, Pnikut na mocy ustaleń w Jałcie znalazł się w granicach Związku Radzieckiego. Wielu wierzyło, że to okres przejściowy i wkrótce wszystko wróci do stanu sprzed wojny. I fala repatriacji to lata 1945 - 1947. Polacy jechali w nieznane, zostawiając wszystko, co było dla nich cenne i ważne.
Bardzo długo Pnikut opierał się kolektywizacji i prawdopodobnie był ostatnią wsią w okręgu, jaka przystąpiła do [[Kołchoz|kołchozu]].
W latach 1956 - 1958 miała miejsce druga fala repatriacji. Ludzie stracili nadzieję, że Pnikut wróci w granice Polski. Ogółem po wojnie wyjechało z Pnikuta 420 polskich rodzin, a ponad 90 rodzin zostało<ref name=":22" />.
Gdy w 1945 roku wieloletni proboszcz ks. Tomasz Szurek musiał opuścić parafię, na jego miejsce przybył [[Jerzy Ablewicz|ks. Jerzy Ablewicz]]. Po jego wyjeździe w 1946 roku władze nie wydały zezwolenia na pracę innego kapłana w Pnikuckiej parafii. Mieszkańcy jednak nigdy nie oddali kluczy od kościoła i choć wieś obciążono wysokimi podatkami, świątynia pozostała w dyspozycji parafian. Po wieloletnich zabiegach ze strony mieszkańców, dopiero w 1987 roku władza oficjalnie zezwoliła na odprawianie nabożeństw w kościele. Był to pierwszy taki przypadek w całym ZSRR.
O ile krótko po wojnie zdarzały się rozboje i napady rabunkowe, zarówno banderowców jak i zwykłych bandytów, o tyle lata późniejsze to okres stosunkowo spokojnej koegzystencji Polaków i Ukraińców, których było we wsi coraz więcej.
W 1986 roku, pomiędzy 19 a 21 września miał miejsce Pierwszy Zjazd Pnikuczan, a w 1991 roku powstał we wsi Oddział Towarzystwa Kultury Polskiej Ziemi Lwowskiej.
Po rozpadzie ZSRR Pnikut jest częścią Ukrainy. Dnia 9 sierpnia 2009 roku obchodzono uroczyście 650 lecie powstania miejscowości.
{{Przypisy}}
== Linki zewnętrzne ==
* {{SgKP|VII|335|Pnikut}}
* [http://www.pnikut.net Pnikut.net], serwis mieszkańców dawnego Pnikuta
* [http://www.pnikut.com/ Strona parafialna]
{{Rejon mościski}}
[[Kategoria:Wsie obwodu lwowskiego]]
[[Kategoria:Rejon mościski]]
cc6e3824292b31496d7b0c21468acdf9da8d0ded
379
2014-02-08T21:09:27Z
Ffkapa
2
Utworzono nową stronę "{{Miejscowość infobox |nazwa = Pnikut |nazwa oryginalna = |zdjęcie = |opis zdjęcia = ..."
wikitext
text/x-wiki
{{Miejscowość infobox
|nazwa = Pnikut
|nazwa oryginalna =
|zdjęcie =
|opis zdjęcia =
|herb =
|flaga =
|dopełniacz nazwy = Pnikuta
|państwo = UKR
|1. jednostka administracyjna = [[Plik:Flag of Lviv Oblast.png|20px]] [[Obwód lwowski|lwowski]]
|2. jednostka administracyjna = [[rejon mościski|mościski]]
|powierzchnia =
|wysokość =
|rok = 2001
|liczba ludności = 1101
|gęstość zaludnienia =
|numer kierunkowy =
|kod pocztowy =
|tablice rejestracyjne =
|stopniN = 49 |minutN = 42 |sekundN = 25
|stopniE = 23 |minutE = 8 |sekundE = 23
|commons =
|www = http://www.pnikut.net
|kod mapy = obwód lwowski
}}
'''Pnikut''' (ukr. ''Пнікут'') – wieś na [[Ukraina|Ukrainie]], w [[rejon mościski|rejonie mościskim]] [[obwód lwowski|obwodu lwowskiego]]. Wieś liczy 1101 mieszkańców.
Założony w [[1359]] r. W [[II Rzeczpospolita|II Rzeczypospolitej]] do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej [[gmina Pnikut|gminy Pnikut]] w [[Powiat mościski|powiecie mościskim]] w [[województwo lwowskie|woj. lwowskim]]<ref name=":18">{{Dziennik Ustaw|rok=1934|numer=64|pozycja=547}}</ref>. Po wojnie odłączona od Polski i włączona do [[Ukraińska Socjalistyczna Republika Radziecka|Ukraińskiej SRR]].
We wsi działa oddział [[Towarzystwo Kultury Polskiej Ziemi Lwowskiej|Towarzystwa Kultury Polskiej Ziemi Lwowskiej]]<ref>[http://tkpzl.lviv.ua/pl/pages/21/ Towarzystwo Kultury Polskiej Ziemi Lwowskiej]</ref>.
== Mieszkańcy ==
=== Zmiany demograficzne ===
Od najdawniejszych lat Pnikut zamieszkiwali głównie [[Polacy]]. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiają się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów<ref name=":15">L. Świtalski, Kronika Pnikuta, Pnikut 25.X.1905</ref>.
Około 1800 roku wieś zamieszkują 722 osoby<ref name=":15" />. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie [[Kościół rzymskokatolicki|kościoła rzymskokatolickiego]], 17 to [[Kościoły greckokatolickie|grekokatolicy]] a 41 to zwolennicy [[Judaizm|wyznania mojżeszowego]]<ref name=":14">[http://dir.icm.edu.pl/pl/Slownik_geograficzny/Tom_VIII/335 Słownik Geograficzny Królestwa Polskiego, Warszawa 1880, t.VIII]</ref>. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców<ref name=":15" />. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób<ref>Rocznik Diecezji Przemyskiej, ob. Łać. 1938 Przemyśl 1938, Nakładem Kurii Biskupiej ob. łać.</ref>.
=== Rozwój oświaty i kultury ===
W osiemdziesiątych latach XIX wieku powstaje w Pnikucie pierwsza szkoła prowadzona przez Michała Skwirzyńskiego{{fakt|data=2014-02}} w jego domu, a przed 1890 rokiem, w budynku zbudowanym przez mieszkańców powstaje szkoła czteroklasowa, której kierownikiem zostaje Jan Filip<ref name=":23">Rys monograficzny dziejów wsi Pnikut w okresie 1914 - 1945, Praca zbiorowa pod redakcją F. Dorosza, Przemyśl,1986</ref>. Jeszcze przed 1900 rokiem powstało w Pnikucie koło organizacji "Sokół" a w jego ramach zespoły: teatralny, muzyczny, recytatorski i chóralny, natomiast w 1910 roku zbudowano budynek tzw. "Sokolni"<ref>S. Żółkiewicz, Rys historyczny Pnikuta (Ukraina), Przemyśl, 2009</ref>. Na terenie wsi działał Związek Katolicki do którego należało 320 mieszkańców<ref>Kronika Diecezji Przemyskiej, Przemyśl, 1914</ref>. W Pnikucie jeszcze przed I Wojną Światową istniała spółdzielnia mleczarska, kółko rolnicze, dwa sklepy, "Ochronka" dla dzieci i kasa Reiffeisena<ref>[http://jbc.bj.uj.edu.pl/dlibra/results?action=SearchAction&skipSearch=true&mdirids=1&server%3Atype=both&tempQueryType=-3&encode=false&isExpandable=on&isRemote=off&roleId=-3&queryType=-3&dirids=1&rootid=74846&query=pnikut&localQueryType=-3&remoteQueryType=-2 Przyjaciel Ludu, nr. 30, 21.07.1912]</ref>.
W 1921 roku powstaje w Pnikucie Dom Ludowy mieszczący między innymi salkę teatralną wraz z zapleczem i dwie sale wykładowe. Uroczystość otwarcia i poświęcenia domu uświetnił swą obecnością [[Marszałek Sejmu Rzeczypospolitej Polskiej|Marszałek Sejmu RP]] [[Maciej Rataj]]<ref name=":23" />. Po śmierci Jana Filipa w 1923 roku nowym kierownikiem szkoły zostaje Włodzimierz Raba, a po nim Stefania Weintraubowa. We wsi działa prowadzona przez Kazimierza Lecha biblioteka. W 1928 roku kierownikiem szkoły zostaje Kazimierz Kwiatkowski, były legionista. Pod jego kierownictwem szkoła zmienia się z czteroklasowej w siedmioklasową<ref name=":23" />.
W okresie okupacji istniała w Pnikucie szkoła w której nauczano w języku polskim, a języka niemieckiego nie uczono wcale. Po wojnie językiem nauczania stał się język ukraiński a dodatkowo nauczano języka rosyjskiego. Dzieci języka polskiego uczono w domach i na lekcjach religii w Kościele<ref name=":22">[http://www.pnikut.net/teksty/historia_miejscowosci_pnikut.pdf K. Zarański, Historia miejscowości Pnikut]</ref>.
=== Dzieje kościoła ===
[[Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg|thumb|223x223px|Kapliczka na miejscu starego kościoła]]
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|270x270px|Kościół św. Mikołaja w Pnikucie]]
Pierwsze wzmianki o kościele rzymskokatolickim w Pnikucie pochodzą z około 1385 roku<ref name=":15" />. Ponad dwieście lat później bo w roku 1611 na miejscu starego kościoła powstaje nowy. Budynek był drewniany, otoczony wałem i fosą z mostem zwodzonym i palisadą. W 1648 roku kościół wraz ze zgromadzonymi w nim ludźmi zostaje spalony przez kozaków<ref name=":15" />. W 1667 roku, na miejscu spalonego powstaje nowy kościół. Świątynia przetrwała prawie sto lat. Z polecenia biskupa Sierakowskiego i z funduszy Kapituły Przemyskiej w 1762 roku rozpoczęto budowę nowego kościoła. Po pięciu latach 27 lipca 1767 roku świątynię konsekrowano<ref name=":11">[http://www.pnikut.com/ Strona parafialna]</ref>. Kościół służył parafii do 1912 roku, po czym został rozebrany i złożony ponownie w 1929 roku, w [[Laszki Zawiązane|Laszkach Zawiązanych]]<ref name=":11" />. Po kościele pozostała kapliczka, istniejąca do dnia dzisiejszego.
Na przełomie wieków staraniem proboszcza parafii ks. L. Świtalskiego rozpoczynają się prace nad nową, murowaną świątynią dla Pnikuta. W 1901 r. powstaje projekt kościoła sporządzony przez Maksymiliana Jabłońskiego z Dobromila. W kwietniu 1908 roku rozpoczęto budowę, w październiku 1909 roku pokryto dach kościoła, a latem 1910 roku wytynkowano wnętrze. W dniu 6 grudnia 1912 r. kościół został poświęcony. Po usunięciu zniszczeń z okresu I wojny światowej w 1921 roku kościół powtórnie poświęcono<ref name=":11" />, a w 1927 r. zamontowano trzy nowe dzwony z odlewni [[Felczyńscy|Felczyńskich]] w Przemyślu<ref name=":12">N. Sarkady, Dziedzictwo w pejzaż wpisane. Opowieść o polskiej wsi Pnikut, Przemyśl 2010</ref>.
Obecnie w Pnikucie znajdują się dwie świątynie, opisywany kościół św. Mikołaja i [[cerkiew prawosławna]].
== Historia ==
Według niektórych źródeł Pnikut posiadał [[Prawo magdeburskie|magdeburskie prawa miejskie]] już w XV wieku (wcześniej niż Przemyśl)<ref>G. Rokowski, Ziemia Lwowska, OW Rewasz, Piastkw, 2005</ref>. Pierwsze pewne informacje o Pnikucie pochodzą z 1359 roku<ref name=":12" />. Kilka lat później w 1366 roku, miejscowośc Pnekolt (tak nazywał się wówczas Pnikut) nabył Piotr Radciowski<ref name=":1">Akta Grodzkie i Ziemskie, t VIII</ref>, a 8 maja 1385 roku, kolejny właściciel, Piotr Stryjski zapisał Pnekolt (Pnikut) na rzecz [[Biskupi przemyscy|biskupów przemyskich]]<ref>Akta Grodzkie i Ziemskie, t VII</ref>. W roku 1402 Kapituła Przemyska sprzedaje sołtystwo we wsi Pnikut Maciejowi, synowi krawca z Kazimierza<ref name=":1" />. Dnia 29 października 1408 roku [[Władysław II Jagiełło|Władysław Jagiełło]] uwalnia mieszkańców osiedlających się we wsi Pnikut i od wszelkich danin i ciężarów<ref name=":1" />. Pnikut wraca do Kapituły Przemyskiej w dniu 14 kwietnia 1417 roku, kupiony od "wdowy po Piotrze Fus za 212 grzywien ważnych"<ref name=":14" />. Dnia 14 czerwca 1462 r. następuje rozgraniczenie wsi Pnikut, Buchowice i Bolanowice<ref name=":14" />.
Są w Pnikucie miejsca historycznie ważne, nie tylko dla samej wsi. To tutaj miała miejsce regularna bitwa, gdy w 1672 roku podczas kolejnej wyprawy Mohamed IV w sojuszu z [[Tatarzy|Tatarami]] i Kozakami napadł na wschodnie rubieże Polski w tym ziemię przemyską. Dnia 8 października wspomnianego roku, obciążone łupami i jeńcami trzy [[Orda|ordy tatarskie]] zostały rozbite przez ochotników z [[Przemyśl]]a oraz mieszkańców Pnikuta, dowodzonych przez ks. Krystyna Szykowskiego, gwardiana o.o. Reformatów Przemyskich<ref name=":14" />. Po bitwie miejsce pochówku walecznych obrońców nazwane zostało Kalwaryjką i do dzisiaj mieszkańcy zapalają tam znicze w [[Wszystkich Świętych|Święto Zmarłych]].
W południowo - wschodniej części Pnikuta znajduje się wzniesienie do dzisiaj nazywane "Zamczyskiem". Według ludowych podań mieszkali tam dwaj strażnicy - obserwatorzy, których zadaniem było informowanie mieszkańców o zbliżającym się niebezpieczeństwie. Dziś nie wiadomo, jaki był charakter tego miejsca, czy była to wieża obronna<ref name=":15" />, czy zamek<ref>[http://www.pbc.rzeszow.pl/dlibra/docmetadata?id=4771&from=publication M. Orłowicz, Ilustrowany Przewodnik po Przemyślu i okolicy, Zjednoczenie Towarzystw Polskich, Przemyśl, 1917]</ref>.
=== I Wojna Światowa ===
Okres I Wojny Światowej to przede wszystkim olbrzymie zniszczenia, przestaje istnieć Sokolnia i mleczarnia, część gospodarstw spłonęło lub zostało rozebranych czy zburzonych. Zginęło wielu mieszkańców. Pnikuczanie walczyli na polach wielu bitew. W [[Legiony Polskie 1914-1918|Legionach]]: Walenty Miśniak (kawaler [[Order Virtuti Militari|orderu Virtuti - Militari]]), Władysław Dorosz (wielokrotnie odznaczony), Bronisław Kuśnierz, Michał Kuśnierz, Władysław Kuśnierz, Józef Żółkiewicz, Szymon Bazanowski, Bartłomiej Gawron, Błażej Dorosz, Marek Muszak, Ludwik Muszak, Ludwik Folta, Stanisław Czop, Mateusz Wiącek s. Jana, Sylwester Pawłowski, Józef Muszak. W armii Hallera służyli: Jan Miśniak, Franciszek Czerniec, Jan Czerniec, Antoni Czerniec, Fabian Paprocki, Wawrzyniec Gładysz, Jan Ździobek, Franciszek Skrabka, Antoni Dorosz<ref name=":22" />.
=== Dwudziestolecie międzywojenne ===
Po I Wojnie Światowej powstaje komórka [[Związek Strzelecki|Związku Strzeleckiego "Strzelec"]], powołana zostaje z inicjatywy mieszkańców [[Spółdzielcza kasa oszczędnościowo-kredytowa|Kasa Stefczyka]], a także tworzy się [[Ochotnicza Straż Pożarna]] pod komendą Andrzeja Piwowara. Z inicjatywy księdza Walerego Motyki, powstaje Katolicki Związek Młodzieży Żeńskiej i Męskiej ([[Akcja Katolicka w II Rzeczypospolitej|Akcja Katolicka]]). Pod przewodnictwem Walentego Miśniaka działa komórka BBWR ([[Bezpartyjny Blok Współpracy z Rządem]]). Silną organizacją jest też [[Stronnictwo Ludowe]] oraz [[Związek Młodzieży Wiejskiej|Związek Młodzieży Wiejskiej "WICI"]]<ref name=":23" />.
Pierwszego sierpnia 1934 roku na mocy ustawy<ref name=":18" /> powołano zbiorczą gminę Pnikut. W jej skład wchodzą miejscowości: [[Buchowice]], [[Chliple]], [[Czyżowice (Ukraina)|Czyżowice]], Hańkowice, [[Jatwięgi]], [[Krukienice]], [[Ostrożec (rejon mościski)|Ostrożec]], Pnikut, [[Podliski (rejon mościski)|Podliski]], [[Radenice]], [[Sudkowice]], [[Wiszenka (rejon mościski)|Wiszenka]]. W tym czasie parafia Pnikucka składała się z Pnikuta, Buchowic i Pakości. Głównym właścicielem ziemi jest Kapituła Przemyska. W okresie międzywojennym we wsi działałją dwa młyny wodne, olejarnia, trzy warsztaty tkackie, cegielnia, nowoczesna mleczarnia, trzy kuźnie, dziesięciu szewców, trzynastu krawców, trzech rymarzy, dwóch kołodziejów, przewoźnik, dwudziestu fryzjerów, ośmiu stolarzy, dziesięciu cieśli, pięciu murarzy, dwóch blacharzy i jeden studniarz<ref name=":23" />.
=== II Wojna Światowa ===
W połowie września 1939 roku do Pnikuta wkraczają Niemcy w marszu na [[Lwów]]. Po agresji [[Związek Socjalistycznych Republik Radzieckich|ZSRR]] na Polskę armia niemiecka cofa się i po raz drugi przechodzi przez wieś, a wkrótce po Niemcach przychodzą Rosjanie. W międzyczasie w Pnikucie, w drodze na [[Węgry]] stacjonuje oddział dowodzony przez gen. [[Władysław Anders|Władysława Andersa]]<ref name=":23" />. Niedaleko, pod Starym Samborem, gen. Anders zostaje dwukrotnie ranny i wzięty do niewoli (29 września).
Okres pierwszej okupacji sowieckiej to życie w strachu przed aresztowaniem i śmiercią. Antypolskie nastawienie Rosjan, denuncjacje polskich patriotów przez Żydów i nacjonalistów Ukraińskich oraz przymusowe wcielenia do Armii Radzieckiej (mężczyźni urodzeni w latach 1918 - 1921) potęgowały niepokój i niepewność jutra. Po 2 czerwca 1941 roku (atak Niemiec na ZSRR) wojska Wermachtu po raz kolejny przechodzą przez Pnikut. W okresie okupacji niemieckiej na terenie wsi odbudowuje się konspiracyjny ruch oporu.
W Pnikucie oprócz Niemców działała również Granatowa Policja rekrutowana głównie ze współpracujących z okupantem Ukraińców z Buchowic. W tym okresie Niemcy tolerowali działalność UPA i innych ukraińskich ruchów nacjonalistycznych. Polacy organizują samoobronę. Budowane są miejsca ukrycia (zamaskowane schrony), a mężczyźni uzbrojeni w widły i kosy, ale również w broń palną informowani są o zagrożeniu biciem kościelnych dzwonów<ref name=":22" />.
Na przełomie 1943 i 1944 roku do Pnikuta przybywają oddziały [[Armia Krajowa|Armii Krajowej]] które początkowo ukrywają się u mieszkańców a następnie w podpnikuckim lesie. Wielu mieszkańców przyłącza się do partyzantów, praktycznie cała wieś zaopatruje ich w żywność. W obawie przed kontrolą wiezione na wozie jedzenie ukrywano w sianie a woźnicami byli młodzi chłopcy, dzieci by nie wzbudzać podejrzeń. Okres ten to czas względnego spokoju ze strony banderowców, którzy obawiali się polskich partyzantów<ref name=":22" />.
Podczas II Wojny Światowej zginęło ponad 40 mieszkańców wsi, 27 zostało aresztowanych przez Gestapo, a 86 wywieziono na roboty do Niemiec z których większość wróciła po wojnie do rodzinnych domów<ref name=":22" />. Pnikuczanie walczyli pod Monte Cassino i w wielu innych bitwach pod dowództwem między innymi gen. Andersa. Wielu powołano w szeregi Ludowego Wojska Polskiego do I i II Armii<ref name=":23" />.
=== Okres powojenny ===
Po II Wojnie Światowej, Pnikut na mocy ustaleń w Jałcie znalazł się w granicach Związku Radzieckiego. Wielu wierzyło, że to okres przejściowy i wkrótce wszystko wróci do stanu sprzed wojny. I fala repatriacji to lata 1945 - 1947. Polacy jechali w nieznane, zostawiając wszystko, co było dla nich cenne i ważne.
Bardzo długo Pnikut opierał się kolektywizacji i prawdopodobnie był ostatnią wsią w okręgu, jaka przystąpiła do [[Kołchoz|kołchozu]].
W latach 1956 - 1958 miała miejsce druga fala repatriacji. Ludzie stracili nadzieję, że Pnikut wróci w granice Polski. Ogółem po wojnie wyjechało z Pnikuta 420 polskich rodzin, a ponad 90 rodzin zostało<ref name=":22" />.
Gdy w 1945 roku wieloletni proboszcz ks. Tomasz Szurek musiał opuścić parafię, na jego miejsce przybył [[Jerzy Ablewicz|ks. Jerzy Ablewicz]]. Po jego wyjeździe w 1946 roku władze nie wydały zezwolenia na pracę innego kapłana w Pnikuckiej parafii. Mieszkańcy jednak nigdy nie oddali kluczy od kościoła i choć wieś obciążono wysokimi podatkami, świątynia pozostała w dyspozycji parafian. Po wieloletnich zabiegach ze strony mieszkańców, dopiero w 1987 roku władza oficjalnie zezwoliła na odprawianie nabożeństw w kościele. Był to pierwszy taki przypadek w całym ZSRR.
O ile krótko po wojnie zdarzały się rozboje i napady rabunkowe, zarówno banderowców jak i zwykłych bandytów, o tyle lata późniejsze to okres stosunkowo spokojnej koegzystencji Polaków i Ukraińców, których było we wsi coraz więcej.
W 1986 roku, pomiędzy 19 a 21 września miał miejsce Pierwszy Zjazd Pnikuczan, a w 1991 roku powstał we wsi Oddział Towarzystwa Kultury Polskiej Ziemi Lwowskiej.
Po rozpadzie ZSRR Pnikut jest częścią Ukrainy. Dnia 9 sierpnia 2009 roku obchodzono uroczyście 650 lecie powstania miejscowości.
{{Przypisy}}
== Linki zewnętrzne ==
* {{SgKP|VII|335|Pnikut}}
* [http://www.pnikut.net Pnikut.net], serwis mieszkańców dawnego Pnikuta
* [http://www.pnikut.com/ Strona parafialna]
{{Rejon mościski}}
[[Kategoria:Wsie obwodu lwowskiego]]
[[Kategoria:Rejon mościski]]
f3803a0dd7c257252da7fcf954041030d3a42dac
Stanisław Pietruszczak
0
592
1093
1085
2019-11-16T21:13:22Z
Ffkapa
2
wikitext
text/x-wiki
'''Stanisław Pietruszczak''' - [[Mapa dawnego Pnikuta|dom numer 1]].
== Rodzina ==
Pietruszczak Stanisław (1906), żona Zofia (1911) - córka Michała Kosowskiego i Marii z domu Paprocka.
== Dzieci ==
Janina (1938), Stanisław (1946)
== Dzieje rodziny ==
* Stanisław i jego brat Franciszek mieszkający w tym samym domu zostali aresztowani w lutym 1946r. przez NKWD. Podejrzani o udział w partyzantce w lasach pnikuckich, w śledztwie mocno pobici i poddani torturom stosowanym w ruskich więzieniach, zostali po 2 tygodniach zwolnieni do domu. Nie odzyskali zdrowia i Franciszek zmarł po 9 miesiącach a Stanisław po roku w 1947 r.
* Zofia z dziećmi Janiną i Stanisławem wyjechali w 1959r. do Polski w okolice Golubia Dobrzynia na Pomorzu.
* Janina wyszła za mąż za Henryka Janiszewskiego, mają córkę Jolantę, która jest mężatką, ma syna Jakuba.
* Stanisław brat Janiny skończył studia w Bydgoszczy. Tam też zamieszkał, założył rodzinę, zmarł nagle 7.01.2005 r., pozostawił syna Michała Pietruszczaka.
* W tym samym domu (Nr.1), mieszkał brat Stanisława, Franciszek (1887) i żona Magdalena (1900) córka Michała Kosowskiego i Marii z domu Paprocka, czyli Magdalena i Zofia były siostrami i wyszły za mąż za Pietruszczaków, Magdalena za Franciszka, a Zofia za Stanisława. Rodzicami Franciszka i Stanisława byli Piotr Pietruszczak i Maria z domu??
* Eugeniusz (1925) syn Franciszka i Magdaleny przypuszczalnie poszedł w 1944 r. z oddziałem partyzanckim na zachód za San k. Rudnika. Następnie został pobrany do Wojska Polskiego. Po zakończeniu wojny w 1945 r. pozostał w Polsce, zamieszkał w miejscowości Zagnańsk koło Kielc, ożenił się z Ireną i mieli syna Andrzeja. W roku 1955 Eugeniusz sprowadził do Polski swoją matkę Magdalenę, która po jakimś czasie zamieszkała u swojej siostry Zofii w Golubiu.
* Żona Franciszka Pietruszczaka Magdalena i żona Stanisława Pietruszczaka Zofia były siostrami, córkami Michała Kosowskiego i Marii z d. Paprocka, dom ich w Pnikucie stał po drugiej stronie rzeki Siecznej za błoniem nad potokiem w grupie domów zwanej ''Dziekanówką'' w sąsiedztwie Wiącków.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Pietruszczakowie]]
[[Kategoria:Urodzeni w 1906]]
[[Kategoria:Zmarli w 1947]]
a1edd60ec10e9aaf77fa64df2aaf44b534541330
1085
1078
2019-11-16T20:20:56Z
Ffkapa
2
removed [[Category:Ludzie związani z Pnikutem]]; added [[Category:Pietruszczakowie]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
'''Stanisław Pietruszczak''' - [[Mapa dawnego Pnikuta|dom numer 1]].
== Rodzina ==
Pietruszczak Stanisław (1906), żona Zofia (1911) - córka Michała Kosowskiego i Marii z domu Paprocka.
== Dzieci ==
Janina (1938), Stanisław (1946)
== Dzieje rodziny ==
Stanisław i jego brat Franciszek mieszkający w tym samym domu zostali aresztowani w lutym 1946r. przez NKWD. Podejrzani o udział w partyzantce w lasach pnikuckich, w śledztwie mocno pobici i poddani torturom stosowanym w ruskich więzieniach, zostali po 2 tygodniach zwolnieni do domu. Nie odzyskali zdrowia i Franciszek zmarł po 9 miesiącach a Stanisław po roku w 1947 r.
Zofia z dziećmi Janiną i Stanisławem wyjechali w 1959r. do Polski w okolice Golubia Dobrzynia na Pomorzu.
Janina wyszła za mąż za Henryka Janiszewskiego, mają córkę Jolantę, która jest mężatką, ma syna Jakuba.
Stanisław brat Janiny skończył studia w Bydgoszczy. Tam też zamieszkał, założył rodzinę, zmarł nagle 7.01.2005 r., pozostawił syna Michała Pietruszczaka.
W tym samym domu (Nr.1), mieszkał brat Stanisława, Franciszek (1887) i żona Magdalena (1900) córka Michała Kosowskiego i Marii z d, Paprocka, czyli Magdalena i Zofia były siostrami i wyszły za mąż za Pietruszczaków, Magdalena za Franciszka, a Zofia za Stanisława. Rodzicami Franciszka i Stanisława byli Piotr Pietruszczak i Maria z domu ??
Eugeniusz (1925) syn Franciszka i Magdaleny przypuszczalnie poszedł w 1944 r. z oddziałem partyzanckim na zachód za San k. Rudnika. Następnie został pobrany do Wojska Polskiego. Po zakończeniu wojny w 1945 r. pozostał w Polsce, zamieszkał w miejscowości Zagnańsk koło Kielc, ożenił się z Ireną i mieli syna Andrzeja. W roku 1955 Eugeniusz sprowadził do Polski swoją matkę Magdalenę, która po jakimś czasie zamieszkała u swojej siostry Zofii w Golubiu.
Żona Franciszka Pietruszczaka Magdalena i żona Stanisława Pietruszczaka Zofia były siostrami, córkami Michała Kosowskiego i Marii z d. Paprocka, dom ich w Pnikucie stał po drugiej stronie rzeki Siecznej za błoniem nad potokiem w grupie domów zwanej ''Dziekanówką'' w sąsiedztwie Wiącków.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Pietruszczakowie]]
[[Kategoria:Urodzeni w 1906]]
[[Kategoria:Zmarli w 1947]]
0cc439bf9fc65a55e0f7b3b32607e0c9a52fb3ab
1078
1076
2019-10-31T22:47:40Z
Ffkapa
2
wikitext
text/x-wiki
'''Stanisław Pietruszczak''' - [[Mapa dawnego Pnikuta|dom numer 1]].
== Rodzina ==
Pietruszczak Stanisław (1906), żona Zofia (1911) - córka Michała Kosowskiego i Marii z domu Paprocka.
== Dzieci ==
Janina (1938), Stanisław (1946)
== Dzieje rodziny ==
Stanisław i jego brat Franciszek mieszkający w tym samym domu zostali aresztowani w lutym 1946r. przez NKWD. Podejrzani o udział w partyzantce w lasach pnikuckich, w śledztwie mocno pobici i poddani torturom stosowanym w ruskich więzieniach, zostali po 2 tygodniach zwolnieni do domu. Nie odzyskali zdrowia i Franciszek zmarł po 9 miesiącach a Stanisław po roku w 1947 r.
Zofia z dziećmi Janiną i Stanisławem wyjechali w 1959r. do Polski w okolice Golubia Dobrzynia na Pomorzu.
Janina wyszła za mąż za Henryka Janiszewskiego, mają córkę Jolantę, która jest mężatką, ma syna Jakuba.
Stanisław brat Janiny skończył studia w Bydgoszczy. Tam też zamieszkał, założył rodzinę, zmarł nagle 7.01.2005 r., pozostawił syna Michała Pietruszczaka.
W tym samym domu (Nr.1), mieszkał brat Stanisława, Franciszek (1887) i żona Magdalena (1900) córka Michała Kosowskiego i Marii z d, Paprocka, czyli Magdalena i Zofia były siostrami i wyszły za mąż za Pietruszczaków, Magdalena za Franciszka, a Zofia za Stanisława. Rodzicami Franciszka i Stanisława byli Piotr Pietruszczak i Maria z domu ??
Eugeniusz (1925) syn Franciszka i Magdaleny przypuszczalnie poszedł w 1944 r. z oddziałem partyzanckim na zachód za San k. Rudnika. Następnie został pobrany do Wojska Polskiego. Po zakończeniu wojny w 1945 r. pozostał w Polsce, zamieszkał w miejscowości Zagnańsk koło Kielc, ożenił się z Ireną i mieli syna Andrzeja. W roku 1955 Eugeniusz sprowadził do Polski swoją matkę Magdalenę, która po jakimś czasie zamieszkała u swojej siostry Zofii w Golubiu.
Żona Franciszka Pietruszczaka Magdalena i żona Stanisława Pietruszczaka Zofia były siostrami, córkami Michała Kosowskiego i Marii z d. Paprocka, dom ich w Pnikucie stał po drugiej stronie rzeki Siecznej za błoniem nad potokiem w grupie domów zwanej ''Dziekanówką'' w sąsiedztwie Wiącków.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Ludzie związani z Pnikutem]]
[[Kategoria:Urodzeni w 1906]]
[[Kategoria:Zmarli w 1947]]
78c1f82486ad7eb5666137ed968d88e071bee908
1076
1075
2019-10-31T22:42:25Z
Ffkapa
2
wikitext
text/x-wiki
'''Stanisław Pietruszczak''' - dom numer 1
== Rodzina ==
Pietruszczak Stanisław (1906), żona Zofia (1911) - córka Michała Kosowskiego i Marii z domu Paprocka.
== Dzieci ==
Janina (1938), Stanisław (1946)
== Dzieje rodziny ==
Stanisław i jego brat Franciszek mieszkający w tym samym domu zostali aresztowani w lutym 1946r. przez NKWD. Podejrzani o udział w partyzantce w lasach pnikuckich, w śledztwie mocno pobici i poddani torturom stosowanym w ruskich więzieniach, zostali po 2 tygodniach zwolnieni do domu. Nie odzyskali zdrowia i Franciszek zmarł po 9 miesiącach a Stanisław po roku w 1947 r.
Zofia z dziećmi Janiną i Stanisławem wyjechali w 1959r. do Polski w okolice Golubia Dobrzynia na Pomorzu.
Janina wyszła za mąż za Henryka Janiszewskiego, mają córkę Jolantę, która jest mężatką, ma syna Jakuba.
Stanisław brat Janiny skończył studia w Bydgoszczy. Tam też zamieszkał, założył rodzinę, zmarł nagle 7.01.2005 r., pozostawił syna Michała Pietruszczaka.
W tym samym domu (Nr.1), mieszkał brat Stanisława, Franciszek (1887) i żona Magdalena (1900) córka Michała Kosowskiego i Marii z d, Paprocka, czyli Magdalena i Zofia były siostrami i wyszły za mąż za Pietruszczaków, Magdalena za Franciszka, a Zofia za Stanisława. Rodzicami Franciszka i Stanisława byli Piotr Pietruszczak i Maria z domu ??
Eugeniusz (1925) syn Franciszka i Magdaleny przypuszczalnie poszedł w 1944 r. z oddziałem partyzanckim na zachód za San k. Rudnika. Następnie został pobrany do Wojska Polskiego. Po zakończeniu wojny w 1945 r. pozostał w Polsce, zamieszkał w miejscowości Zagnańsk koło Kielc, ożenił się z Ireną i mieli syna Andrzeja. W roku 1955 Eugeniusz sprowadził do Polski swoją matkę Magdalenę, która po jakimś czasie zamieszkała u swojej siostry Zofii w Golubiu.
Żona Franciszka Pietruszczaka Magdalena i żona Stanisława Pietruszczaka Zofia były siostrami, córkami Michała Kosowskiego i Marii z d. Paprocka, dom ich w Pnikucie stał po drugiej stronie rzeki Siecznej za błoniem nad potokiem w grupie domów zwanej ''Dziekanówką'' w sąsiedztwie Wiącków.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Ludzie związani z Pnikutem]]
[[Kategoria:Urodzeni w 1906]]
[[Kategoria:Zmarli w 1947]]
fc1c66d01903678047ff041051e4644dc3f65bec
1075
1072
2019-10-31T22:40:10Z
Ffkapa
2
wikitext
text/x-wiki
'''Stanisław Pietruszczak''' - dom numer 1
== Rodzina ==
Pietruszczak Stanisław (1906), żona Zofia (1911) - córka Michała Kosowskiego i Marii z domu Paprocka.
== Dzieci ==
Janina (1938), Stanisław (1946)
== Dzieje rodziny ==
Stanisław i jego brat Franciszek mieszkający w tym samym domu zostali aresztowani w lutym 1946r. przez NKWD. Podejrzani o udział w partyzantce w lasach pnikuckich, w śledztwie mocno pobici i poddani torturom stosowanym w ruskich więzieniach, zostali po 2 tygodniach zwolnieni do domu. Nie odzyskali zdrowia i Franciszek zmarł po 9 miesiącach a Stanisław po roku w 1947 r.
Zofia z dziećmi Janiną i Stanisławem wyjechali w 1959r. do Polski w okolice Golubia Dobrzynia na Pomorzu.
Janina wyszła za mąż za Henryka Janiszewskiego, mają córkę Jolantę, która jest mężatką, ma syna Jakuba.
Stanisław brat Janiny skończył studia w Bydgoszczy. Tam też zamieszkał, założył rodzinę, zmarł nagle 7.01.2005 r., pozostawił syna Michała Pietruszczaka.
W tym samym domu (Nr.1), mieszkał brat Stanisława, Franciszek (1887) i żona Magdalena (1900) córka Michała Kosowskiego i Marii z d, Paprocka, czyli Magdalena i Zofia były siostrami i wyszły za mąż za Pietruszczaków, Magdalena za Franciszka, a Zofia za Stanisława. Rodzicami Franciszka i Stanisława byli Piotr Pietruszczak i Maria z domu ??
Eugeniusz (1925) syn Franciszka i Magdaleny przypuszczalnie poszedł w 1944 r. z oddziałem partyzanckim na zachód za San k. Rudnika. Następnie został pobrany do Wojska Polskiego. Po zakończeniu wojny w 1945 r. pozostał w Polsce, zamieszkał w miejscowości Zagnańsk koło Kielc, ożenił się z Ireną i mieli syna Andrzeja. W roku 1955 Eugeniusz sprowadził do Polski swoją matkę Magdalenę, która po jakimś czasie zamieszkała u swojej siostry Zofii w Golubiu.
Żona Franciszka Pietruszczaka Magdalena i żona Stanisława Pietruszczaka Zofia były siostrami, córkami Michała Kosowskiego i Marii z d. Paprocka, dom ich w Pnikucie stał po drugiej stronie rzeki Siecznej za błoniem nad potokiem w grupie domów zwanej ''Dziekanówką'' w sąsiedztwie Wiącków.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Urodzeni w 1906]]
[[Kategoria:Zmarli w 1947]]
77138542751efaec45ce135bf889ef46d7dc77cd
1072
1071
2019-10-31T22:25:20Z
Ffkapa
2
wikitext
text/x-wiki
'''Stanisław Pietruszczak''' - dom numer 1
== Rodzina ==
Pietruszczak Stanisław (1906), żona Zofia (1911) - córka Michała Kosowskiego i Marii z domu Paprocka.
== Dzieci ==
Janina (1938), Stanisław (1946)
== Dzieje rodziny ==
Stanisław i jego brat Franciszek mieszkający w tym samym domu zostali aresztowani w lutym 1946r. przez NKWD. Podejrzani o udział w partyzantce w lasach pnikuckich, w śledztwie mocno pobici i poddani torturom stosowanym w ruskich więzieniach, zostali po 2 tygodniach zwolnieni do domu. Nie odzyskali zdrowia i Franciszek zmarł po 9 miesiącach a Stanisław po roku w 1947 r.
Zofia z dziećmi Janiną i Stanisławem wyjechali w 1959r. do Polski w okolice Golubia Dobrzynia na Pomorzu.
Janina wyszła za mąż za Henryka Janiszewskiego, mają córkę Jolantę, która jest mężatką, ma syna Jakuba.
Stanisław brat Janiny skończył studia w Bydgoszczy. Tam też zamieszkał, założył rodzinę, zmarł nagle 7.01.2005 r., pozostawił syna Michała Pietruszczaka.
W tym samym domu (Nr.1), mieszkał brat Stanisława, Franciszek (1887) i żona Magdalena (1900) córka Michała Kosowskiego i Marii z d, Paprocka, czyli Magdalena i Zofia były siostrami i wyszły za mąż za Pietruszczaków, Magdalena za Franciszka, a Zofia za Stanisława. Rodzicami Franciszka i Stanisława byli Piotr Pietruszczak i Maria z domu ??
Eugeniusz (1925) syn Franciszka i Magdaleny przypuszczalnie poszedł w 1944 r. z oddziałem partyzanckim na zachód za San k. Rudnika. Następnie został pobrany do Wojska Polskiego. Po zakończeniu wojny w 1945 r. pozostał w Polsce, zamieszkał w miejscowości Zagnańsk koło Kielc, ożenił się z Ireną i mieli syna Andrzeja. W roku 1955 Eugeniusz sprowadził do Polski swoją matkę Magdalenę, która po jakimś czasie zamieszkała u swojej siostry Zofii w Golubiu.
Żona Franciszka Pietruszczaka Magdalena i żona Stanisława Pietruszczaka Zofia były siostrami, córkami Michała Kosowskiego i Marii z d. Paprocka, dom ich w Pnikucie stał po drugiej stronie rzeki Siecznej za błoniem nad potokiem w grupie domów zwanej ''Dziekanówką'' w sąsiedztwie Wiącków.
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Urodzeni w 1906]]
2e0cc17168d88e352f42d606b74c964bc39c7b93
1071
2019-10-31T22:19:41Z
Ffkapa
2
nowa strona
wikitext
text/x-wiki
'''Stanisław Pietruszczak''' - dom numer 1
== Rodzina ==
Pietruszczak Stanisław (1906), żona Zofia (1911) - córka Michała Kosowskiego i Marii z domu Paprocka.
== Dzieci ==
Janina (1938), Stanisław (1946)
== Dzieje rodziny ==
Stanisław i jego brat Franciszek mieszkający w tym samym domu zostali aresztowani w lutym 1946r. przez NKWD. Podejrzani o udział w partyzantce w lasach pnikuckich, w śledztwie mocno pobici i poddani torturom stosowanym w ruskich więzieniach, zostali po 2 tygodniach zwolnieni do domu. Nie odzyskali zdrowia i Franciszek zmarł po 9 miesiącach a Stanisław po roku w 1947 r.
Zofia z dziećmi Janiną i Stanisławem wyjechali w 1959r. do Polski w okolice Golubia Dobrzynia na Pomorzu.
Janina wyszła za mąż za Henryka Janiszewskiego, mają córkę Jolantę, która jest mężatką, ma syna Jakuba.
Stanisław brat Janiny skończył studia w Bydgoszczy. Tam też zamieszkał, założył rodzinę, zmarł nagle 7.01.2005 r., pozostawił syna Michała Pietruszczaka.
W tym samym domu (Nr.1), mieszkał brat Stanisława, Franciszek (1887) i żona Magdalena (1900) córka Michała Kosowskiego i Marii z d, Paprocka, czyli Magdalena i Zofia były siostrami i wyszły za mąż za Pietruszczaków, Magdalena za Franciszka, a Zofia za Stanisława. Rodzicami Franciszka i Stanisława byli Piotr Pietruszczak i Maria z domu ??
Eugeniusz (1925) syn Franciszka i Magdaleny przypuszczalnie poszedł w 1944 r. z oddziałem partyzanckim na zachód za San k. Rudnika. Następnie został pobrany do Wojska Polskiego. Po zakończeniu wojny w 1945 r. pozostał w Polsce, zamieszkał w miejscowości Zagnańsk koło Kielc, ożenił się z Ireną i mieli syna Andrzeja. W roku 1955 Eugeniusz sprowadził do Polski swoją matkę Magdalenę, która po jakimś czasie zamieszkała u swojej siostry Zofii w Golubiu.
Żona Franciszka Pietruszczaka Magdalena i żona Stanisława Pietruszczaka Zofia były siostrami, córkami Michała Kosowskiego i Marii z d. Paprocka, dom ich w Pnikucie stał po drugiej stronie rzeki Siecznej za błoniem nad potokiem w grupie domów zwanej ''Dziekanówką'' w sąsiedztwie Wiącków.
[[Kategoria:Urodzeni w Pnikucie]]
f7e2554dc29d673c09a62b7d9374a1d76ab54a3f
Strona główna
0
160
1066
1065
2018-04-03T08:53:00Z
Kazik
1
drobne merytoryczne
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<!-- PIERWSZY BANER -->
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;">
<td style="width:33%; padding:4px;">
<!-- WIKI.PNIKUCZANIE - WITAJ -->
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[WikiPnikuczanie:Wiki.Pnikuczanie|Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą '''[[WikiPnikuczanie:Wstęp|każdy może edytować]]'''.</div>
<div id="articlecount" style="font-size:95%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[WikiPnikuczanie:Zasady edycji|nasze zasady]]</div>
|}
</td>
<!-- LISTA PROJEKTÓW -->
<td style="width:13%; font-size:95%; padding:4px;">
* '''[[Portal:Historia|Historia]]'''
* '''[[Portal:Ludzie|Ludzie]]'''
* '''[[Portal:Miejsca|Miejsca]]'''
</td>
</table>
</div>
<!-- BANER SZUKAJ -->
<div id="main-page-searchbox">
[[Plik:Ambox_blue.png|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- TREŚĆ -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- ZAWARTOŚĆ TREŚCI_I -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Jak zacząć<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
<!-- ZAWARTOŚĆ TREŚCI_II -->
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Dlaczego '''Wiki.Pnikuczanie'''</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''<br>
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''<br>
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- DRUGA KOLUMNA -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
<!-- TYTUL TREŚCI_I_IIK -->
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Miejsca które znamy...</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
<!-- ZAWARTOŚĆ TREŚCI_I_IIK -->
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.<br>
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|( Cały artykuł )]]
</div>
|-
<!-- TYTUL TREŚCI_II_IIK -->
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Ludzie którzy odeszli...</h2>
|-
<!-- ZAWARTOŚĆ TREŚCI_II_IIK -->
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października 1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|( Cały artykuł )]]
</div>
|}
|}
<!-- INNE PROJEKTY -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[https://pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[https://pnikut.org/ Pnikut.org]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<!-- STOPKA -->
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [https://pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
39d0e75c96815a44fec8398461aaf620e47146ef
1065
1064
2018-04-03T08:28:55Z
Kazik
1
drobne merytoryczne
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<!-- PIERWSZY BANER -->
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;">
<td style="width:33%; padding:4px;">
<!-- WIKI.PNIKUCZANIE - WITAJ -->
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[WikiPnikuczanie:Wiki.Pnikuczanie|Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą '''[[WikiPnikuczanie:Wstęp|każdy może edytować]]'''.</div>
<div id="articlecount" style="font-size:95%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[WikiPnikuczanie:Zasady edycji|nasze zasady]]</div>
|}
</td>
<!-- LISTA PROJEKTÓW -->
<td style="width:13%; font-size:95%; padding:4px;">
* '''[[Portal:Historia|Historia]]'''
* '''[[Portal:Ludzie|Ludzie]]'''
* '''[[Portal:Miejsca|Miejsca]]'''
</td>
</table>
</div>
<!-- BANER SZUKAJ -->
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- TREŚĆ -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- ZAWARTOŚĆ TREŚCI_I -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Jak zacząć<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
<!-- ZAWARTOŚĆ TREŚCI_II -->
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Dlaczego '''Wiki.Pnikuczanie'''</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''<br>
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''<br>
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- DRUGA KOLUMNA -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
<!-- TYTUL TREŚCI_I_IIK -->
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Miejsca które znamy...</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
<!-- ZAWARTOŚĆ TREŚCI_I_IIK -->
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.<br>
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|( Cały artykuł )]]
</div>
|-
<!-- TYTUL TREŚCI_II_IIK -->
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Ludzie którzy odeszli...</h2>
|-
<!-- ZAWARTOŚĆ TREŚCI_II_IIK -->
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października 1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|( Cały artykuł )]]
</div>
|}
|}
<!-- INNE PROJEKTY -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[https://pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[https://pnikut.org/ Pnikut.org]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<!-- STOPKA -->
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [https://pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
78d0856c5d60eb881edd08a930f72af6d02282ce
1064
599
2018-04-03T08:27:35Z
Kazik
1
drobne merytoryczne
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<!-- PIERWSZY BANER -->
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;">
<td style="width:33%; padding:4px;">
<!-- WIKI.PNIKUCZANIE - WITAJ -->
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[WikiPnikuczanie:Wiki.Pnikuczanie|Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą '''[[WikiPnikuczanie:Wstęp|każdy może edytować]]'''.</div>
<div id="articlecount" style="font-size:95%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[WikiPnikuczanie:Zasady edycji|nasze zasady]]</div>
|}
</td>
<!-- LISTA PROJEKTÓW -->
<td style="width:13%; font-size:95%; padding:4px;">
* '''[[Portal:Historia|Historia]]'''
* '''[[Portal:Ludzie|Ludzie]]'''
* '''[[Portal:Miejsca|Miejsca]]'''
</td>
</table>
</div>
<!-- BANER SZUKAJ -->
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- TREŚĆ -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- ZAWARTOŚĆ TREŚCI_I -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Jak zacząć<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
<!-- ZAWARTOŚĆ TREŚCI_II -->
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Dlaczego '''Wiki.Pnikuczanie'''</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''<br>
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''<br>
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- DRUGA KOLUMNA -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
<!-- TYTUL TREŚCI_I_IIK -->
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Miejsca które znamy...</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
<!-- ZAWARTOŚĆ TREŚCI_I_IIK -->
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.<br>
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|( Cały artykuł )]]
</div>
|-
<!-- TYTUL TREŚCI_II_IIK -->
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Ludzie którzy odeszli...</h2>
|-
<!-- ZAWARTOŚĆ TREŚCI_II_IIK -->
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października 1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|( Cały artykuł )]]
</div>
|}
|}
<!-- INNE PROJEKTY -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<!-- STOPKA -->
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [https://pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
9022582d260383c91ec09c9494c956c1912fa8bb
599
598
2014-03-13T14:57:23Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<!-- PIERWSZY BANER -->
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;">
<td style="width:33%; padding:4px;">
<!-- WIKI.PNIKUCZANIE - WITAJ -->
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[WikiPnikuczanie:Wiki.Pnikuczanie|Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą '''[[WikiPnikuczanie:Wstęp|każdy może edytować]]'''.</div>
<div id="articlecount" style="font-size:95%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[WikiPnikuczanie:Zasady edycji|nasze zasady]]</div>
|}
</td>
<!-- LISTA PROJEKTÓW -->
<td style="width:13%; font-size:95%; padding:4px;">
* '''[[Portal:Historia|Historia]]'''
* '''[[Portal:Ludzie|Ludzie]]'''
* '''[[Portal:Miejsca|Miejsca]]'''
</td>
</table>
</div>
<!-- BANER SZUKAJ -->
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- TREŚĆ -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- ZAWARTOŚĆ TREŚCI_I -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Jak zacząć<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
<!-- ZAWARTOŚĆ TREŚCI_II -->
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Dlaczego '''Wiki.Pnikuczanie'''</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''<br>
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''<br>
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- DRUGA KOLUMNA -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
<!-- TYTUL TREŚCI_I_IIK -->
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Miejsca które znamy...</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
<!-- ZAWARTOŚĆ TREŚCI_I_IIK -->
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.<br>
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|( Cały artykuł )]]
</div>
|-
<!-- TYTUL TREŚCI_II_IIK -->
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Ludzie którzy odeszli...</h2>
|-
<!-- ZAWARTOŚĆ TREŚCI_II_IIK -->
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października 1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|( Cały artykuł )]]
</div>
|}
|}
<!-- INNE PROJEKTY -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<!-- STOPKA -->
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [http://www.pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
106ae5b4472d4c85a77ef6fd25b24f78aafa9298
598
597
2014-03-13T14:56:39Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<!-- PIERWSZY BANER -->
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;">
<td style="width:33%; padding:4px;">
<!-- WIKI.PNIKUCZANIE - WITAJ -->
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[WikiPnikuczanie:Wiki.Pnikuczanie|Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą '''[[WikiPnikuczanie:Wstęp|każdy może edytować]]'''.</div>
<div id="articlecount" style="font-size:95%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
</td>
<!-- LISTA PROJEKTÓW -->
<td style="width:13%; font-size:95%; padding:4px;">
* '''[[Portal:Historia|Historia]]'''
* '''[[Portal:Ludzie|Ludzie]]'''
* '''[[Portal:Miejsca|Miejsca]]'''
</td>
</table>
</div>
<!-- BANER SZUKAJ -->
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- TREŚĆ -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- ZAWARTOŚĆ TREŚCI_I -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Jak zacząć<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
<!-- ZAWARTOŚĆ TREŚCI_II -->
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Dlaczego '''Wiki.Pnikuczanie'''</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''<br>
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''<br>
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- DRUGA KOLUMNA -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
<!-- TYTUL TREŚCI_I_IIK -->
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Miejsca które znamy...</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
<!-- ZAWARTOŚĆ TREŚCI_I_IIK -->
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.<br>
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|( Cały artykuł )]]
</div>
|-
<!-- TYTUL TREŚCI_II_IIK -->
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Ludzie którzy odeszli...</h2>
|-
<!-- ZAWARTOŚĆ TREŚCI_II_IIK -->
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października 1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|( Cały artykuł )]]
</div>
|}
|}
<!-- INNE PROJEKTY -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<!-- STOPKA -->
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [http://www.pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
c5a37c673f811192024e5340babf1e4281ff5ef7
597
515
2014-03-13T14:55:32Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<!-- PIERWSZY BANER -->
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;">
<td style="width:33%; padding:4px;">
<!-- WIKI.PNIKUCZANIE - WITAJ -->
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[WikiPnikuczanie:Wiki.Pnikuczanie|Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą '''[[Wstęp|każdy może edytować]]'''.</div>
<div id="articlecount" style="font-size:95%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
</td>
<!-- LISTA PROJEKTÓW -->
<td style="width:13%; font-size:95%; padding:4px;">
* '''[[Portal:Historia|Historia]]'''
* '''[[Portal:Ludzie|Ludzie]]'''
* '''[[Portal:Miejsca|Miejsca]]'''
</td>
</table>
</div>
<!-- BANER SZUKAJ -->
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- TREŚĆ -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- ZAWARTOŚĆ TREŚCI_I -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Jak zacząć<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
<!-- ZAWARTOŚĆ TREŚCI_II -->
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Dlaczego '''Wiki.Pnikuczanie'''</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''<br>
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''<br>
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- DRUGA KOLUMNA -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
<!-- TYTUL TREŚCI_I_IIK -->
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Miejsca które znamy...</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
<!-- ZAWARTOŚĆ TREŚCI_I_IIK -->
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.<br>
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|( Cały artykuł )]]
</div>
|-
<!-- TYTUL TREŚCI_II_IIK -->
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Ludzie którzy odeszli...</h2>
|-
<!-- ZAWARTOŚĆ TREŚCI_II_IIK -->
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października 1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|( Cały artykuł )]]
</div>
|}
|}
<!-- INNE PROJEKTY -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<!-- STOPKA -->
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [http://www.pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
4be71ba69c4fa3669a57bbea5c933150df02cb1d
515
514
2014-02-16T09:10:19Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<!-- PIERWSZY BANER -->
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;">
<td style="width:33%; padding:4px;">
<!-- WIKI.PNIKUCZANIE - WITAJ -->
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą '''[[Wstęp|każdy może edytować]]'''.</div>
<div id="articlecount" style="font-size:95%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
</td>
<!-- LISTA PROJEKTÓW -->
<td style="width:13%; font-size:95%; padding:4px;">
* '''[[Portal:Historia|Historia]]'''
* '''[[Portal:Ludzie|Ludzie]]'''
* '''[[Portal:Miejsca|Miejsca]]'''
</td>
</table>
</div>
<!-- BANER SZUKAJ -->
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- TREŚĆ -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- ZAWARTOŚĆ TREŚCI_I -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Jak zacząć<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
<!-- ZAWARTOŚĆ TREŚCI_II -->
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Dlaczego '''Wiki.Pnikuczanie'''</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''<br>
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''<br>
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- DRUGA KOLUMNA -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
<!-- TYTUL TREŚCI_I_IIK -->
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Miejsca które znamy...</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
<!-- ZAWARTOŚĆ TREŚCI_I_IIK -->
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.<br>
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|( Cały artykuł )]]
</div>
|-
<!-- TYTUL TREŚCI_II_IIK -->
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Ludzie którzy odeszli...</h2>
|-
<!-- ZAWARTOŚĆ TREŚCI_II_IIK -->
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października 1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|( Cały artykuł )]]
</div>
|}
|}
<!-- INNE PROJEKTY -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<!-- STOPKA -->
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [http://www.pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
ac801d6d9f67b58acfedba04f78b9a32fc50ec40
514
513
2014-02-16T09:02:06Z
Ffkapa
2
Zabezpieczono "[[Strona główna]]" ([edytowanie=Dozwolone tylko dla administratorów] (na zawsze) [przenoszenie=Dozwolone tylko dla administratorów] (na zawsze))
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<!-- PIERWSZY BANER -->
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;">
<td style="width:33%; padding:4px;">
<!-- WIKI.PNIKUCZANIE - WITAJ -->
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą '''[[Wstęp|każdy może edytować]]'''.</div>
<div id="articlecount" style="font-size:95%;">Obecnie mamy [[Special:Statistics|{{NUMBEROFARTICLES}}]] artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
</td>
<!-- LISTA PROJEKTÓW -->
<td style="width:13%; font-size:95%; padding:4px;">
* '''[[Portal:Historia|Historia]]'''
* '''[[Portal:Ludzie|Ludzie]]'''
* '''[[Portal:Miejsca|Miejsca]]'''
</td>
</table>
</div>
<!-- BANER SZUKAJ -->
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- TREŚĆ -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- ZAWARTOŚĆ TREŚCI_I -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Jak zacząć<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
<!-- ZAWARTOŚĆ TREŚCI_II -->
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Dlaczego '''Wiki.Pnikuczanie'''</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''<br>
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''<br>
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- DRUGA KOLUMNA -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
<!-- TYTUL TREŚCI_I_IIK -->
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Miejsca które znamy...</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
<!-- ZAWARTOŚĆ TREŚCI_I_IIK -->
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.<br>
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|( Cały artykuł )]]
</div>
|-
<!-- TYTUL TREŚCI_II_IIK -->
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Ludzie którzy odeszli...</h2>
|-
<!-- ZAWARTOŚĆ TREŚCI_II_IIK -->
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października 1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|( Cały artykuł )]]
</div>
|}
|}
<!-- INNE PROJEKTY -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<!-- STOPKA -->
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [http://www.pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
e2f989c4b6e4f2e6c1c612dfe75020a25da0349e
513
504
2014-02-16T08:52:52Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<!-- PIERWSZY BANER -->
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;">
<td style="width:33%; padding:4px;">
<!-- WIKI.PNIKUCZANIE - WITAJ -->
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą '''[[Wstęp|każdy może edytować]]'''.</div>
<div id="articlecount" style="font-size:95%;">Obecnie mamy [[Special:Statistics|{{NUMBEROFARTICLES}}]] artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
</td>
<!-- LISTA PROJEKTÓW -->
<td style="width:13%; font-size:95%; padding:4px;">
* '''[[Portal:Historia|Historia]]'''
* '''[[Portal:Ludzie|Ludzie]]'''
* '''[[Portal:Miejsca|Miejsca]]'''
</td>
</table>
</div>
<!-- BANER SZUKAJ -->
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- TREŚĆ -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- ZAWARTOŚĆ TREŚCI_I -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Jak zacząć<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
<!-- ZAWARTOŚĆ TREŚCI_II -->
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Dlaczego '''Wiki.Pnikuczanie'''</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''<br>
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''<br>
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- DRUGA KOLUMNA -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
<!-- TYTUL TREŚCI_I_IIK -->
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Miejsca które znamy...</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
<!-- ZAWARTOŚĆ TREŚCI_I_IIK -->
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.<br>
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|( Cały artykuł )]]
</div>
|-
<!-- TYTUL TREŚCI_II_IIK -->
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Ludzie którzy odeszli...</h2>
|-
<!-- ZAWARTOŚĆ TREŚCI_II_IIK -->
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października 1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|( Cały artykuł )]]
</div>
|}
|}
<!-- INNE PROJEKTY -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<!-- STOPKA -->
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [http://www.pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
e2f989c4b6e4f2e6c1c612dfe75020a25da0349e
504
503
2014-02-16T08:28:37Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<!-- PIERWSZY BANER -->
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;">
<td style="width:33%; padding:4px;">
<!-- WIKI.PNIKUCZANIE - WITAJ -->
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą '''[[Wstęp|każdy może edytować]]'''.</div>
<div id="articlecount" style="font-size:95%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
</td>
<!-- LISTA PROJEKTÓW -->
<td style="width:13%; font-size:95%; padding:4px;">
* '''[[Portal:Historia|Historia]]'''
* '''[[Portal:Ludzie|Ludzie]]'''
* '''[[Portal:Miejsca|Miejsca]]'''
</td>
</table>
</div>
<!-- BANER SZUKAJ -->
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- TREŚĆ -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- ZAWARTOŚĆ TREŚCI_I -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Jak zacząć<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
<!-- ZAWARTOŚĆ TREŚCI_II -->
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Dlaczego '''Wiki.Pnikuczanie'''</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''<br>
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''<br>
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- DRUGA KOLUMNA -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
<!-- TYTUL TREŚCI_I_IIK -->
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Miejsca które znamy...</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
<!-- ZAWARTOŚĆ TREŚCI_I_IIK -->
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.<br>
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|( Cały artykuł )]]
</div>
|-
<!-- TYTUL TREŚCI_II_IIK -->
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Ludzie którzy odeszli...</h2>
|-
<!-- ZAWARTOŚĆ TREŚCI_II_IIK -->
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października 1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|( Cały artykuł )]]
</div>
|}
|}
<!-- INNE PROJEKTY -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<!-- STOPKA -->
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [http://www.pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
ac801d6d9f67b58acfedba04f78b9a32fc50ec40
503
489
2014-02-16T08:18:51Z
Ffkapa
2
nowa strona glowna
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<!-- PIERWSZY BANER -->
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;">
<td style="width:33%; padding:4px;">
<!-- WIKI.PNIKUCZANIE - WITAJ -->
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą '''[[Wstęp|każdy może edytować]]'''.</div>
<div id="articlecount" style="font-size:95%;">Obecnie mamy '''<strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong>''' artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
</td>
<!-- LISTA PROJEKTÓW -->
<td style="width:13%; font-size:95%; padding:4px;">
* '''[[Portal:Historia|Historia]]'''
* '''[[Portal:Ludzie|Ludzie]]'''
* '''[[Portal:Miejsca|Miejsca]]'''
</td>
</table>
</div>
<!-- BANER SZUKAJ -->
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- TREŚĆ -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- ZAWARTOŚĆ TREŚCI_I -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Jak zacząć<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
<!-- ZAWARTOŚĆ TREŚCI_II -->
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">Dlaczego '''Wiki.Pnikuczanie'''</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''<br>
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''<br>
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- DRUGA KOLUMNA -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
<!-- TYTUL TREŚCI_I_IIK -->
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Miejsca które znamy...</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
<!-- ZAWARTOŚĆ TREŚCI_I_IIK -->
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.<br>
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|( Cały artykuł )]]
</div>
|-
<!-- TYTUL TREŚCI_II_IIK -->
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">Ludzie którzy odeszli...</h2>
|-
<!-- ZAWARTOŚĆ TREŚCI_II_IIK -->
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października 1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|( Cały artykuł )]]
</div>
|}
|}
<!-- INNE PROJEKTY -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<!-- STOPKA -->
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [http://www.pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
95ffb039aa23748bf675be28178e897427524cad
489
488
2014-02-16T06:53:06Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą [[Wstęp|każdy może edytować]].</div>
<div id="articlecount" style="font-size:85%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
<div id="main-page-portals">
<span>
</span>
<span>
</span>
</div>
<div id="main-page-wiki-events">
</div>
</div>
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- Czy wiesz - szablon -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- Czy wiesz_artykuł -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Jak zacząć
<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Dlaczego '''Wiki.Pnikuczanie'''
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- prawo -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Miejsca które znamy...
</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|( Cały artykuł )]]
</div>
|-
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Ludzie którzy odeszli...
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października 1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|( Cały artykuł )]]
</div>
|}
|}
<!-- Baner strony Głównej -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [http://www.pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
a9933ebaf531671bf4aa64abcc29e2b8799638a4
488
487
2014-02-16T06:50:17Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą [[Wstęp|każdy może edytować]].</div>
<div id="articlecount" style="font-size:85%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
<div id="main-page-portals">
<span>
</span>
<span>
</span>
</div>
<div id="main-page-wiki-events">
</div>
</div>
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- Czy wiesz - szablon -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- Czy wiesz_artykuł -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Jak zacząć
<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Dlaczego '''Wiki.Pnikuczanie'''
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- prawo -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Miejsca które znamy...
</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|( Cały artykuł )]]
</div>
|-
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Ludzie którzy odeszli...
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|( Cały artykuł )]]
</div>
|}
|}
<!-- Baner strony Głównej -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [http://www.pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
d1de40742adfa7c4908a68aba496d01b962ba78d
487
486
2014-02-16T06:34:11Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą [[Wstęp|każdy może edytować]].</div>
<div id="articlecount" style="font-size:85%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
<div id="main-page-portals">
<span>
</span>
<span>
</span>
</div>
<div id="main-page-wiki-events">
</div>
</div>
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- Czy wiesz - szablon -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- Czy wiesz_artykuł -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Jak zacząć
<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Dlaczego '''Wiki.Pnikuczanie'''
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- prawo -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Miejsca które znamy...
</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|Cały artykuł]]
</div>
|-
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Ludzie którzy odeszli...
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|Cały artykuł]]
</div>
|}
|}
<!-- Baner strony Głównej -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
<center>
<table width="360" cellpadding="0" cellspacing="0">
<tr align=center><td>
</td></tr><tr align=center><td>
<font size="1">'''''Wiki.Pnikuczanie''' jest częścią serwisu [http://www.pnikut.net Pnikut.net] i powstaje całkowicie ze środków autora, bez jakichkolwiek dotacji zewnetrznych''</font>
</td></tr>
</table>
</center>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
a68efd6f879b961a62826b08048ecc6fdb28c585
486
484
2014-02-16T06:29:12Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;"><strong>Witaj w [[Wiki.Pnikuczanie]]</strong>,</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą [[Wstęp|każdy może edytować]].</div>
<div id="articlecount" style="font-size:85%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
<div id="main-page-portals">
<span>
</span>
<span>
</span>
</div>
<div id="main-page-wiki-events">
</div>
</div>
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- Czy wiesz - szablon -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- Czy wiesz_artykuł -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Jak zacząć
<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Dlaczego '''Wiki.Pnikuczanie'''
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- prawo -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Miejsca które znamy...
</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|Cały artykuł]]
</div>
|-
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Ludzie którzy odeszli...
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|Cały artykuł]]
</div>
|}
|}
<!-- Baner strony Głównej -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
7eae63e0475e2759f55499f4b47ac664d9523a1e
484
483
2014-02-15T23:46:07Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<div style="width:100%; background:none; margin:1.2em 0 6px 0; border:1px solid #ddd;">
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;">Witaj w [[Wiki.Pnikuczanie]],</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą [[Wstęp|każdy może edytować]].</div>
<div id="articlecount" style="font-size:85%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
<div id="main-page-portals">
<span>
</span>
<span>
</span>
</div>
<div id="main-page-wiki-events">
</div>
</div>
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- Czy wiesz - szablon -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- Czy wiesz_artykuł -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Jak zacząć
<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Dlaczego '''Wiki.Pnikuczanie'''
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- prawo -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Miejsca które znamy...
</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|Cały artykuł]]
</div>
|-
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Ludzie którzy odeszli...
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|Cały artykuł]]
</div>
|}
|}
<!-- Baner strony Głównej -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
ed67cb09843d66144b2669099d49bade25957e19
483
479
2014-02-15T23:33:55Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<div style="width:100%; background:#f9f9f9; margin:1.2em 0 6px 0; border:1px solid #ddd;">
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;">Witaj w [[Wiki.Pnikuczanie]],</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii Kresowian którą [[Wstęp|każdy może edytować]].</div>
<div id="articlecount" style="font-size:85%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
<div id="main-page-portals">
<span>
</span>
<span>
</span>
</div>
<div id="main-page-wiki-events">
</div>
</div>
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- Czy wiesz - szablon -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- Czy wiesz_artykuł -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Jak zacząć
<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Dlaczego '''Wiki.Pnikuczanie'''
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- prawo -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Miejsca które znamy...
</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|Cały artykuł]]
</div>
|-
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Ludzie którzy odeszli...
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|Cały artykuł]]
</div>
|}
|}
<!-- Baner strony Głównej -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
12f1f8ec97111c89452e34363c613069bc1ef768
479
462
2014-02-15T22:59:00Z
Ffkapa
2
nowa strona główna
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<div style="width:100%; background:#f9f9f9; margin:1.2em 0 6px 0; border:1px solid #ddd;">
{| style="width:380px; border:none; background:none;"
| style="width:280px; text-align:center; white-space:nowrap; color:#000;" |
<div style="font-size:162%; border:none; margin:0; padding:.1em; color:#000;">Witaj w [[Wiki.Pnikuczanie]],</div>
<div style="top:+0.2em; font-size:95%;">encyklopedii wszystkich Kresowian którą [[Wstęp|każdy może edytować]].</div>
<div id="articlecount" style="font-size:85%;">Obecnie mamy <strong>[[Special:Statistics|{{NUMBEROFARTICLES}}]]</strong> artykułów</div>
<div id="articlecount" style="font-size:85%;">Poznaj [[Zasady edycji|nasze zasady]]</div>
|}
<div id="main-page-portals">
<span>
</span>
<span>
</span>
</div>
<div id="main-page-wiki-events">
</div>
</div>
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<!-- Czy wiesz - szablon -->
{| id="mp-upper" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;"
<!-- Czy wiesz_artykuł -->
| class="MainPageBG" style="width:45%; border:1px solid #cef2e0; background:#f5fffa; vertical-align:top; color:#000;" |
{| id="mp-left" style="width:100%; vertical-align:top; background:#f5fffa;"
| style="padding:2px;" | <h2 id="mp-tfa-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Jak zacząć
<span style="font-size:85%; font-weight:normal;"></span></h2>
|-
| style="color:#000;" | <div id="mp-tfa" style="padding:2px 5px">
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
</div>
|-
| style="padding:2px;" | <h2 id="mp-dyk-h2" style="margin:3px; background:#cef2e0; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Dlaczego '''Wiki.Pnikuczanie'''
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-dyk">
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
|}
| style="border:1px solid transparent;" |
<!-- prawo -->
| class="MainPageBG" style="width:55%; border:1px solid #cedff2; background:#f5faff; vertical-align:top;"|
{| id="mp-right" style="width:100%; vertical-align:top; background:#f5faff;"
| style="padding:2px;" | <h2 id="mp-itn-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Miejsca które znamy...
</h2>
|-
| style="color:#000; padding:2px 5px;" | <div id="mp-itn">
[[Plik:Pnikut, kościół św. Mikołaja.jpg|left|80px]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów. [[Pnikut|Cały artykuł]]
</div>
|-
| style="padding:2px;" | <h2 id="mp-otd-h2" style="margin:3px; background:#cedff2; font-size:120%; font-weight:bold; border:1px solid #a3b0bf; text-align:left; color:#000; padding:0.2em 0.4em;">
Ludzie którzy odeszli...
</h2>
|-
| style="color:#000; padding:2px 5px 5px;" | <div id="mp-otd">
[[Plik:Pnikut, Jan Miśniak.jpg|80px|prawo]]
'''Jan Miśniak''' (ur. 13 maja 1888 we wsi Pnikut, zamordowany 5 października1940 w Mauthausen-Gusen).<br>
Ukończył seminarium nauczycielskie (prawdopodobnie w Przemyślu). 15 lipca 1910 r. wcielony do C.K. armii, na froncie I Wojny Światowej walczył jako żołnierz armii austriackiej. Po tym jak zostaje ciężko ranny odznaczono go Krzyżem Wojskowym Karola i po ukończeniu szkoły oficerów rezerwy w 1918 roku awansowano na stopień podporucznika. Po odrodzeniu Polski już jako oficer polskiego wojska walczy z Ukraińcami o Przemyśl. W 1920 roku ranny w walkach z Bolszewikami trafia do szpitala w Przemyślu. Z końcem kwietnia 1922 roku zostaje przeniesiony do rezerwy w stopniu porucznika.<br>
Od września 1925 roku razem z żoną Zofią i synem Wiesławem meldują się w Zawierciu. Od początku małżonkowie angażują się w pracę pedagogiczną. Jan otrzymuje posadę kierownika Szkoły Powszechnej nr 1 w Zawierciu w której pracuje aż do jej zamknięcia w 1939 roku. W 1928 uhonorowany zostaje Medalem Dziesięciolecia Odzyskanej Niepodległości. [[Jan Miśniak|Cały artykuł]]
</div>
|}
|}
<!-- Baner strony Głównej -->
<table id="mp-banner" style="width: 100%; margin:4px 0 0 0; background:none; border-spacing: 0px;">
<tr><td style="text-align:center; padding:0; background-color:none; border:1px solid #cef2e0; color:#100; font-size:90%;">
<h2 id="mp-dyk-h2" style="margin:3px; background:#F1F2FA; font-size:120%; font-weight:bold; border:1px solid #a3bfb1; text-align:left; color:#000; padding:0.2em 0.4em;">
Zobacz inne projekty o Pnikucie</h2>
<table class="layout plainlinks" style="width:100%; margin:auto; text-align:left; background:transparent;"> <tr>
<td style="text-align:center; padding:4px;"> [[Plik:Logo_Pnikut.net.png|75px]] </td>
<td style="width:33%; padding:4px;"> '''[http://www.pnikut.net Pnikut.net]'''<br>serwis o dawnym Pnikucie </td>
<td style="text-align:center; padding:4px;"> [[Plik:DSC00361_1.jpg|50px]] </td>
<td style="width:33%; padding:4px;"> '''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku''' </td>
<td style="text-align:center; padding:4px;"> [[File:Pnikut, kościół św. Mikołaja.jpg|25px]] </td>
<td style="width:33%; padding:4px;"> '''[http://pnikut.com/ Pnikut]''' <br>Strona Rzymskokatolickiej Parafii <br>św. Mikołaja w Pnikucie </td></tr>
</table>
</td></tr>
</table>
</div>
</div>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
8c069639920b1dae488025650dce0cc6a91edbca
462
461
2014-02-15T13:57:00Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page">
<div class="section" id="main-page">
<div class="header" id="main-page-header">
<div id="main-page-intro">
<span id="main-page-welcome">
<strong>
[[Pomoc:Pierwsze kroki|Witaj w Wiki.Pnikuczanie]]
</strong>,
</span>
<br>
Obecnie mamy <strong>[[Wikipedia:Liczba artykułów w polskojęzycznej Wikipedii|{{NUMBEROFARTICLES}}]]</strong> haseł, poznaj [[Wikipedia:Zasady|nasze zasady]]
</div>
<div id="main-page-portals">
<span>
</span>
<span>
</span>
</div>
<div id="main-page-wiki-events">
</div>
</div>
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<div class="article" id="main-page-content">
<div id="main-page-column1">
<div class="section" id="main-page-didyouknow">
== Jak zacząć? ==
<br>
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
<br><br>
== Dlaczego '''Wiki.Pnikuczanie''' ==
<br>
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
</div>
<div id="main-page-column2">
<div class="section" id="main-page-didyouknow">
=== Dobry artykuł ===
<br>
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|left|270x270px|Kościół św. Mikołaja w Pnikucie]]
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów.
Około 1800 roku wieś zamieszkują 722 osoby. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie kościoła rzymskokatolickiego, 17 to grekokatolicy a 41 to zwolennicy wyznania mojżeszowego. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób. [[Pnikut|Czytaj więcej]]
{{Cytuj Wiki}}
</div>
</div>
</div>
<div class="footer" id="main-page-footer">
<div class="section" id="main-page-wikimedia">
=== Zobacz też inne projekty o Pnikucie ===
<div class="main-page-threecol">
[[Plik:Logo_Pnikut.net.png|100px]]
'''[http://www.pnikut.net Pnikut.net]''' - serwis o dawnym Pnikucie
[[Plik:DSC00361_1.jpg|50px]]
'''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku'''
[[File:Pnikut, kościół św. Mikołaja.jpg|25px]]
'''[http://pnikut.com/ Pnikut]''' - Strona Rzymskokatolickiej Parafii św. Mikołaja w Pnikucie
</div>
<div>
</div>
</div>
</div>
<div class="section" id="main-page-for-editors">
</div>
</div>
</div>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
1fe7312d0d009e77ea6590fb361cdb5d84f4f32d
461
460
2014-02-15T13:54:09Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page"><!-- https://www.mediawiki.org/wiki/Wikimedia_Mobile_engineering/imported/Mobile_projects/Mobile_Gateway#How_do_I_format_a_mobile_homepage.3F -->
<div class="section" id="main-page">
<div class="header" id="main-page-header">
<div id="main-page-intro">
<span id="main-page-welcome"><strong>[[Pomoc:Pierwsze kroki|Witaj w Wiki.Pnikuczanie]]</strong>,</span>
<br>
Obecnie mamy <strong>[[Wikipedia:Liczba artykułów w polskojęzycznej Wikipedii|{{NUMBEROFARTICLES}}]]</strong> haseł, poznaj [[Wikipedia:Zasady|nasze zasady]]
</div>
<div id="main-page-portals">
<span>
</span>
<span>
</span>
</div>
<div id="main-page-wiki-events">
</div>
</div>
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Wpisz szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<div class="article" id="main-page-content">
<div id="main-page-column1">
<div class="section" id="main-page-didyouknow">
== Jak zacząć? ==
<br>
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
<br><br>
== Dlaczego '''Wiki.Pnikuczanie''' ==
<br>
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
</div>
<div id="main-page-column2">
<div class="section" id="main-page-didyouknow">
=== Dobry artykuł ===
<br>
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|left|270x270px|Kościół św. Mikołaja w Pnikucie]]
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów.
Około 1800 roku wieś zamieszkują 722 osoby. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie kościoła rzymskokatolickiego, 17 to grekokatolicy a 41 to zwolennicy wyznania mojżeszowego. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób. [[Pnikut|Czytaj więcej]]
{{Cytuj Wiki}}
</div>
</div>
</div>
<div class="footer" id="main-page-footer">
<div class="section" id="main-page-wikimedia">
=== Zobacz też inne projekty o Pnikucie ===
<div class="main-page-threecol">
[[Plik:Logo_Pnikut.net.png|100px]]
'''[http://www.pnikut.net Pnikut.net]''' - serwis o dawnym Pnikucie
[[Plik:DSC00361_1.jpg|50px]]
'''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku'''
[[File:Pnikut, kościół św. Mikołaja.jpg|25px]]
'''[http://pnikut.com/ Pnikut]''' - Strona Rzymskokatolickiej Parafii św. Mikołaja w Pnikucie
</div>
<div>
</div>
</div>
</div>
<div class="section" id="main-page-for-editors">
</div>
</div>
</div>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
c539cb23987e6b36acdae5012d490d537f9169da
460
459
2014-02-15T00:23:26Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page"><!-- https://www.mediawiki.org/wiki/Wikimedia_Mobile_engineering/imported/Mobile_projects/Mobile_Gateway#How_do_I_format_a_mobile_homepage.3F -->
<div class="section" id="main-page">
<div class="header" id="main-page-header">
<div id="main-page-intro">
<span id="main-page-welcome"><strong>[[Pomoc:Pierwsze kroki|Witaj w Wikipedii]]</strong>,</span>
<br>
Obecnie mamy <strong>[[Wikipedia:Liczba artykułów w polskojęzycznej Wikipedii|{{NUMBEROFARTICLES}}]]</strong> haseł, poznaj [[Wikipedia:Zasady|nasze zasady]]
</div>
<div id="main-page-portals">
<span>
</span>
<span>
</span>
</div>
<div id="main-page-wiki-events">
</div>
</div>
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Podaj szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<div class="article" id="main-page-content">
<div id="main-page-column1">
<div class="section" id="main-page-didyouknow">
== Jak zacząć? ==
<br>
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
<br><br>
== Dlaczego '''Wiki.Pnikuczanie''' ==
<br>
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
</div>
<div id="main-page-column2">
<div class="section" id="main-page-didyouknow">
=== Dobry artykuł ===
<br>
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|left|270x270px|Kościół św. Mikołaja w Pnikucie]]
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów.
Około 1800 roku wieś zamieszkują 722 osoby. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie kościoła rzymskokatolickiego, 17 to grekokatolicy a 41 to zwolennicy wyznania mojżeszowego. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób. [[Pnikut|Czytaj więcej]]
{{Cytuj Wiki}}
</div>
</div>
</div>
<div class="footer" id="main-page-footer">
<div class="section" id="main-page-wikimedia">
=== Zobacz też inne projekty o Pnikucie ===
<div class="main-page-threecol">
[[Plik:Logo_Pnikut.net.png|100px]]
'''[http://www.pnikut.net Pnikut.net]''' - serwis o dawnym Pnikucie
[[Plik:DSC00361_1.jpg|50px]]
'''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku'''
[[File:Pnikut, kościół św. Mikołaja.jpg|25px]]
'''[http://pnikut.com/ Pnikut]''' - Strona Rzymskokatolickiej Parafii św. Mikołaja w Pnikucie
</div>
<div>
</div>
</div>
</div>
<div class="section" id="main-page-for-editors">
</div>
</div>
</div>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
f600b1e55181594fa6adf1f043c476f56848c9c3
459
458
2014-02-15T00:13:36Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page"><!-- https://www.mediawiki.org/wiki/Wikimedia_Mobile_engineering/imported/Mobile_projects/Mobile_Gateway#How_do_I_format_a_mobile_homepage.3F -->
<div class="section" id="main-page">
<div class="header" id="main-page-header">
<div id="main-page-intro">
<span id="main-page-welcome"><strong>[[Pomoc:Pierwsze kroki|Witaj w Wikipedii]]</strong>,</span>
<br>
Obecnie mamy <strong>[[Wikipedia:Liczba artykułów w polskojęzycznej Wikipedii|{{NUMBEROFARTICLES}}]]</strong> haseł, poznaj [[Wikipedia:Zasady|nasze zasady]]
</div>
<div id="main-page-portals">
<span>
</span>
<span>
</span>
</div>
<div id="main-page-wiki-events">
</div>
</div>
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Podaj szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<div class="article" id="main-page-content">
<div id="main-page-column1">
<div class="section" id="main-page-didyouknow">
<br>
== Jak zacząć? ==
<br>
''Aby móc edytować, wystarczy utworzyć swoje '''[[Specjalna:Utwórz konto|konto]]''', a gdy już je mamy '''[[Specjalna:Zaloguj|zalogować się]]'''. Wbrew pozorom edytowanie jest bardzo proste, po kilku mniej udanych próbach z pewnością artykuł wyglądać będzie pięknie. Zawsze też można przeczytać porady na stronach '''[[Pomoc:Spis treści|pomocy]]''' lub napisać do administratorów. ''
<br>
== Dlaczego '''Wiki.Pnikuczanie''' ==
<br>
''Powód był prosty. Bardzo istotne jest możliwie szybko zebrać jak najwięcej informacji o dawnych mieszkańcach Pnikuta. Interesujące są jednak również fakty, opowieści i ustne przekazy z innych miejscowości Kresów przedwojennej Rzeczypospolitej. To wiedza ulotna, przemijająca wraz z niewielką już, niestety liczbą bohaterów tamtych dni. Nie wolno pozwolić by wraz z nimi odeszła pamięć o ludziach, ich życiu, cierpieniach i troskach, radościach i szczęściu, pamięć o nich.''
''Dlaczego nie opisywać tego w Polskiej Wikipedii? Ależ oczywiście można! Problem w tym, że pl.Wiki ma swoje zasady, regulaminy. Jest wiele haseł które możemy tam napisać i które będą dostępne dla świata i pozostaną w pamięci wszystkich, jednak nie wszystko.''
''Jedynym uregulowaniem naszej Wikipedii jest możliwie rzetelna wiedza o tamtych trudnych czasach, to pamięć ludzi. Byłoby dobrze, gdyby dało się poprzeć tę wiedzę jakimiś źródłami, literaturą, jednak nie jest to niezbędne, gdy jest już niemożliwe...''
<br><br>
'''''<center>Proszę jednak pamiętać, piszemy prawdę, tak jak to pamiętamy.</center> '''''
</div>
</div>
<div id="main-page-column2">
<div class="section" id="main-page-didyouknow">
=== Dobry artykuł ===
<br>
[[Plik:Pnikut, kościół św. Mikołaja.jpg|thumb|left|270x270px|Kościół św. Mikołaja w Pnikucie]]
'''Pnikut''' (ukr. ''Пнікут'') – wieś na Ukrainie, w rejonie mościskim obwodu lwowskiego. Wieś liczy 1101 mieszkańców.
Założony w 1359 r. W II Rzeczypospolitej do 1934 samodzielna gmina jednostkowa. Następnie należała do zbiorowej wiejskiej gminy Pnikut w powiecie mościskim w województwie lwowskim. Po wojnie odłączona od Polski i włączona do Ukraińskiej SRR.
Od najdawniejszych lat Pnikut zamieszkiwali głównie Polacy. Spośród historycznie najstarszych wymienić należy nazwiska: Czop, Duszakiewicz, Lech, Mazur, Zarański, Skrabka, Pietraka. W bliżej nieokreślonym czasie Kapituła Przemyska sprowadziła do wsi osadników spod Nowego Sącza, pojawiły się rodziny: Głogowskich, Paprockich, Tasowskich, Kosowskich, Mazurów.
Około 1800 roku wieś zamieszkują 722 osoby. Kolejny spis sporządzony w 1880 roku mówi o 196 domach na terenie wsi w których mieszkało 1113 osób. W liczbie tej 1111 było Polakami a 2 narodowości ruskiej, zaś ze względu na wyznanie: 1055 to członkowie kościoła rzymskokatolickiego, 17 to grekokatolicy a 41 to zwolennicy wyznania mojżeszowego. Dziesięć lat później w kolejnym spisie zanotowano 1298 osób, a po kolejnych dziesięciu latach, w 1900 roku - 1489 mieszkańców. Według spisu powszechnego z 1921 roku w wsi mieszkało 1453 Polaków i 10 Żydów. Nikt nie deklarował narodowości innej. W tym czasie jest to jedyna w okolicy etnicznie polska wieś. Lata 1930 i 1931 to czas nasilonej emigracji, wieś opuszcza "za chlebem" 86 osób. Według spisu z 1938 roku Pnikut zamieszkuje 1596 osób. [[Pnikut|Czytaj więcej]]
{{Cytuj Wiki}}
</div>
</div>
</div>
<div class="footer" id="main-page-footer">
<div class="section" id="main-page-wikimedia">
=== Zobacz też inne projekty o Pnikucie ===
<div class="main-page-threecol">
[[Plik:Logo_Pnikut.net.png|100px]]
'''[http://www.pnikut.net Pnikut.net]''' - serwis o dawnym Pnikucie
[[Plik:DSC00361_1.jpg|50px]]
'''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku'''
[[File:Pnikut, kościół św. Mikołaja.jpg|25px]]
'''[http://pnikut.com/ Pnikut]''' - Strona Rzymskokatolickiej Parafii św. Mikołaja w Pnikucie
</div>
<div>
</div>
</div>
</div>
<div class="section" id="main-page-for-editors">
</div>
</div>
</div>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
df39510f5a20b79a5aaabf47595dc0865e39212b
458
456
2014-02-14T23:27:17Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page"><!-- https://www.mediawiki.org/wiki/Wikimedia_Mobile_engineering/imported/Mobile_projects/Mobile_Gateway#How_do_I_format_a_mobile_homepage.3F -->
<div class="section" id="main-page">
<div class="header" id="main-page-header">
<div id="main-page-intro">
<span id="main-page-welcome"><strong>[[Pomoc:Pierwsze kroki|Witaj w Wikipedii]]</strong>,</span>
[[Wikipedia:10 rzeczy, których nie wiedziałeś o Wikipedii|wolnej encyklopedii]], którą [[Wikipedia:Śmiało modyfikuj strony|każdy może redagować]].
Obecnie mamy <strong>[[Wikipedia:Liczba artykułów w polskojęzycznej Wikipedii|{{NUMBEROFARTICLES}}]]</strong> haseł, w tym <strong>{{#expr: {{PAGESINCAT:Artykuły na medal}}+{{PAGESINCAT:Dobre artykuły}}+{{PAGESINCAT:Listy na medal}}-23 }}</strong> [[Wikipedia:Wyróżniona zawartość Wikipedii|wyróżnionych]].
Poznaj [[Wikipedia:Zasady|nasze zasady]]{{•}} [[Pomoc:Wstęp|Testuj wiki!]]
</div>
<div id="main-page-portals">
<span>
[[Portal:Nauki ścisłe i przyrodnicze|Nauki ścisłe i przyrodnicze]]{{•}}
[[Portal:Nauki społeczne i humanistyczne|Nauki społeczne i humanistyczne]]{{•}}
[[Portal:Technika|Technika]]{{•}}
[[Portal:Geografia|Geografia]]{{•}}
[[Portal:Historia|Historia]]{{•}}
[[Portal:Kultura|Kultura]]{{•}}
[[Portal:Społeczeństwo|Społeczeństwo]]{{•}}
[[Portal:Sport|Sport]]{{•}}
[[Portal:Religioznawstwo|Religie]]{{•}}
[[Portal:Polska|Polska]]
</span>
<span>
[[Portal:Portale|Więcej portali]]{{•}}
[[Wikipedia:Indeks haseł|Indeks haseł]]{{•}}
[[Portal:Kategorie Główne|Przegląd kategorii]]
</span>
</div>
<div id="main-page-wiki-events">
{{Wikipedia:Strona główna/Wikiwydarzenia}}
</div>
</div>
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Podaj szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<div class="article" id="main-page-content">
<div id="main-page-column1">
<div class="section" id="main-page-didyouknow">
<h2>[[Plik:PL Wiki CzyWiesz ikona.svg|38px|link=|alt=]] Czy wiesz...</h2>
{{Wikipedia:Strona główna/Czy wiesz|data={{{data|{{#timel:Y-m-d}} }}}}}
</div>
<div class="section" id="main-page-news">
<h2>[[Plik:PL Wiki Aktualnosci ikona.svg|38px|link=|alt=]] Wydarzenia</h2>
{{Wikipedia:Strona główna/Wydarzenia}}
</div>
<div class="section" id="main-page-anniversaries">
<h2>[[Plik:PL Wiki Kalendarium ikona.svg|38px|link=|alt=]] Rocznice</h2>
{{Wikipedia:Strona główna/Rocznice|data={{{data|{{#timel:Y-m-d}} }}}}}
</div>
</div>
<div id="main-page-column2">
<div class="section" id="main-page-featured-article">
<h2>[[Plik:HSUtvald.svg|38px|link=|alt=]] Artykuł na medal</h2>
{{Wikipedia:Strona główna/Artykuł na medal|data={{{data|{{#timel:Y-m-d}} }}}}}
</div>
<div class="section" id="main-page-good-article">
<h2>[[Plik:HSBra.svg|38px|link=|alt=]] Dobry artykuł</h2>
{{Wikipedia:Strona główna/Dobry artykuł|data={{{data|{{#timel:Y-m-d}} }}}}}
</div>
<div class="section" id="main-page-featured-image">
<h2>[[Plik:PL Wiki InM ikona.svg|38px|link=|alt=]] Ilustracja na medal</h2>
{{Wikipedia:Strona główna/Ilustracja na medal|data={{{data|{{#timel:Y-m-d}} }}}}}
</div>
</div>
</div>
<div class="footer" id="main-page-footer">
<div class="section" id="main-page-wikimedia">
=== Zobacz też inne projekty o Pnikucie ===
<div class="main-page-threecol">
[[Plik:Logo_Pnikut.net.png|100px]]
'''[http://www.pnikut.net Pnikut.net]''' - serwis o dawnym Pnikucie
[[Plik:DSC00361_1.jpg|50px]]
'''[https://www.facebook.com/Pnikut.net Pnikut.net] na Facebooku'''
[[File:Pnikut, kościół św. Mikołaja.jpg|25px]]
'''[http://pnikut.com/ Pnikut]''' - Strona Rzymskokatolickiej Parafii św. Mikołaja w Pnikucie
</div>
<div>
</div>
</div>
</div>
<div class="section" id="main-page-for-editors">
</div>
</div>
</div>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
c5895de285ae902306bc60275b7c9ee7c58ba1bc
456
440
2014-02-14T22:51:17Z
Ffkapa
2
wikitext
text/x-wiki
<div id="mf-main-page"><!-- https://www.mediawiki.org/wiki/Wikimedia_Mobile_engineering/imported/Mobile_projects/Mobile_Gateway#How_do_I_format_a_mobile_homepage.3F -->
<div class="section" id="main-page">
<div class="header" id="main-page-header">
<div id="main-page-intro">
<span id="main-page-welcome"><strong>[[Pomoc:Pierwsze kroki|Witaj w Wikipedii]]</strong>,</span>
[[Wikipedia:10 rzeczy, których nie wiedziałeś o Wikipedii|wolnej encyklopedii]], którą [[Wikipedia:Śmiało modyfikuj strony|każdy może redagować]].
Obecnie mamy <strong>[[Wikipedia:Liczba artykułów w polskojęzycznej Wikipedii|{{NUMBEROFARTICLES}}]]</strong> haseł, w tym <strong>{{#expr: {{PAGESINCAT:Artykuły na medal}}+{{PAGESINCAT:Dobre artykuły}}+{{PAGESINCAT:Listy na medal}}-23 }}</strong> [[Wikipedia:Wyróżniona zawartość Wikipedii|wyróżnionych]].
Poznaj [[Wikipedia:Zasady|nasze zasady]]{{•}} [[Pomoc:Wstęp|Testuj wiki!]]
</div>
<div id="main-page-portals">
<span>
[[Portal:Nauki ścisłe i przyrodnicze|Nauki ścisłe i przyrodnicze]]{{•}}
[[Portal:Nauki społeczne i humanistyczne|Nauki społeczne i humanistyczne]]{{•}}
[[Portal:Technika|Technika]]{{•}}
[[Portal:Geografia|Geografia]]{{•}}
[[Portal:Historia|Historia]]{{•}}
[[Portal:Kultura|Kultura]]{{•}}
[[Portal:Społeczeństwo|Społeczeństwo]]{{•}}
[[Portal:Sport|Sport]]{{•}}
[[Portal:Religioznawstwo|Religie]]{{•}}
[[Portal:Polska|Polska]]
</span>
<span>
[[Portal:Portale|Więcej portali]]{{•}}
[[Wikipedia:Indeks haseł|Indeks haseł]]{{•}}
[[Portal:Kategorie Główne|Przegląd kategorii]]
</span>
</div>
<div id="main-page-wiki-events">
{{Wikipedia:Strona główna/Wikiwydarzenia}}
</div>
</div>
<div id="main-page-searchbox">
[[Plik:Ambox blue question.svg|24px|left|link=Pomoc:Wyszukiwarka|alt=Pomoc]]
<inputbox>
type=search
break=no
buttonlabel=Szukaj
placeholder=Podaj szukane hasło, pojęcie lub nazwę artykułu
</inputbox>
</div>
<div class="article" id="main-page-content">
<div id="main-page-column1">
<div class="section" id="main-page-didyouknow">
<h2>[[Plik:PL Wiki CzyWiesz ikona.svg|38px|link=|alt=]] Czy wiesz...</h2>
{{Wikipedia:Strona główna/Czy wiesz|data={{{data|{{#timel:Y-m-d}} }}}}}
</div>
<div class="section" id="main-page-news">
<h2>[[Plik:PL Wiki Aktualnosci ikona.svg|38px|link=|alt=]] Wydarzenia</h2>
{{Wikipedia:Strona główna/Wydarzenia}}
</div>
<div class="section" id="main-page-anniversaries">
<h2>[[Plik:PL Wiki Kalendarium ikona.svg|38px|link=|alt=]] Rocznice</h2>
{{Wikipedia:Strona główna/Rocznice|data={{{data|{{#timel:Y-m-d}} }}}}}
</div>
</div>
<div id="main-page-column2">
<div class="section" id="main-page-featured-article">
<h2>[[Plik:HSUtvald.svg|38px|link=|alt=]] Artykuł na medal</h2>
{{Wikipedia:Strona główna/Artykuł na medal|data={{{data|{{#timel:Y-m-d}} }}}}}
</div>
<div class="section" id="main-page-good-article">
<h2>[[Plik:HSBra.svg|38px|link=|alt=]] Dobry artykuł</h2>
{{Wikipedia:Strona główna/Dobry artykuł|data={{{data|{{#timel:Y-m-d}} }}}}}
</div>
<div class="section" id="main-page-featured-image">
<h2>[[Plik:PL Wiki InM ikona.svg|38px|link=|alt=]] Ilustracja na medal</h2>
{{Wikipedia:Strona główna/Ilustracja na medal|data={{{data|{{#timel:Y-m-d}} }}}}}
</div>
</div>
</div>
<div class="footer" id="main-page-footer">
<div class="section" id="main-page-sister-projects">
<h2>[[Plik:Wikimedia-logo-circle.svg|38px|link=|alt=]] Siostrzane projekty Wikipedii</h2>
{{Siostrzane}}
</div>
<div class="section" id="main-page-wikimedia">
<h2>[[Plik:HSSamarbetecolor.svg|38px|link=|alt=]] Organizacja i promocja Wikimediów</h2>
<div class="main-page-threecol">
[[Plik:Logo_Pnikut.net]]'''[http://www.pnikut.net Pnikut.net]''' - serwis o dawnym Pnikucie
[[Plik:Wikimediapolska-logo.svg|55px|link=wmpl:|Wikimedia Polska]]
'''[[wmpl:|Stowarzyszenie Wikimedia Polska]]''' zajmuje się promocją tworzenia Wikipedii w Polsce.
[[Plik:HSWikimedia.svg|55px|link=meta:Strona główna|Meta-wiki]]
'''[[meta:Strona główna|Meta-Wiki]]''' jest miejscem koordynacji wszystkich projektów Wikimedia.
</div>
<div>
Jeżeli jesteś nowym użytkownikiem Wikipedii, możesz znaleźć pomoc u innych członków społeczności, m.in. u [[Pomoc:Przewodnicy|przewodników]] czy [[Wikipedia:Administratorzy|administratorów]]. Poznaj też inne formy [[Wikipedia:Kontakt z wikipedystami|kontaktu z wikipedystami]].
</div>
</div>
</div>
<div class="section" id="main-page-for-editors">
<div class="footer">
Zobacz też:
[[Wikipedia:Strona główna/Jutro|Strona główna na jutro]] •
[[Wikipedia:Strona główna/Dokumentacja|Dokumentacja]]
</div>
</div>
</div>
</div>
__NOTOC__
__NOEDITSECTION__
[[Kategoria:Strona główna| ]]
7f379aa6f7c74981298a0481cc43f51bc61fba94
440
2014-02-11T23:02:06Z
Ffkapa
2
Utworzono nową stronę "aa"
wikitext
text/x-wiki
aa
e0c9035898dd52fc65c41454cec9c4d2611bfb37
Wawrzyniec Czuryło
0
622
1121
2019-11-17T00:46:27Z
Ffkapa
2
Utworzono nową stronę "'''Wawrzyniec Czuryło''' - [[Mapa dawnego Pnikuta|dom nr. 13]] == Rodzina == Wawrzyniec Czuryło Wawrzyniec, (brat Walentego) i żona Franciszka Radek (siostra Katarzyn..."
wikitext
text/x-wiki
'''Wawrzyniec Czuryło''' - [[Mapa dawnego Pnikuta|dom nr. 13]]
== Rodzina ==
Wawrzyniec Czuryło Wawrzyniec, (brat Walentego) i żona Franciszka Radek (siostra Katarzyny, żony Walentego)
== Dzieje rodziny ==
* Bracia Walenty i Wawrzyniec mieli za żony siostry Katarzynę i Franciszkę Radek z Tamanowic. W ich domu mieściła się mleczarnia.
* Syn Wawrzyńca Franciszek (1906) z żoną Bronisławą (1911) córką Sebastiana Miśniaka (przyd. „Sobek”), mieli dzieci: Helena (1931), Janina (1933).
* Po śmierci męża Franciszka, Bronisława wyszła za mąż za Mikołaja Muszaka z Dolniego, syna Mateusza i urodził się im syn Jan (1946r.).
* Helena wyszła za mąż za Jana Mosunia.
* Janina wyszła za mąż za Pielucha Zdzisława (1931) syna Jana i Anieli zd. Milan.
* Bronisława zostawia najstarszej córce Helenie dom i z synem Janem przenosi się do rodziców zmarłego, drugiego męża Mikołaja na Dolnie.
* W 1970 roku Bronisława z synem Janem wyjeżdża do Polski, do Zabrza.
* W 1966 roku Janina z mężem też wyjechała do Polski, do Paczkowa, gdzie mieszka nadal po śmierci męża Zdzisława. Ich dzieci: Zygmunt (1957), Bogusława (1960), Danuta (1963).
* Helena z mężem również wyjechali do Polski.Do Bytomia i tam zmarła.
* Ojciec Bronisławy: Sebastian Miśniak ze Średniego, drugi dom od Starego cmentarza, matka Wiktoria
[[Kategoria:Urodzeni w Pnikucie]]
[[Kategoria:Czuryłowie]]
d4d75113aa126c34dcf79cdf119f16ad2845cdbc
Dyskusja:Jan Miśniak
1
16
386
29
2014-02-08T21:41:31Z
Ffkapa
2
wikitext
text/x-wiki
{{Info_Wikipedia}}
b9f643b6c8824ca4b87a647730d71df926355122
29
2014-01-15T15:25:29Z
Ffkapa
2
Utworzono nową stronę "{{Szablon:Info_Wikipedia}}"
wikitext
text/x-wiki
{{Szablon:Info_Wikipedia}}
c0f99cbc207319fb77079ae259675f3a5d504f1b
Dyskusja:Jerzy Ablewicz
1
179
516
2014-02-17T20:24:40Z
Ffkapa
2
info
wikitext
text/x-wiki
{{Info_Wikipedia}}
b9f643b6c8824ca4b87a647730d71df926355122
Użytkownik:Ffkapa
2
30
91
86
2014-01-16T12:14:43Z
Ffkapa
2
UWAGA! Usunięcie treści (strona pozostała pusta)!
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
86
2014-01-16T01:40:11Z
Ffkapa
2
Utworzono nową stronę "[[/My sandbox/]]"
wikitext
text/x-wiki
[[/My sandbox/]]
319bb9abfd82479da66b243af25430966ad7cf2c
Użytkownik:Kazik
2
196
551
550
2014-03-09T19:43:12Z
Kazik
1
Zabezpieczono "[[Użytkownik:Kazik]]" ([edytowanie=Dozwolone tylko dla administratorów] (na zawsze) [przenoszenie=Dozwolone tylko dla administratorów] (na zawsze)) [dziedziczenie]
wikitext
text/x-wiki
Ja tylko pilnuję porządku, raczej nie edytuję...
Pozdrawiam wszystkich!
019f42569ba0abe37768260365096c3a9e6d6513
550
2014-03-09T19:42:26Z
Kazik
1
nowa
wikitext
text/x-wiki
Ja tylko pilnuję porządku, raczej nie edytuję...
Pozdrawiam wszystkich!
019f42569ba0abe37768260365096c3a9e6d6513
Użytkownik:Użytkownik usunięty
2
193
579
548
2014-03-12T23:39:05Z
Ffkapa
2
red
wikitext
text/x-wiki
Tutaj lądują wszyscy, którzy zajrzeli do nas dla żartu, no cóż pośmialiśmy się i starczy...
d4a6d70608a8b9aa1665eb2e29adf53fef6b6536
548
546
2014-03-09T19:40:14Z
Kazik
1
Kazik przeniósł stronę [[Użytkownik:Testowy 2]] do [[Użytkownik:Użytkownik usunięty]]: Automatyczne przeniesiono stronę po zmianie nazwy konta z "[[User:Testowy 2|Testowy 2]]" na "[[User:Użytkownik usunięty|Użytkownik usunięty]]"
wikitext
text/x-wiki
Użytkownik testowy
acc5183f19b484f3c13f0dc47ac1c53c0ca1b948
546
2014-03-09T18:58:37Z
Kazik
1
b
wikitext
text/x-wiki
Użytkownik testowy
acc5183f19b484f3c13f0dc47ac1c53c0ca1b948
Dyskusja użytkownika:Andrzejak
3
100
262
2014-01-16T23:59:01Z
Ffkapa
2
Ffkapa przeniósł stronę [[Dyskusja użytkownika:Andrzejak]] do [[Dyskusja:Andrzejak]]
wikitext
text/x-wiki
#PATRZ [[Dyskusja:Andrzejak]]
7cf75d3522b0c620ab6b5a1e1c187a114dd095e3
Dyskusja użytkownika:Ffkapa
3
96
552
352
2014-03-09T19:49:29Z
Kazik
1
UWAGA! Usunięcie treści (strona pozostała pusta)!
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
352
351
2014-01-17T14:21:38Z
Ffkapa
2
Wycofano edycje użytkownika [[Special:Contributions/Kazik|Kazik]] ([[User talk:Kazik|dyskusja]]). Autor przywróconej wersji to [[User:Ffkapa|Ffkapa]].
wikitext
text/x-wiki
== [[:Andrzejak|Andrzejak]] ==
Witaj. Twój artykuł nie nadaje się jeszcze do publikacji w Wikipedii, dlatego został przeniesiony do twojego brudnopisu [[Użytkownik:Ffkapa/Andrzejak]], gdzie możesz nad nim popracować. Należy w nim poprawić:
* ...
* ...
* ...
Po skończeniu użyj [[Pomoc:Zmiana nazwy strony|zakładki przenieś]], aby opublikować go ponownie. Jeżeli nie możesz przenieść samodzielnie (należy mieć konto zarejestrowane od co najmniej 4 dni oraz 10 edycji), zwróć się do dowolnego bardziej zaawansowanego wikipedysty lub do [[WP:PdA|administratorów]]. Pozdrawiam, [[Użytkownik:Ffkapa|Ffkapa]] ([[Dyskusja użytkownika:Ffkapa|dyskusja]]) 00:55, 17 sty 2014 (CET)
5fe9228921f6101a84d993512cf3d063680186b1
351
254
2014-01-17T14:19:33Z
Kazik
1
/* próba */ nowa sekcja
wikitext
text/x-wiki
== [[:Andrzejak|Andrzejak]] ==
Witaj. Twój artykuł nie nadaje się jeszcze do publikacji w Wikipedii, dlatego został przeniesiony do twojego brudnopisu [[Użytkownik:Ffkapa/Andrzejak]], gdzie możesz nad nim popracować. Należy w nim poprawić:
* ...
* ...
* ...
Po skończeniu użyj [[Pomoc:Zmiana nazwy strony|zakładki przenieś]], aby opublikować go ponownie. Jeżeli nie możesz przenieść samodzielnie (należy mieć konto zarejestrowane od co najmniej 4 dni oraz 10 edycji), zwróć się do dowolnego bardziej zaawansowanego wikipedysty lub do [[WP:PdA|administratorów]]. Pozdrawiam, [[Użytkownik:Ffkapa|Ffkapa]] ([[Dyskusja użytkownika:Ffkapa|dyskusja]]) 00:55, 17 sty 2014 (CET)
== próba ==
[[Użytkownik:Kazik|Kazik]] ([[Dyskusja użytkownika:Kazik|dyskusja]]) 15:19, 17 sty 2014 (CET)
51b42094a4fed9df3193d6d61c5dd6eb6546109b
254
2014-01-16T23:55:57Z
Ffkapa
2
/* Andrzejak */ nowa sekcja
wikitext
text/x-wiki
== [[:Andrzejak|Andrzejak]] ==
Witaj. Twój artykuł nie nadaje się jeszcze do publikacji w Wikipedii, dlatego został przeniesiony do twojego brudnopisu [[Użytkownik:Ffkapa/Andrzejak]], gdzie możesz nad nim popracować. Należy w nim poprawić:
* ...
* ...
* ...
Po skończeniu użyj [[Pomoc:Zmiana nazwy strony|zakładki przenieś]], aby opublikować go ponownie. Jeżeli nie możesz przenieść samodzielnie (należy mieć konto zarejestrowane od co najmniej 4 dni oraz 10 edycji), zwróć się do dowolnego bardziej zaawansowanego wikipedysty lub do [[WP:PdA|administratorów]]. Pozdrawiam, [[Użytkownik:Ffkapa|Ffkapa]] ([[Dyskusja użytkownika:Ffkapa|dyskusja]]) 00:55, 17 sty 2014 (CET)
5fe9228921f6101a84d993512cf3d063680186b1
Dyskusja użytkownika:Ffkapa/Andrzejak
3
98
258
2014-01-16T23:57:54Z
Ffkapa
2
Ffkapa przeniósł stronę [[Dyskusja użytkownika:Ffkapa/Andrzejak]] do [[Dyskusja użytkownika:Andrzejak]]
wikitext
text/x-wiki
#PATRZ [[Dyskusja użytkownika:Andrzejak]]
d1fa0eb2f323a73b17293b33607a707226dabc7c
Dyskusja użytkownika:Użytkownik usunięty
3
576
1046
1044
2014-12-26T21:16:26Z
Kazik
1
Kazik przeniósł stronę [[Dyskusja użytkownika:RoseYAFvrrzrznbq]] do [[Dyskusja użytkownika:Użytkownik usunięty]]: Automatyczne przeniesiono stronę po zmianie nazwy konta z "[[User:RoseYAFvrrzrznbq|RoseYAFvrrzrznbq]]" na "[[User:Użytkownik usun...
wikitext
text/x-wiki
Hi! <br>My name is Sheryl and I'm a 30 years old girl from Corcelles-Pres-Payerne.<br><br>Also visit my web-site ... tefal juicer - [http://encyclopedia-galactica.org/spacecadets/blog/view/3265/jc-penney-relaunching-home-goods-section encyclopedia-galactica.org],
beb8166741ee4636e6b76047c7cbad4e2f5bbcc5
1044
2014-12-26T20:22:06Z
Użytkownik usunięty
9
Utworzono nową stronę "Hi! <br>My name is Sheryl and I'm a 30 years old girl from Corcelles-Pres-Payerne.<br><br>Also visit my web-site ... tefal juicer - [http://encyclopedia-galactica.org/sp..."
wikitext
text/x-wiki
Hi! <br>My name is Sheryl and I'm a 30 years old girl from Corcelles-Pres-Payerne.<br><br>Also visit my web-site ... tefal juicer - [http://encyclopedia-galactica.org/spacecadets/blog/view/3265/jc-penney-relaunching-home-goods-section encyclopedia-galactica.org],
beb8166741ee4636e6b76047c7cbad4e2f5bbcc5
My wiki:Administratorzy
4
184
535
533
2014-03-02T11:49:59Z
Ffkapa
2
wikitext
text/x-wiki
'''Administratorzy''' – użytkownicy którzy oprócz edycji haseł zajmują się porządkowaniem Wiki.Pnikuczanie i usuwaniem ewentualnych wandalizmów, wygłupów czy żartów. W chwili obecnej administratorem można zostać na wniosek (mail na poczta@pnikut.net) w przyszłości będzie to funkcja wybieralna. Administratorzy służą również pomocą w edytowaniu Wikipedii.
== Uprawnienia administratorów ==
Administratorzy mają możliwość:
* edycji stron całkowicie zabezpieczonych i przenoszenia stron zabezpieczonych przed przeniesieniem;
* zmiany stopnia zabezpieczenia strony;
* ukrycie rewertu ze strony Ostatnich zmian:
* przeglądania historii usuniętych stron i usuniętego wkładu użytkownika;
* usuwania i przywracania stron;
* blokowania i odblokowywania adresów IP, zakresów i zalogowanych użytkowników;
* zabezpieczania grafik przed wyświetlaniem w artykułach (pojawia się jedynie link do grafiki).
-----
→ Zobacz też: [[Specjalna:Uprawnienia grup użytkowników|Uprawnienia grup użytkowników]]<br>
[[Kategoria:Grupy użytkowników|Administratorzy]]
afba246b95333417cac1c0bd08e1114071d5b573
533
2014-03-02T11:45:06Z
Ffkapa
2
Nowa strona informacyjna
wikitext
text/x-wiki
'''Administratorzy''' – użytkownicy którzy oprócz edycji haseł zajmują się porządkowaniem Wiki.Pnikuczanie i usuwaniem ewentualnych wandalizmów, wygłupów czy żartów. W chwili obecnej administratorem można zostać na wniosek (mail na poczta@pnikut.net) w przyszłości będzie to funkcja wybieralna. Administratorzy służą również pomocą w edytowaniu Wikipedii.
== Uprawnienia administratorów ==
Administratorzy mają możliwość:
* edycji stron całkowicie zabezpieczonych i przenoszenia stron zabezpieczonych przed przeniesieniem;
* zmiany stopnia zabezpieczenia strony;
* ukrycie rewertu ze strony Ostatnich zmian:
* przeglądania historii usuniętych stron i usuniętego wkładu użytkownika;
* usuwania i przywracania stron;
* blokowania i odblokowywania adresów IP, zakresów i zalogowanych użytkowników;
* zabezpieczania grafik przed wyświetlaniem w artykułach (pojawia się jedynie link do grafiki).
-----
→ Zobacz też: [[Specjalna:Uprawnienia grup użytkowników|Uprawnienia grup użytkowników]]<br>
9f37f8baef06662f93bfb5cc52eb44b023ed9486
My wiki:Biurokraci
4
186
536
2014-03-02T12:01:06Z
Ffkapa
2
Nowa strona
wikitext
text/x-wiki
'''Biurokraci''' – [[My Wiki:Administratorzy|administratorzy]], którzy mają dodatkowe uprawnienia, m.in. do nadawania uprawnień administratora i biurokraty. Biurokraci nie są zwierzchnikami administratorów. Podobnie jak pozostali administratorzy, biurokraci nie mają dodatkowych uprawnień, jeśli chodzi o zawartość merytoryczną Wiki.Pnikuczanie.
== Uprawnienia biurokratów ==
Biurokraci mają możliwość:
* zmiany nazwy użytkownika;
* ukrywania aktywności użytkownika;
* nadania uprawnień: administratora, biurokraty;
* odbierania uprawnień niektórych uprawnień.<br>
-----
→ Zobacz też: [[Specjalna:Uprawnienia grup użytkowników|Uprawnienia grup użytkowników]]<br>
[[Kategoria:Grupy użytkowników|Biurokraci]]
59c217730b9aa903c2ce5bbe26e8456b7602549a
My wiki:Sandbox
4
29
85
2014-01-16T01:11:33Z
Ffkapa
2
Utworzono nową stronę "{{Please leave this line alone and write below (this is the coloured heading)}}"
wikitext
text/x-wiki
{{Please leave this line alone and write below (this is the coloured heading)}}
c93ca36ba54667802fc88e0f2141bc0c97732abc
Plik:Ambox blue.png
6
590
1067
2018-04-03T08:53:27Z
Kazik
1
ikona_1
wikitext
text/x-wiki
ikona_1
1fb926a416b3cc5f8969551a58d28396d56fffd2
Plik:DSC00351.JPG
6
141
356
355
2014-01-17T15:54:45Z
Ffkapa
2
wikitext
text/x-wiki
== Opis ==
Pnikut_Droga do Radenic.
== Licencja ==
{{self|cc-by-sa-3.0}}
c57f9f25d4d052cf9687266774eabdf994feaeed
355
2014-01-17T15:52:41Z
Ffkapa
2
wikitext
text/x-wiki
== Licencja ==
{{self|cc-by-sa-3.0}}
9c9ac0f9adec8fa2842c17cc041640f5689d8c91
Plik:DSC00361 1.jpg
6
163
457
2014-02-14T23:06:10Z
Ffkapa
2
wikitext
text/x-wiki
== Licencja ==
{{cc-by-sa-3.0}}
96c22ce7775015380b9c6365441f5129d227bcd8
Plik:Logo Pnikut.net.png
6
161
672
522
2014-03-21T22:25:17Z
Ffkapa
2
red
wikitext
text/x-wiki
== Opis ==
Logo serwisu www.pnikut.net
== Licencja ==
{{self|cc-by-nc-sa-3.0}}
de12b5ee631792ce1a9a817cea994d0c6554deb8
522
454
2014-02-22T21:54:18Z
Ffkapa
2
wikitext
text/x-wiki
== Opis ==
Logo serwisu www.pnikut.net
== Licencja ==
{{self|cc-by-sa-3.0}}
b712d50e6dc893b0d5e12343abdf17e9f2169fd4
454
453
2014-02-14T22:40:11Z
Ffkapa
2
Ffkapa przeniósł stronę [[Plik:Logo.png]] do [[Plik:Logo Pnikut.net.png]]
wikitext
text/x-wiki
== Opis ==
Logo serwisu www.pnikut.net
== Licencja ==
{{cc-by-sa-3.0}}
f160fb5e4ffe92f5231ed0b41685dcd93e24a388
453
2014-02-14T22:32:31Z
Ffkapa
2
Logo serwisu www.pnikut.net
wikitext
text/x-wiki
== Opis ==
Logo serwisu www.pnikut.net
== Licencja ==
{{cc-by-sa-3.0}}
f160fb5e4ffe92f5231ed0b41685dcd93e24a388
Plik:Pnikut, Jan Miśniak.jpg
6
587
1059
2018-04-03T07:58:08Z
Ffkapa
2
wikitext
text/x-wiki
== Licencja ==
{{cc-by-sa-3.0}}
96c22ce7775015380b9c6365441f5129d227bcd8
Plik:Pnikut, kapliczka na miejscu starego kościoła.jpg
6
591
1068
2018-04-03T08:56:28Z
Kazik
1
Kapliczka na miejscu starego kościoła
wikitext
text/x-wiki
Kapliczka na miejscu starego kościoła
54b9b4e497f114ee5d8fb4a30c5f0bbb5ef7caa6
Plik:Pnikut, kościół św. Mikołaja.jpg
6
589
1063
1062
2018-04-03T08:17:40Z
Ffkapa
2
Ffkapa przesłano nową wersję pliku „[[Plik:Pnikut, kościół św. Mikołaja.jpg]]“
wikitext
text/x-wiki
== Opis ==
Kościół w Pnikucie
== Licencja ==
{{cc-by-sa-3.0}}
c51d753ddd450fd13303ae415f2c6ce58e57d3d7
1062
2018-04-03T08:17:21Z
Ffkapa
2
Kościół w Pnikucie
wikitext
text/x-wiki
== Opis ==
Kościół w Pnikucie
== Licencja ==
{{cc-by-sa-3.0}}
c51d753ddd450fd13303ae415f2c6ce58e57d3d7
Plik:Pnikut, nagrobek Jana Miđniaka.jpg
6
588
1060
2018-04-03T08:05:55Z
Ffkapa
2
wikitext
text/x-wiki
== Licencja ==
{{cc-by-sa-3.0}}
96c22ce7775015380b9c6365441f5129d227bcd8
MediaWiki:Gadget-DRN-wizard
8
54
142
141
2014-01-16T15:52:53Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Form for filing disputes at the [[WP:DRN|dispute resolution noticeboard]]
d88f6a20fcbb2f02656105bf56445937a1dded50
141
2012-07-26T22:40:46Z
Thehelpfulone
0
create
wikitext
text/x-wiki
Form for filing disputes at the [[WP:DRN|dispute resolution noticeboard]]
d88f6a20fcbb2f02656105bf56445937a1dded50
MediaWiki:Gadget-DRN-wizard-loader.js
8
55
144
143
2014-01-16T15:52:53Z
Ffkapa
2
1 wersja
javascript
text/javascript
if ( mw.config.get('wgPageName') === 'Wikipedia:Dispute_resolution_noticeboard/request' ) {
importScript( 'MediaWiki:Gadget-DRN-wizard.js' );
}
5f759e514db0ad0c4b0cd1c0d870aca7badf87e0
143
2012-07-26T23:05:30Z
Thehelpfulone
0
fix page name
javascript
text/javascript
if ( mw.config.get('wgPageName') === 'Wikipedia:Dispute_resolution_noticeboard/request' ) {
importScript( 'MediaWiki:Gadget-DRN-wizard.js' );
}
5f759e514db0ad0c4b0cd1c0d870aca7badf87e0
MediaWiki:Gadget-Extra-tabs
8
78
193
192
2014-01-16T16:37:01Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Dodatkowe zakładki do narzędzi związanych z grafikami, widoczne na stronach kategorii, wikipedystów i plików.
e99200b06d6ed8cb1a0fc7e355ed158c3c887868
192
2013-02-07T19:27:27Z
Rzuwig
0
int.
wikitext
text/x-wiki
Dodatkowe zakładki do narzędzi związanych z grafikami, widoczne na stronach kategorii, wikipedystów i plików.
e99200b06d6ed8cb1a0fc7e355ed158c3c887868
MediaWiki:Gadget-Extra-tabs.js
8
79
195
194
2014-01-16T16:37:01Z
Ffkapa
2
1 wersja
javascript
text/javascript
/* <source lang="javascript"> Top of Javascript */
/* tooltips and access keys */
// ==========================================================================
// BEGIN: MediaWiki interface button definition for Duesentrieb's image tools:
// "Check usage", "User image gallery", "Orphaned images of user" and
// "Untagged images of user".
// If you are located at an "Image:" you get the "check usage" tab, if you
// are at a "User:" page you get the "gallery", "orphans" and "untagged" tab.
// If you are on other pages these tabs do not get shown. These functions are
// enabled in Wikimedia Commons by default via [[Mediawiki:Monobook.js]] and
// its local language subpages.
// This script has been tested with Konqueror 3.5 and Firefox 1.5 and other
// browsers including Opera and Internet Explorer have been reported to work
// as well. If you enhance or change this template please test it previous to
// editing here in your local monobook.js with as many as possible browsers
// (in order not to clash with the function names here change in your local
// monobook.js all "global_" to "local_").
// Be aware that the global JavaScripts do not get updated by the Wikimedia
// servers that fast after saving them.
// written by Dbenbenn, Avatar, Duesentrieb and Arnomane
// corrections: Maciej Jaros (pl:User:Nux), Beau (pl:User:Beau), Leafnode (pl:User:Leafnode)
// project URL without protocol handler
var tab_project = wgServer.replace(/^(?:https?:)?\/\//, "");
// Translations (variables for internationalisation and localisation):
// namespace names (there is only wgCanonicalNamespace variable; although not a
// problem for Commons but for non-english wikis, we make it easier for them
// reusing the script with these variables)
var tab_ns_image = 'Plik:';
var tab_ns_user = 'Wikipedysta:';
var tab_ns_special = 'Specjalna:';
var tab_ns_category = 'Kategoria:';
// Interface strings, translations get defined in the MediaWiki:Extra-tabs.js/<ISO-Code> sub pages, see below
var tab_check_usage = 'wykorzystanie';
var tab_categorize = 'kategoryzacja';
var tab_log = 'log';
var tab_gallery = 'galeria';
var tab_orphans = 'nieużywane';
var tab_untagged = 'bez licencji';
var tab_tree = 'drzewo';
var tab_catscan = 'CatScan';
var tab_stubs = 'zalążki';
// Appends a new tab.
function global_append_tab(url, name, id)
{
var na = document.createElement('a');
na.setAttribute('href', url);
var txt = document.createTextNode(name);
na.appendChild(txt);
var li = document.createElement('li');
if(id) li.id = id;
// Grab the element we want to append the tab and append the tab to it.
var c1 = document.getElementById('column-one');
if (!c1) {
// Vector
var nspan = document.createElement('span');
nspan.appendChild(na)
li.appendChild(nspan);
var c1 = document.getElementById('left-navigation');
} else {
li.appendChild(na);
}
var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];
tabs.appendChild(li);
}
function global_add_image_tabs(imagetitle)
{
global_append_tab('//toolserver.org/~daniel/WikiSense/CheckUsage.php?i=' + imagetitle + '&w=_100000', tab_check_usage, 'ca-checkusage');
global_append_tab('//toolserver.org/~daniel/WikiSense/CommonSense.php?i=' + imagetitle + '&go-clean=yes' , tab_categorize, 'ca-commonsense');
global_append_tab('/w/index.php?title=' + tab_ns_special + 'Log&page=' + tab_ns_image + imagetitle, tab_log, 'ca-log');
// Add an "unthumb" link. For Image:123px-Foo, links to Image:Foo.
if (imagetitle.match(/^\d+px-/))
{
// imagetitle = imagetitle.substring(imagetitle.indexOf("px-") + 3);
imagetitle = imagetitle.replace(/^\d+px-/, '');
global_append_tab('/wiki/Image:' + imagetitle, 'unthumb', 'ca-unthumb');
}
}
function global_add_user_tabs(username)
{
// removing subpages from the link
// username.split("/")[0] works equally well
// username = username.replace(/\/.*$/, '');
username = username.split("/")[0];
global_append_tab('//toolserver.org/~daniel/WikiSense/Gallery.php?wiki=' + tab_project + '&img_user_text=' + username , tab_gallery, 'ca-gallery');
// global_append_tab('//toolserver.org/~daniel/WikiSense/OrphanImages.php?wiki=' + tab_project + '&img_user_text=' + username , tab_orphans, 'ca-orphans');
global_append_tab('//toolserver.org/~daniel/WikiSense/UntaggedImages.php?wiki=' + tab_project + '&img_user_text=' + username , tab_untagged, 'ca-untagged');
}
function global_add_category_tabs(category)
{
global_append_tab('/wiki/Special:CategoryTree?target=' + category + '&mode=categories&dotree=Laden', tab_tree);
global_append_tab('//toolserver.org/~daniel/WikiSense/CategoryIntersect.php?wiki=' + tab_project + '&basecat=' + category , tab_catscan, 'ca-catscan');
global_append_tab('//toolserver.org/~daniel/WikiSense/CategoryIntersect.php?basecat=' + category + '&basedeep=2&mode=ts&templates=stub&go=Skanuj&userlang=pl&wikilang=pl&wikifam=.wikipedia.org', tab_stubs, 'ca-catscan-stubs');
}
// On Special:Contributions, we add the user tabs just like for a user page.
function global_add_special_tabs()
{
if (wgCanonicalSpecialPageName == "Contributions")
{
var username = document.getElementById('contentSub').getElementsByTagName('a')[0].firstChild.nodeValue;
// Plain username, without "User:"! And encode it.
global_add_user_tabs(encodeURIComponent (username));
}
}
function global_do_onload()
{
// title without namespace name. Replacing blanks by underscores
// is just for beautifying the resulting URL a little bit. The
// critical part is the call to encodeURIComponent. Without this
// call, file or user names with "&" in the name won't work, because
// the ampersand is a parameter delimiter!
var title = encodeURIComponent (wgTitle.split (" ").join ("_"));
// Namespace numbers are (see [[m:Help:Variables]]):
// -1: Special
// 2: User
// 3: User_talk
// 6: Image
// 7: Image_talk
// 14: Category
switch(wgNamespaceNumber)
{
case -1:
global_add_special_tabs();
break;
case 2:
case 3:
global_add_user_tabs(title);
break;
case 6:
case 7:
global_add_image_tabs(title);
break;
case 14:
global_add_category_tabs(title);
break;
default:
// nothing
}
}
/* tylko dla monobooka, tak jak było dotąd */
if (skin == "monobook") {
jQuery( global_do_onload );
}
// END: MediaWiki interface button definition for Duesentrieb's image tools.
// ========================================================================
/* Bottom of Javascript </source> */
4edaf93d8a3ad62ec2ce13f06f430ac7fcba871f
194
2014-01-03T08:29:22Z
Leafnode
0
Poprawka markupu dla Vectora
javascript
text/javascript
/* <source lang="javascript"> Top of Javascript */
/* tooltips and access keys */
// ==========================================================================
// BEGIN: MediaWiki interface button definition for Duesentrieb's image tools:
// "Check usage", "User image gallery", "Orphaned images of user" and
// "Untagged images of user".
// If you are located at an "Image:" you get the "check usage" tab, if you
// are at a "User:" page you get the "gallery", "orphans" and "untagged" tab.
// If you are on other pages these tabs do not get shown. These functions are
// enabled in Wikimedia Commons by default via [[Mediawiki:Monobook.js]] and
// its local language subpages.
// This script has been tested with Konqueror 3.5 and Firefox 1.5 and other
// browsers including Opera and Internet Explorer have been reported to work
// as well. If you enhance or change this template please test it previous to
// editing here in your local monobook.js with as many as possible browsers
// (in order not to clash with the function names here change in your local
// monobook.js all "global_" to "local_").
// Be aware that the global JavaScripts do not get updated by the Wikimedia
// servers that fast after saving them.
// written by Dbenbenn, Avatar, Duesentrieb and Arnomane
// corrections: Maciej Jaros (pl:User:Nux), Beau (pl:User:Beau), Leafnode (pl:User:Leafnode)
// project URL without protocol handler
var tab_project = wgServer.replace(/^(?:https?:)?\/\//, "");
// Translations (variables for internationalisation and localisation):
// namespace names (there is only wgCanonicalNamespace variable; although not a
// problem for Commons but for non-english wikis, we make it easier for them
// reusing the script with these variables)
var tab_ns_image = 'Plik:';
var tab_ns_user = 'Wikipedysta:';
var tab_ns_special = 'Specjalna:';
var tab_ns_category = 'Kategoria:';
// Interface strings, translations get defined in the MediaWiki:Extra-tabs.js/<ISO-Code> sub pages, see below
var tab_check_usage = 'wykorzystanie';
var tab_categorize = 'kategoryzacja';
var tab_log = 'log';
var tab_gallery = 'galeria';
var tab_orphans = 'nieużywane';
var tab_untagged = 'bez licencji';
var tab_tree = 'drzewo';
var tab_catscan = 'CatScan';
var tab_stubs = 'zalążki';
// Appends a new tab.
function global_append_tab(url, name, id)
{
var na = document.createElement('a');
na.setAttribute('href', url);
var txt = document.createTextNode(name);
na.appendChild(txt);
var li = document.createElement('li');
if(id) li.id = id;
// Grab the element we want to append the tab and append the tab to it.
var c1 = document.getElementById('column-one');
if (!c1) {
// Vector
var nspan = document.createElement('span');
nspan.appendChild(na)
li.appendChild(nspan);
var c1 = document.getElementById('left-navigation');
} else {
li.appendChild(na);
}
var tabs = c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];
tabs.appendChild(li);
}
function global_add_image_tabs(imagetitle)
{
global_append_tab('//toolserver.org/~daniel/WikiSense/CheckUsage.php?i=' + imagetitle + '&w=_100000', tab_check_usage, 'ca-checkusage');
global_append_tab('//toolserver.org/~daniel/WikiSense/CommonSense.php?i=' + imagetitle + '&go-clean=yes' , tab_categorize, 'ca-commonsense');
global_append_tab('/w/index.php?title=' + tab_ns_special + 'Log&page=' + tab_ns_image + imagetitle, tab_log, 'ca-log');
// Add an "unthumb" link. For Image:123px-Foo, links to Image:Foo.
if (imagetitle.match(/^\d+px-/))
{
// imagetitle = imagetitle.substring(imagetitle.indexOf("px-") + 3);
imagetitle = imagetitle.replace(/^\d+px-/, '');
global_append_tab('/wiki/Image:' + imagetitle, 'unthumb', 'ca-unthumb');
}
}
function global_add_user_tabs(username)
{
// removing subpages from the link
// username.split("/")[0] works equally well
// username = username.replace(/\/.*$/, '');
username = username.split("/")[0];
global_append_tab('//toolserver.org/~daniel/WikiSense/Gallery.php?wiki=' + tab_project + '&img_user_text=' + username , tab_gallery, 'ca-gallery');
// global_append_tab('//toolserver.org/~daniel/WikiSense/OrphanImages.php?wiki=' + tab_project + '&img_user_text=' + username , tab_orphans, 'ca-orphans');
global_append_tab('//toolserver.org/~daniel/WikiSense/UntaggedImages.php?wiki=' + tab_project + '&img_user_text=' + username , tab_untagged, 'ca-untagged');
}
function global_add_category_tabs(category)
{
global_append_tab('/wiki/Special:CategoryTree?target=' + category + '&mode=categories&dotree=Laden', tab_tree);
global_append_tab('//toolserver.org/~daniel/WikiSense/CategoryIntersect.php?wiki=' + tab_project + '&basecat=' + category , tab_catscan, 'ca-catscan');
global_append_tab('//toolserver.org/~daniel/WikiSense/CategoryIntersect.php?basecat=' + category + '&basedeep=2&mode=ts&templates=stub&go=Skanuj&userlang=pl&wikilang=pl&wikifam=.wikipedia.org', tab_stubs, 'ca-catscan-stubs');
}
// On Special:Contributions, we add the user tabs just like for a user page.
function global_add_special_tabs()
{
if (wgCanonicalSpecialPageName == "Contributions")
{
var username = document.getElementById('contentSub').getElementsByTagName('a')[0].firstChild.nodeValue;
// Plain username, without "User:"! And encode it.
global_add_user_tabs(encodeURIComponent (username));
}
}
function global_do_onload()
{
// title without namespace name. Replacing blanks by underscores
// is just for beautifying the resulting URL a little bit. The
// critical part is the call to encodeURIComponent. Without this
// call, file or user names with "&" in the name won't work, because
// the ampersand is a parameter delimiter!
var title = encodeURIComponent (wgTitle.split (" ").join ("_"));
// Namespace numbers are (see [[m:Help:Variables]]):
// -1: Special
// 2: User
// 3: User_talk
// 6: Image
// 7: Image_talk
// 14: Category
switch(wgNamespaceNumber)
{
case -1:
global_add_special_tabs();
break;
case 2:
case 3:
global_add_user_tabs(title);
break;
case 6:
case 7:
global_add_image_tabs(title);
break;
case 14:
global_add_category_tabs(title);
break;
default:
// nothing
}
}
/* tylko dla monobooka, tak jak było dotąd */
if (skin == "monobook") {
jQuery( global_do_onload );
}
// END: MediaWiki interface button definition for Duesentrieb's image tools.
// ========================================================================
/* Bottom of Javascript </source> */
4edaf93d8a3ad62ec2ce13f06f430ac7fcba871f
MediaWiki:Gadget-HotCat
8
38
110
109
2014-01-16T15:16:39Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
[[WP:HOTCAT|HotCat]], easily add / remove / change a category on a page, with name suggestion <small>[[[:File:HotCat.png|example]]]</small>
11bb455b6934937682f65e080f69dff0df4c3186
109
2009-03-01T09:04:15Z
Meno25
0
Image-->File
wikitext
text/x-wiki
[[WP:HOTCAT|HotCat]], easily add / remove / change a category on a page, with name suggestion <small>[[[:File:HotCat.png|example]]]</small>
11bb455b6934937682f65e080f69dff0df4c3186
MediaWiki:Gadget-HotCat.js
8
39
112
111
2014-01-16T15:16:39Z
Ffkapa
2
1 wersja
javascript
text/javascript
window.hotcat_translations_from_commons = true;
/*
This imports the latest version of HotCat from Commons.
HotCat is a gadget to make changes to categories much easier.
Full documentation can be found at http://commons.wikimedia.org/wiki/Help:Gadget-HotCat
*/
mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' );
0131aeec75d8513879d148bdde658abc178cdf97
111
2011-10-01T12:03:17Z
TheDJ
0
protocol relative loading.
javascript
text/javascript
window.hotcat_translations_from_commons = true;
/*
This imports the latest version of HotCat from Commons.
HotCat is a gadget to make changes to categories much easier.
Full documentation can be found at http://commons.wikimedia.org/wiki/Help:Gadget-HotCat
*/
mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' );
0131aeec75d8513879d148bdde658abc178cdf97
MediaWiki:Gadget-Navigation popups
8
72
178
177
2014-01-16T16:23:03Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
[[Wikipedia:Narzędzia/Navigation popups|Navigation popups]] – skrypt wyświetlający miniaturową i uproszczoną stronę po wskazaniu kursorem myszki dowolnego linku wewnętrznego. Oprócz treści wyświetlane jest też menu ułatwiające między innymi przywracanie starych wersji artykułu, czy zostawianie komentarzy użytkownikom.
f23ea6d032cd19c36726fcb3c0f0739c44e4dbfc
177
2009-09-22T19:00:44Z
Beau
0
[[MediaWiki:Gadget-Popups]] przeniesiono do [[MediaWiki:Gadget-Navigation popups]]
wikitext
text/x-wiki
[[Wikipedia:Narzędzia/Navigation popups|Navigation popups]] – skrypt wyświetlający miniaturową i uproszczoną stronę po wskazaniu kursorem myszki dowolnego linku wewnętrznego. Oprócz treści wyświetlane jest też menu ułatwiające między innymi przywracanie starych wersji artykułu, czy zostawianie komentarzy użytkownikom.
f23ea6d032cd19c36726fcb3c0f0739c44e4dbfc
MediaWiki:Gadget-NewImageThumb
8
69
172
171
2014-01-16T16:15:31Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
New image thumb design, for testing before being submitted to core.
ec360c3a84277add737e9c0fc114c41aaa280f48
171
2014-01-11T20:09:02Z
Edokter
0
[[WP:AES|←]]Created page with 'New image thumb design, for testing before being submitted to core.'
wikitext
text/x-wiki
New image thumb design, for testing before being submitted to core.
ec360c3a84277add737e9c0fc114c41aaa280f48
MediaWiki:Gadget-NewImageThumb.css
8
71
176
175
2014-01-16T16:15:31Z
Ffkapa
2
1 wersja
css
text/css
/* _____________________________________________________________________________
* | |
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
* |_____________________________________________________________________________|
*
* New image thumb design
*
* @dependencies none
* @source en.wikipedia.org/wiki/MediaWiki:Gadget-NewImageThumb.css
* @revision 1
* @author: Edokter ([[User:Edokter]])
*/
div.thumbinner {
border-width: 1px;
border-style: solid;
border-color: #E0E0E0 #B1B1B1 #B1B1B1 #E0E0E0;
-moz-box-shadow: 0.25em 0.25em 0.5em rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 0.25em 0.25em 0.5em rgba(0, 0, 0, 0.1);
box-shadow: 0.25em 0.25em 0.5em rgba(0, 0, 0, 0.1);
padding: 0 !important;
}
html .thumbimage {
border: none;
}
96a8114f5dc66ae276a4dcd230e9302654018d7d
175
2014-01-13T10:20:30Z
Edokter
0
CSS was slow to catch up
css
text/css
/* _____________________________________________________________________________
* | |
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
* |_____________________________________________________________________________|
*
* New image thumb design
*
* @dependencies none
* @source en.wikipedia.org/wiki/MediaWiki:Gadget-NewImageThumb.css
* @revision 1
* @author: Edokter ([[User:Edokter]])
*/
div.thumbinner {
border-width: 1px;
border-style: solid;
border-color: #E0E0E0 #B1B1B1 #B1B1B1 #E0E0E0;
-moz-box-shadow: 0.25em 0.25em 0.5em rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 0.25em 0.25em 0.5em rgba(0, 0, 0, 0.1);
box-shadow: 0.25em 0.25em 0.5em rgba(0, 0, 0, 0.1);
padding: 0 !important;
}
html .thumbimage {
border: none;
}
96a8114f5dc66ae276a4dcd230e9302654018d7d
MediaWiki:Gadget-NewImageThumb.js
8
70
174
173
2014-01-16T16:15:31Z
Ffkapa
2
1 wersja
javascript
text/javascript
/* _____________________________________________________________________________
* | |
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
* |_____________________________________________________________________________|
*
* New image thumb design
*
* @dependencies none
* @source en.wikipedia.org/wiki/MediaWiki:Gadget-NewImageThumb.js
* @revision 1
* @author: Edokter ([[User:Edokter]])
*/
mw.hook( 'wikipage.content' ).add( function() {
$( '.thumbinner' ).each( function() {
$( this ).css( 'width', ( parseInt( $( this ).css( 'width' ) ) - 2 ) + 'px' );
} );
} );
4a7a59cdd7c49007a1dd3b151763ac141a5128b9
173
2014-01-11T20:09:04Z
Edokter
0
[[WP:AES|←]]Created page with '/* _____________________________________________________________________________ * |...'
javascript
text/javascript
/* _____________________________________________________________________________
* | |
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
* |_____________________________________________________________________________|
*
* New image thumb design
*
* @dependencies none
* @source en.wikipedia.org/wiki/MediaWiki:Gadget-NewImageThumb.js
* @revision 1
* @author: Edokter ([[User:Edokter]])
*/
mw.hook( 'wikipage.content' ).add( function() {
$( '.thumbinner' ).each( function() {
$( this ).css( 'width', ( parseInt( $( this ).css( 'width' ) ) - 2 ) + 'px' );
} );
} );
4a7a59cdd7c49007a1dd3b151763ac141a5128b9
MediaWiki:Gadget-Popups-strings.js
8
74
182
181
2014-01-16T16:23:03Z
Ffkapa
2
1 wersja
javascript
text/javascript
//////////////////////////////////////////////////
// Translatable strings
//////////////////////////////////////////////////
//
// See instructions at
// http://en.wikipedia.org/wiki/Wikipedia:Tools/Navigation_popups/Translation
var localPopupsInfoPage = '[[' + ( mw.config.get( 'wgDBname' ) == 'plwiki' ? '' : 'w:' ) + 'WP:POP|Popups]]';
popupStrings = {
/////////////////////////////////////
// summary data, searching etc.
/////////////////////////////////////
'article': 'artykuł',
'category': 'kategoria',
'categories': 'kategorie',
'image': 'grafika',
'images': 'grafiki',
'stub': 'zalążek',
'section stub': 'zalążek sekcji',
'Empty page': 'Pusta strona',
'kB': 'kB',
'bytes': 'bajtów',
'day': 'dzień',
'days': 'dni',
'hour': 'godzina',
'hours': 'godziny',
'minute': 'minuta',
'minutes': 'minut',
'second': 'sekunda',
'seconds': 'sekund',
'week': 'tydzień',
'weeks': 'tygodni',
'search': 'szukaj',
'SearchHint': 'Szukaj artykułów zawierających %s',
'web': 'w sieci',
'global': 'xx.wiki',
'globalSearchHint': 'Szukaj %s w różnych wersjach językowych Wikipedii',
'googleSearchHint': 'Szukaj %s w Google',
/////////////////////////////////////
// article-related actions and info
// (some actions also apply to user pages)
/////////////////////////////////////
'actions': 'akcje', ///// view articles and view talk
'popupsMenu': 'popups',
'togglePreviewsHint': 'Zmień sposób generowania podglądu na tej stronie',
'enable previews' : 'włącz podgląd',
'disable previews' : 'wyłącz podgląd',
'toggle previews': 'zmień wyświetlanie podglądu',
'show preview': 'pokaż podgląd',
'reset': 'resetuj',
'more...': 'więcej...',
'disable': 'wyłącz popups',
'disablePopupsHint': 'Wyłącz popups na tej stronie. Przeładuj stronę, żeby włączyć ponownie.',
'historyfeedHint': 'Kanał RSS z ostatnimi zmianami na tej stronie',
'purgePopupsHint': 'Zresetuj popups i wyczyść jego pamięć podręczną.',
'PopupsHint': 'Zresetuj popups i wyczyść jego pamięć podręczną.',
'spacebar': 'spacja',
'view': 'zobacz',
'view article': 'zobacz artykuł',
'viewHint': 'Idź do %s',
'talk': 'dyskusja',
'talk page': 'strona dyskusji',
'this revision': 'tę wersję',
'revision %s of %s': 'wersji %s strony %s',
'Revision %s of %s': 'Wersja %s strony %s',
'the revision prior to revision %s of %s': 'wersja poprzednia w stosunku do wersji %s strony %s',
'Toggle image size': 'Zmień rozmiar obrazka',
'del': 'usuń', ///// delete, protect, move
'delete': 'usuń',
'deleteHint': 'Usuń %s',
'undeleteShort': ' - ',
'UndeleteHint': 'Pokaż historię kasowań strony %s',
'protect': 'zabezpiecz',
'protectHint': 'Zabezpiecz %s',
'unprotectShort': ' - ',
'unprotectHint': 'Przywróć możliwość edycji strony %s przez wszystkich użytkowników',
'move': 'przenieś',
'move page': 'przenieś stronę',
'MovepageHint': 'Przenieś stronę %s na stronę pod innym tytułem',
'edit': 'edytuj', ///// edit articles and talk
'edit article': 'edytuj artykuł',
'editHint': 'Zmień zawartość %s',
'edit talk': 'edytuj dyskusję',
'new': 'nowy',
'new topic': 'nowy temat',
'newSectionHint': 'Dodaj nowy temat (sekcję) w %s',
'null edit': 'pusta edycja',
'nullEditHint': 'Stwórz pustą edycję w %s, nic w nim nie zmieniając ',
'hist': 'hist', ///// history, diffs, editors, related
'history': 'historia',
'historyHint': 'Pokaż historię zmian %s',
'last': 'ost.',
'lastEdit': 'ost. edycja',
'mark patrolled': 'ozn. sprawdzone',
'markpatrolledHint': 'Oznacz tę zmianę jako sprawdzoną',
'show last edit': 'ostatnia edycja',
'Show the last edit': 'Pokaż efekty najnowszej zmiany',
'lastContrib': 'ost. zmiany',
'last set of edits': 'ostatnio zmienione w artykule',
'lastContribHint': 'Pokaż efekt zmian dokonanych przez ostatniego edytującego',
'cur': 'bież',
'diffCur': 'do bieżącej',
'Show changes since revision %s': 'Pokaż zmiany od wersji %s',
'%s old': 'wiek: %s', // as in 4 weeks old (to jest przy czasie od ostatniej edycji)
'oldEdit': 'do wersji',
'purge': 'odśwież',
'purgeHint': 'Zażądaj odświeżenia strony %s',
'raw': 'źródło',
'rawHint': 'Pobierz źródło %s',
'render': 'prosty',
'renderHint': 'Pokaż uproszczoną wersję HTML strony %s',
'Show the edit made to get revision': 'Pokaż zmiany do (tej) wersji',
'sinceMe': 'do mojej',
'changes since mine': 'zmiany od mojej edycji',
'sinceMeHint': 'Pokaż zmiany od mojej ostatniej edycji',
'Couldn\'t find an edit by %s\nin the last %s edits to\n%s': 'Nie można odnaleźć zmiany %s\nw w ostatnich %s edycjach strony\n%s',
'eds': 'aut.',
'editors': 'autorzy',
'editorListHint': 'Pokaż autorów zmian strony %s',
'related': 'dolinkowane',
'relatedChanges': 'zm. dolinkowane',
'related changes': 'zmiany w dolinkowanych',
'RecentchangeslinkedHint': 'Ostatnie zmiany w stronach linkujących do %s',
'editOld': 'edytuj wersję', ///// edit old version, or revert
'rv': 'rv',
'revert': 'revert',
'revertHint': 'Revert do %s',
'defaultpopupRedlinkSummary': localPopupsInfoPage + ': Usuwanie linku do pustej strony [[%s]]',
'defaultpopupFixDabsSummary': localPopupsInfoPage + ': Ujednoznacznienie linku z [[%s]] na [[%s]]',
'defaultpopupFixRedirsSummary': localPopupsInfoPage + ': Zmiana linku ze strony przekierowującej [[%s]] na [[%s]]',
'defaultpopupExtendedRevertSummary': localPopupsInfoPage + ': Przywrócenie wersji autora $2 z dnia $1',
'defaultpopupRevertToPreviousSummary': localPopupsInfoPage + ': Przywrócenie wersji poprzedzającej wersję %s',
'defaultpopupRevertSummary': localPopupsInfoPage + ': Przywrócenie wersji %s',
'defaultpopupQueriedRevertToPreviousSummary': localPopupsInfoPage + ': Przywrócenie wersji poprzedzającej wersję autora $3 z dnia $2',
'defaultpopupQueriedRevertSummary': localPopupsInfoPage + ': Przywrócenie wersji autora $3 z dnia $2',
'defaultpopupRmDabLinkSummary': localPopupsInfoPage + ': Usunięcie linku do strony ujednoznaczniającej [[%s]]',
'Redirects': 'Przekierowanie', // as in Redirects to ...
' to ': ' do ', // as in Redirects to ...
'Bypass redirect': 'Omiń przekierowanie',
'Fix this redirect': 'Napraw to przekierowanie',
'disambig': 'ujednoznacznienie', ///// add or remove dab etc.
'disambigHint': 'Ujednoznacznij ten link do [[%s]]',
'Click to disambiguate this link to:': 'Kliknij, by ujednoznacznić ten link do:',
'remove this link': 'usuń ten link',
'remove all links to this page from this article': 'usuń wszystkie linki do tej strony z tego artykułu',
'remove all links to this disambig page from this article': 'usuń wszystkie linki do tej strony ujednoznaczniającej z tego artykułu',
'mainlink': 'główny link', ///// links, watch, unwatch
'wikiLink': 'wikilink',
'wikiLinks': 'wikilinków',
'links here': 'linkujące',
'whatLinksHere': 'linkujące',
'what links here': 'linkujące',
'WhatlinkshereHint': 'Pokaż listę stron linkujących do %s',
'unwatchShort': ' - ',
'watchThingy': 'obserwuj', // called watchThingy because {}.watch is a function
'watchHint': 'Dodaj stronę %s do listy obserwowanych',
'unwatchHint': 'Usuń stronę %s z listy obserwowanych',
'Only found one editor: %s made %s edits': 'Znaleziono tylko jednego autora: %s wykonał %s zmian',
'%s seems to be the last editor to the page %s': '%s jest ostatnim autorem zmian na stronie %s',
'rss': 'rss',
/////////////////////////////////////
// diff previews
/////////////////////////////////////
'Diff truncated for performance reasons': 'Diff został skrócony, aby przyśpieszyć działanie',
'Old revision': 'Stara wersja',
'New revision': 'Nowa wersja',
'Something went wrong :-(': 'Coś poszło nie tak :-(',
'Empty revision, maybe non-existent': 'Pusta wersja, prawdopodobnie nieistniejąca',
'Unknown date': 'Nieznana data',
/////////////////////////////////////
// other special previews
/////////////////////////////////////
'Empty category': 'Pusta kategoria',
'Category members (%s shown)': 'Należący do kategorii (%s pokazanych)',
'No image links found': 'Nie znaleziono linków do grafik',
'File links': 'Linki do plików',
'No image found': 'Nie znaleziono grafiki',
'Image from Commons': 'Ten plik jest z Wikimedia Commons.',
'Description page': 'Strona opisu',
'Alt text:': 'Alternatywny tekst:',
'revdel':'Usunięta wersja',
/////////////////////////////////////
// user-related actions and info
/////////////////////////////////////
'user': 'użytkownik', ///// user page, talk, email, space
'user page': 'strona',
'user talk': 'dyskusja użytkownika',
'edit user talk': 'edytuj dyskusję użytkownika',
'leave comment': 'zostaw komentarz',
'email': 'e-mail',
'email user': 'wyślij e-mail',
'EmailuserHint': 'Wyślij e-mail do %s',
'space': 'przestrzeń', // short form for userSpace link
'PrefixIndexHint': 'Pokaż strony w przestrzeni użytkownika %s',
'count': 'licznik', ///// contributions, tree, log
'edit counter': 'licznik edycji',
'editCounterLinkHint': 'Licznik edycji użytkownika %s',
'contribs': 'wkład',
'contributions': 'wkład',
'deletedContribs': 'usunięty wkład',
'DeletedcontributionsHint': 'Usunięty wkład użytkownika %s',
'ContributionsHint': 'Pokaż listę edycji użytkownika %s',
'log': 'log',
'user log': 'logi użytkownika',
'userLogHint': 'Pokaż logi użytkownika %s',
'arin': 'szukaj w ARIN', ///// ARIN lookup, block user or IP
'Look up %s in ARIN whois database': 'Szukanie %s w bazie danych whois - ARIN',
'unblockShort': ' - ',
'block': 'blokuj',
'block user': 'blokuj użytkownika',
'IpblocklistHint': 'Odblokuj użytkownika %s',
'BlockipHint': 'Zablokuj możliwość edycji użytkownikowi %s',
'block log': 'logi blokowań',
'blockLogHint': 'Pokaż logi blokowania dla %s',
'protectLogHint': 'Pokaż logi zabezpieczania dla %s',
'pageLogHint': 'Pokaż log strony %s',
'deleteLogHint': 'Pokaż logi kasowania dla %s',
'Invalid %s %s': 'Opcja %s jest nieprawidłowa: %s',
'No backlinks found': 'Nie znaleziono linków powrotnych',
' and more': ' i więcej',
'undo': 'anuluj zmiany',
'undoHint': 'anuluj zmiany dokonane w tej edycji',
'Download preview data': 'Pobierz dane dla podglądu',
'Invalid or IP user': 'Invalid or IP user', //FIXME
'Not a registered username': 'Not a registered username', //FIXME
'BLOCKED': 'ZABLOKOWANY',
' edits since: ': ' edycji od: ',
/////////////////////////////////////
// Autoediting
/////////////////////////////////////
'Enter a non-empty edit summary or press cancel to abort': 'Wypełnij opis zmian albo wciśnij Anuluj, aby zakończyć',
'Failed to get revision information, please edit manually.\n\n': 'Pobranie danych o wersji okazało się niemożliwe – zmień samodzielnie.\n\n',
'The %s button has been automatically clicked. Please wait for the next page to load.': 'Uwaga! Przycisk %s został wciśnięty automatycznie. Proszę czekać na przeładowanie strony.',
'Could not find button %s. Please check the settings in your javascript file.': 'Nie odnaleziono przycisku %s. Proszę sprawdzić ustawienia w swoim pliku JavaScript.',
/////////////////////////////////////
// Popups setup
/////////////////////////////////////
'Open full-size image': 'Otwórz obrazek w wersji pełnoekranowej.',
'zxy': 'zxy'
};
// Poprawiamy parę rzeczy, które działają tylko po angielsku / na angielskiej Wikipedii
var original_setRegexps = setRegexps;
setRegexps = function() {
original_setRegexps();
var sp = nsRe(pg.nsSpecialId);
pg.re.contribs = RegExp('(title=|/)' + sp + '(?:%3A|:)(?:Contributions|Wkład|Wk%C5%82ad|Wk%c5%82ad)' + '(&target=|/|/' + mw.config.get('wgFormattedNamespaces')[pg.nsUserId]+':)(.*)') ;
pg.re.email = RegExp('(title=|/)' + sp + '(?:%3A|:)(?:EmailUser|E-mail)' + '(&target=|/|/(?:' + mw.config.get('wgFormattedNamespaces')[pg.nsUserId]+':)?)(.*)') ;
pg.re.backlinks = RegExp('(title=|/)' + sp + '(?:%3A|:)(?:WhatLinksHere|Linkujące|Linkuj%C4%85ce|Linkuj%c4%85ce)' + '(&target=|/)([^&]*)');
pg.re.stub = /[^\s\S]/; // nic się nie dopasuje
pg.re.disambig = /\{\{([dD]isambig|[uU]jednoznacznienie)\}\}/;
}
9a8522c6ea2be7328c18a0d788b9098c3dedbc20
181
2013-11-11T17:46:06Z
Matma Rex
0
nienawidzę cię
javascript
text/javascript
//////////////////////////////////////////////////
// Translatable strings
//////////////////////////////////////////////////
//
// See instructions at
// http://en.wikipedia.org/wiki/Wikipedia:Tools/Navigation_popups/Translation
var localPopupsInfoPage = '[[' + ( mw.config.get( 'wgDBname' ) == 'plwiki' ? '' : 'w:' ) + 'WP:POP|Popups]]';
popupStrings = {
/////////////////////////////////////
// summary data, searching etc.
/////////////////////////////////////
'article': 'artykuł',
'category': 'kategoria',
'categories': 'kategorie',
'image': 'grafika',
'images': 'grafiki',
'stub': 'zalążek',
'section stub': 'zalążek sekcji',
'Empty page': 'Pusta strona',
'kB': 'kB',
'bytes': 'bajtów',
'day': 'dzień',
'days': 'dni',
'hour': 'godzina',
'hours': 'godziny',
'minute': 'minuta',
'minutes': 'minut',
'second': 'sekunda',
'seconds': 'sekund',
'week': 'tydzień',
'weeks': 'tygodni',
'search': 'szukaj',
'SearchHint': 'Szukaj artykułów zawierających %s',
'web': 'w sieci',
'global': 'xx.wiki',
'globalSearchHint': 'Szukaj %s w różnych wersjach językowych Wikipedii',
'googleSearchHint': 'Szukaj %s w Google',
/////////////////////////////////////
// article-related actions and info
// (some actions also apply to user pages)
/////////////////////////////////////
'actions': 'akcje', ///// view articles and view talk
'popupsMenu': 'popups',
'togglePreviewsHint': 'Zmień sposób generowania podglądu na tej stronie',
'enable previews' : 'włącz podgląd',
'disable previews' : 'wyłącz podgląd',
'toggle previews': 'zmień wyświetlanie podglądu',
'show preview': 'pokaż podgląd',
'reset': 'resetuj',
'more...': 'więcej...',
'disable': 'wyłącz popups',
'disablePopupsHint': 'Wyłącz popups na tej stronie. Przeładuj stronę, żeby włączyć ponownie.',
'historyfeedHint': 'Kanał RSS z ostatnimi zmianami na tej stronie',
'purgePopupsHint': 'Zresetuj popups i wyczyść jego pamięć podręczną.',
'PopupsHint': 'Zresetuj popups i wyczyść jego pamięć podręczną.',
'spacebar': 'spacja',
'view': 'zobacz',
'view article': 'zobacz artykuł',
'viewHint': 'Idź do %s',
'talk': 'dyskusja',
'talk page': 'strona dyskusji',
'this revision': 'tę wersję',
'revision %s of %s': 'wersji %s strony %s',
'Revision %s of %s': 'Wersja %s strony %s',
'the revision prior to revision %s of %s': 'wersja poprzednia w stosunku do wersji %s strony %s',
'Toggle image size': 'Zmień rozmiar obrazka',
'del': 'usuń', ///// delete, protect, move
'delete': 'usuń',
'deleteHint': 'Usuń %s',
'undeleteShort': ' - ',
'UndeleteHint': 'Pokaż historię kasowań strony %s',
'protect': 'zabezpiecz',
'protectHint': 'Zabezpiecz %s',
'unprotectShort': ' - ',
'unprotectHint': 'Przywróć możliwość edycji strony %s przez wszystkich użytkowników',
'move': 'przenieś',
'move page': 'przenieś stronę',
'MovepageHint': 'Przenieś stronę %s na stronę pod innym tytułem',
'edit': 'edytuj', ///// edit articles and talk
'edit article': 'edytuj artykuł',
'editHint': 'Zmień zawartość %s',
'edit talk': 'edytuj dyskusję',
'new': 'nowy',
'new topic': 'nowy temat',
'newSectionHint': 'Dodaj nowy temat (sekcję) w %s',
'null edit': 'pusta edycja',
'nullEditHint': 'Stwórz pustą edycję w %s, nic w nim nie zmieniając ',
'hist': 'hist', ///// history, diffs, editors, related
'history': 'historia',
'historyHint': 'Pokaż historię zmian %s',
'last': 'ost.',
'lastEdit': 'ost. edycja',
'mark patrolled': 'ozn. sprawdzone',
'markpatrolledHint': 'Oznacz tę zmianę jako sprawdzoną',
'show last edit': 'ostatnia edycja',
'Show the last edit': 'Pokaż efekty najnowszej zmiany',
'lastContrib': 'ost. zmiany',
'last set of edits': 'ostatnio zmienione w artykule',
'lastContribHint': 'Pokaż efekt zmian dokonanych przez ostatniego edytującego',
'cur': 'bież',
'diffCur': 'do bieżącej',
'Show changes since revision %s': 'Pokaż zmiany od wersji %s',
'%s old': 'wiek: %s', // as in 4 weeks old (to jest przy czasie od ostatniej edycji)
'oldEdit': 'do wersji',
'purge': 'odśwież',
'purgeHint': 'Zażądaj odświeżenia strony %s',
'raw': 'źródło',
'rawHint': 'Pobierz źródło %s',
'render': 'prosty',
'renderHint': 'Pokaż uproszczoną wersję HTML strony %s',
'Show the edit made to get revision': 'Pokaż zmiany do (tej) wersji',
'sinceMe': 'do mojej',
'changes since mine': 'zmiany od mojej edycji',
'sinceMeHint': 'Pokaż zmiany od mojej ostatniej edycji',
'Couldn\'t find an edit by %s\nin the last %s edits to\n%s': 'Nie można odnaleźć zmiany %s\nw w ostatnich %s edycjach strony\n%s',
'eds': 'aut.',
'editors': 'autorzy',
'editorListHint': 'Pokaż autorów zmian strony %s',
'related': 'dolinkowane',
'relatedChanges': 'zm. dolinkowane',
'related changes': 'zmiany w dolinkowanych',
'RecentchangeslinkedHint': 'Ostatnie zmiany w stronach linkujących do %s',
'editOld': 'edytuj wersję', ///// edit old version, or revert
'rv': 'rv',
'revert': 'revert',
'revertHint': 'Revert do %s',
'defaultpopupRedlinkSummary': localPopupsInfoPage + ': Usuwanie linku do pustej strony [[%s]]',
'defaultpopupFixDabsSummary': localPopupsInfoPage + ': Ujednoznacznienie linku z [[%s]] na [[%s]]',
'defaultpopupFixRedirsSummary': localPopupsInfoPage + ': Zmiana linku ze strony przekierowującej [[%s]] na [[%s]]',
'defaultpopupExtendedRevertSummary': localPopupsInfoPage + ': Przywrócenie wersji autora $2 z dnia $1',
'defaultpopupRevertToPreviousSummary': localPopupsInfoPage + ': Przywrócenie wersji poprzedzającej wersję %s',
'defaultpopupRevertSummary': localPopupsInfoPage + ': Przywrócenie wersji %s',
'defaultpopupQueriedRevertToPreviousSummary': localPopupsInfoPage + ': Przywrócenie wersji poprzedzającej wersję autora $3 z dnia $2',
'defaultpopupQueriedRevertSummary': localPopupsInfoPage + ': Przywrócenie wersji autora $3 z dnia $2',
'defaultpopupRmDabLinkSummary': localPopupsInfoPage + ': Usunięcie linku do strony ujednoznaczniającej [[%s]]',
'Redirects': 'Przekierowanie', // as in Redirects to ...
' to ': ' do ', // as in Redirects to ...
'Bypass redirect': 'Omiń przekierowanie',
'Fix this redirect': 'Napraw to przekierowanie',
'disambig': 'ujednoznacznienie', ///// add or remove dab etc.
'disambigHint': 'Ujednoznacznij ten link do [[%s]]',
'Click to disambiguate this link to:': 'Kliknij, by ujednoznacznić ten link do:',
'remove this link': 'usuń ten link',
'remove all links to this page from this article': 'usuń wszystkie linki do tej strony z tego artykułu',
'remove all links to this disambig page from this article': 'usuń wszystkie linki do tej strony ujednoznaczniającej z tego artykułu',
'mainlink': 'główny link', ///// links, watch, unwatch
'wikiLink': 'wikilink',
'wikiLinks': 'wikilinków',
'links here': 'linkujące',
'whatLinksHere': 'linkujące',
'what links here': 'linkujące',
'WhatlinkshereHint': 'Pokaż listę stron linkujących do %s',
'unwatchShort': ' - ',
'watchThingy': 'obserwuj', // called watchThingy because {}.watch is a function
'watchHint': 'Dodaj stronę %s do listy obserwowanych',
'unwatchHint': 'Usuń stronę %s z listy obserwowanych',
'Only found one editor: %s made %s edits': 'Znaleziono tylko jednego autora: %s wykonał %s zmian',
'%s seems to be the last editor to the page %s': '%s jest ostatnim autorem zmian na stronie %s',
'rss': 'rss',
/////////////////////////////////////
// diff previews
/////////////////////////////////////
'Diff truncated for performance reasons': 'Diff został skrócony, aby przyśpieszyć działanie',
'Old revision': 'Stara wersja',
'New revision': 'Nowa wersja',
'Something went wrong :-(': 'Coś poszło nie tak :-(',
'Empty revision, maybe non-existent': 'Pusta wersja, prawdopodobnie nieistniejąca',
'Unknown date': 'Nieznana data',
/////////////////////////////////////
// other special previews
/////////////////////////////////////
'Empty category': 'Pusta kategoria',
'Category members (%s shown)': 'Należący do kategorii (%s pokazanych)',
'No image links found': 'Nie znaleziono linków do grafik',
'File links': 'Linki do plików',
'No image found': 'Nie znaleziono grafiki',
'Image from Commons': 'Ten plik jest z Wikimedia Commons.',
'Description page': 'Strona opisu',
'Alt text:': 'Alternatywny tekst:',
'revdel':'Usunięta wersja',
/////////////////////////////////////
// user-related actions and info
/////////////////////////////////////
'user': 'użytkownik', ///// user page, talk, email, space
'user page': 'strona',
'user talk': 'dyskusja użytkownika',
'edit user talk': 'edytuj dyskusję użytkownika',
'leave comment': 'zostaw komentarz',
'email': 'e-mail',
'email user': 'wyślij e-mail',
'EmailuserHint': 'Wyślij e-mail do %s',
'space': 'przestrzeń', // short form for userSpace link
'PrefixIndexHint': 'Pokaż strony w przestrzeni użytkownika %s',
'count': 'licznik', ///// contributions, tree, log
'edit counter': 'licznik edycji',
'editCounterLinkHint': 'Licznik edycji użytkownika %s',
'contribs': 'wkład',
'contributions': 'wkład',
'deletedContribs': 'usunięty wkład',
'DeletedcontributionsHint': 'Usunięty wkład użytkownika %s',
'ContributionsHint': 'Pokaż listę edycji użytkownika %s',
'log': 'log',
'user log': 'logi użytkownika',
'userLogHint': 'Pokaż logi użytkownika %s',
'arin': 'szukaj w ARIN', ///// ARIN lookup, block user or IP
'Look up %s in ARIN whois database': 'Szukanie %s w bazie danych whois - ARIN',
'unblockShort': ' - ',
'block': 'blokuj',
'block user': 'blokuj użytkownika',
'IpblocklistHint': 'Odblokuj użytkownika %s',
'BlockipHint': 'Zablokuj możliwość edycji użytkownikowi %s',
'block log': 'logi blokowań',
'blockLogHint': 'Pokaż logi blokowania dla %s',
'protectLogHint': 'Pokaż logi zabezpieczania dla %s',
'pageLogHint': 'Pokaż log strony %s',
'deleteLogHint': 'Pokaż logi kasowania dla %s',
'Invalid %s %s': 'Opcja %s jest nieprawidłowa: %s',
'No backlinks found': 'Nie znaleziono linków powrotnych',
' and more': ' i więcej',
'undo': 'anuluj zmiany',
'undoHint': 'anuluj zmiany dokonane w tej edycji',
'Download preview data': 'Pobierz dane dla podglądu',
'Invalid or IP user': 'Invalid or IP user', //FIXME
'Not a registered username': 'Not a registered username', //FIXME
'BLOCKED': 'ZABLOKOWANY',
' edits since: ': ' edycji od: ',
/////////////////////////////////////
// Autoediting
/////////////////////////////////////
'Enter a non-empty edit summary or press cancel to abort': 'Wypełnij opis zmian albo wciśnij Anuluj, aby zakończyć',
'Failed to get revision information, please edit manually.\n\n': 'Pobranie danych o wersji okazało się niemożliwe – zmień samodzielnie.\n\n',
'The %s button has been automatically clicked. Please wait for the next page to load.': 'Uwaga! Przycisk %s został wciśnięty automatycznie. Proszę czekać na przeładowanie strony.',
'Could not find button %s. Please check the settings in your javascript file.': 'Nie odnaleziono przycisku %s. Proszę sprawdzić ustawienia w swoim pliku JavaScript.',
/////////////////////////////////////
// Popups setup
/////////////////////////////////////
'Open full-size image': 'Otwórz obrazek w wersji pełnoekranowej.',
'zxy': 'zxy'
};
// Poprawiamy parę rzeczy, które działają tylko po angielsku / na angielskiej Wikipedii
var original_setRegexps = setRegexps;
setRegexps = function() {
original_setRegexps();
var sp = nsRe(pg.nsSpecialId);
pg.re.contribs = RegExp('(title=|/)' + sp + '(?:%3A|:)(?:Contributions|Wkład|Wk%C5%82ad|Wk%c5%82ad)' + '(&target=|/|/' + mw.config.get('wgFormattedNamespaces')[pg.nsUserId]+':)(.*)') ;
pg.re.email = RegExp('(title=|/)' + sp + '(?:%3A|:)(?:EmailUser|E-mail)' + '(&target=|/|/(?:' + mw.config.get('wgFormattedNamespaces')[pg.nsUserId]+':)?)(.*)') ;
pg.re.backlinks = RegExp('(title=|/)' + sp + '(?:%3A|:)(?:WhatLinksHere|Linkujące|Linkuj%C4%85ce|Linkuj%c4%85ce)' + '(&target=|/)([^&]*)');
pg.re.stub = /[^\s\S]/; // nic się nie dopasuje
pg.re.disambig = /\{\{([dD]isambig|[uU]jednoznacznienie)\}\}/;
}
9a8522c6ea2be7328c18a0d788b9098c3dedbc20
MediaWiki:Gadget-Popups.css
8
75
184
183
2014-01-16T16:23:03Z
Ffkapa
2
1 wersja
css
text/css
a.popupMoreLink { display: block; text-align: right; cursor: pointer; }
ins.popupDiff { background: #AFE; }
del.popupDiff { background: #FFE6E6; }
#selectionPreview { /* overflow: auto; max-height: 16ex; */
border: 2px solid #DDD;
background-color: #EEF;
padding: 6px;
}
.navpopup
{
border: solid #FFBE20 1px;
background-color: #FFFAEF;
padding: 5px;
font-size: 8pt;
/* opacity: 0.9; */
}
/* Configure Drag bar color */
.popupDrag {
background-color: #FFBE20;
height: 5px;
margin-top: -5px;
margin-bottom: 5px;
}
.popupDragHandle {
cursor: move;
position: relative;
}
/* menu magic - many thanks to [[User:Zocky]]! */
/* popups */
.popup_menu li {
margin: 3px;
}
.popup_menu
{
display:none;
position:absolute;
left:0;
margin: 0;
margin-top: 1em;
line-height: 1.25em;
list-style-type: none;
/*top:1.6ex; */
z-index:2;
width:10em;
background:white;
border:solid 1px grey;
padding: 0.5em !important;
margin-left: -6px;
margin-top: 1em;
border-width: 1px 1px 1px 6px;
}
.popup_menu a {display:block;}
.popup_menu_row a {display:inline;}
.popup_menu_row { list-style: none;
padding: 0;
margin: 0;
/*)border: solid 1px red;*/
}
.popup_drop {display:inline; position:relative}
.popup_drop:hover .popup_menu,
.popup_drop .popup_menu:hover {display:inline; background:White; padding:2px 2px 2px 2px}
.popup_drop:hover { background:#CCF; color:#44f; }
/* other colours, styles and so on */
.popup_menu a:hover {background:#CCf; color:#44f}
.popup_mainlink {font-size: 140%; font-weight: bold}
a.popup_change_title_link { color: #152; }
.popup_diff_dates {
font-style: italic;
background: none;
}
.popup_menu_item {
list-style: none;
padding: 0;
margin: 0;
/*border: solid 1px green;*/
}
.popup_menu_item a{ display:block; }
.popup_history_row_even { background: #eee; }
.popup_history_date { font-weight: bold; font-size: 120%; }
/* disable interwiki styling */
.popupPreview a.extiw,
.popupPreview a.extiw:active {
color: #36b;
background: none;
padding: 0;
}
.popupPreview a.external {
color: #36b;
}
/* this can be used in the content area to switch off
special external link styling */
.popupPreview .plainlinks a {
background: none !important;
padding: 0 !important;
}
dd2242df034e7f4a052d6e5e11bbda9dcbbcd920
183
2013-11-09T16:36:29Z
Matma Rex
0
aktualna wersja z en.wp: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-navpop.css&oldid=420579584
css
text/css
a.popupMoreLink { display: block; text-align: right; cursor: pointer; }
ins.popupDiff { background: #AFE; }
del.popupDiff { background: #FFE6E6; }
#selectionPreview { /* overflow: auto; max-height: 16ex; */
border: 2px solid #DDD;
background-color: #EEF;
padding: 6px;
}
.navpopup
{
border: solid #FFBE20 1px;
background-color: #FFFAEF;
padding: 5px;
font-size: 8pt;
/* opacity: 0.9; */
}
/* Configure Drag bar color */
.popupDrag {
background-color: #FFBE20;
height: 5px;
margin-top: -5px;
margin-bottom: 5px;
}
.popupDragHandle {
cursor: move;
position: relative;
}
/* menu magic - many thanks to [[User:Zocky]]! */
/* popups */
.popup_menu li {
margin: 3px;
}
.popup_menu
{
display:none;
position:absolute;
left:0;
margin: 0;
margin-top: 1em;
line-height: 1.25em;
list-style-type: none;
/*top:1.6ex; */
z-index:2;
width:10em;
background:white;
border:solid 1px grey;
padding: 0.5em !important;
margin-left: -6px;
margin-top: 1em;
border-width: 1px 1px 1px 6px;
}
.popup_menu a {display:block;}
.popup_menu_row a {display:inline;}
.popup_menu_row { list-style: none;
padding: 0;
margin: 0;
/*)border: solid 1px red;*/
}
.popup_drop {display:inline; position:relative}
.popup_drop:hover .popup_menu,
.popup_drop .popup_menu:hover {display:inline; background:White; padding:2px 2px 2px 2px}
.popup_drop:hover { background:#CCF; color:#44f; }
/* other colours, styles and so on */
.popup_menu a:hover {background:#CCf; color:#44f}
.popup_mainlink {font-size: 140%; font-weight: bold}
a.popup_change_title_link { color: #152; }
.popup_diff_dates {
font-style: italic;
background: none;
}
.popup_menu_item {
list-style: none;
padding: 0;
margin: 0;
/*border: solid 1px green;*/
}
.popup_menu_item a{ display:block; }
.popup_history_row_even { background: #eee; }
.popup_history_date { font-weight: bold; font-size: 120%; }
/* disable interwiki styling */
.popupPreview a.extiw,
.popupPreview a.extiw:active {
color: #36b;
background: none;
padding: 0;
}
.popupPreview a.external {
color: #36b;
}
/* this can be used in the content area to switch off
special external link styling */
.popupPreview .plainlinks a {
background: none !important;
padding: 0 !important;
}
dd2242df034e7f4a052d6e5e11bbda9dcbbcd920
MediaWiki:Gadget-Popups.js
8
73
180
179
2014-01-16T16:23:03Z
Ffkapa
2
1 wersja
javascript
text/javascript
// STARTFILE: main.js
// **********************************************************************
// ** **
// ** changes to this file affect many users. **
// ** please discuss on the talk page before editing **
// ** **
// **********************************************************************
// ** **
// ** if you do edit this file, be sure that your editor recognizes it **
// ** as utf8, or the weird and wonderful characters in the namespaces **
// ** below will be completely broken. You can check with the show **
// ** changes button before submitting the edit. **
// ** test: مدیا מיוחד Мэдыя **
// ** **
// **********************************************************************
//////////////////////////////////////////////////
// Globals
//
// Trying to shove as many of these as possible into the pg (popup globals) object
function pg(){} // dummy to stop errors
window.pg = {
re: {}, // regexps
ns: {}, // namespaces
string: {}, // translatable strings
wiki: {}, // local site info
misc: {}, // YUCK PHOOEY
option: {}, // options, see newOption etc
optionDefault: {}, // default option values
flag: {}, // misc flags
cache: {}, // page and image cache
structures: {}, // navlink structures
timer: {}, // all sorts of timers (too damn many)
counter: {}, // .. and all sorts of counters
current: {}, // state info
endoflist: null
};
window.pop = { // wrap various functions in here
init: {},
util: {},
endoflist: null
};
function popupsReady() {
if (!window.pg) { return false; }
if (!pg.flag) { return false; }
if (!pg.flag.finishedLoading) { return false; }
return true;
}
/// Local Variables: ///
/// mode:c ///
/// End: ///
// ENDFILE: main.js
// STARTFILE: actions.js
function setupTooltips(container, remove, force, popData) {
log('setupTooltips, container='+container+', remove='+remove);
if (!container) {
//<NOLITE>
// the main initial call
if (getValueOf('popupOnEditSelection') && window.doSelectionPopup && document && document.editform && document.editform.wpTextbox1) {
document.editform.wpTextbox1.onmouseup=doSelectionPopup;
}
//</NOLITE>
// article/content is a structure-dependent thing
container = defaultPopupsContainer();
}
if (!remove && !force && container.ranSetupTooltipsAlready) { return; }
container.ranSetupTooltipsAlready = !remove;
var anchors;
anchors=container.getElementsByTagName('A');
setupTooltipsLoop(anchors, 0, 250, 100, remove, popData);
}
function defaultPopupsContainer() {
if (getValueOf('popupOnlyArticleLinks')) {
return document.getElementById('mw_content') ||
document.getElementById('content') ||
document.getElementById('article') || document;
}
return document;
}
function setupTooltipsLoop(anchors,begin,howmany,sleep, remove, popData) {
log(simplePrintf('setupTooltipsLoop(%s,%s,%s,%s,%s)', arguments));
var finish=begin+howmany;
var loopend = min(finish, anchors.length);
var j=loopend - begin;
log ('setupTooltips: anchors.length=' + anchors.length + ', begin=' + begin +
', howmany=' + howmany + ', loopend=' + loopend + ', remove=' + remove);
var doTooltip= remove ? removeTooltip : addTooltip;
// try a faster (?) loop construct
if (j > 0) {
do {
var a=anchors[loopend - j];
if (typeof a==='undefined' || !a || !a.href) {
log('got null anchor at index ' + loopend - j);
continue;
}
doTooltip(a, popData);
} while (--j);
}
if (finish < anchors.length) {
setTimeout(function() {
setupTooltipsLoop(anchors,finish,howmany,sleep,remove,popData);},
sleep);
} else {
if ( !remove && ! getValueOf('popupTocLinks')) { rmTocTooltips(); }
pg.flag.finishedLoading=true;
}
}
// eliminate popups from the TOC
// This also kills any onclick stuff that used to be going on in the toc
function rmTocTooltips() {
var toc=document.getElementById('toc');
if (toc) {
var tocLinks=toc.getElementsByTagName('A');
var tocLen = tocLinks.length;
for (j=0; j<tocLen; ++j) {
removeTooltip(tocLinks[j], true);
}
}
}
function addTooltip(a, popData) {
if ( !isPopupLink(a) ) { return; }
a.onmouseover=mouseOverWikiLink;
a.onmouseout= mouseOutWikiLink;
a.onmousedown = killPopup;
a.hasPopup = true;
a.popData = popData;
}
function removeTooltip(a) {
if ( !a.hasPopup ) { return; }
a.onmouseover = null;
a.onmouseout = null;
if (a.originalTitle) { a.title = a.originalTitle; }
a.hasPopup=false;
}
function removeTitle(a) {
if (!a.originalTitle) {
a.originalTitle=a.title;
}
a.title='';
}
function restoreTitle(a) {
if ( a.title || !a.originalTitle ) { return; }
a.title = a.originalTitle;
}
function registerHooks(np) {
var popupMaxWidth=getValueOf('popupMaxWidth');
if (typeof popupMaxWidth === 'number') {
var setMaxWidth = function () {
np.mainDiv.style.maxWidth = popupMaxWidth + 'px';
np.maxWidth = popupMaxWidth;
try {
// hack for IE
// see http://www.svendtofte.com/code/max_width_in_ie/
// use setExpression as documented here on msdn: http://tinyurl dot com/dqljn
if (np.mainDiv.style.setExpression) {
np.mainDiv.style.setExpression(
'width', 'document.body.clientWidth > ' +
popupMaxWidth + ' ? "' +popupMaxWidth + 'px": "auto"');
}
}
catch (errors) {
errlog( "Running on IE8 are we not?: " + errors );
}
};
np.addHook(setMaxWidth, 'unhide', 'before');
}
//<NOLITE>
if (window.addPopupShortcuts && window.rmPopupShortcuts) {
np.addHook(addPopupShortcuts, 'unhide', 'after');
np.addHook(rmPopupShortcuts, 'hide', 'before');
}
//</NOLITE>
}
function mouseOverWikiLink(evt) {
if (!window.popupsReady || !window.popupsReady()) { return; }
if (!evt && window.event) {evt=window.event;}
return mouseOverWikiLink2(this, evt);
}
function footnoteTarget(a) {
var aTitle=Title.fromAnchor(a);
// We want ".3A" rather than "%3A" or "?" here, so use the anchor property directly
var anch = aTitle.anchor;
if ( ! /^(cite_note-|_note-|endnote)/.test(anch) ) { return false; }
var lTitle=Title.fromURL(location.href);
if ( lTitle.toString(true) !== aTitle.toString(true) ) { return false; }
var el=document.getElementById(anch);
while ( el && typeof el.nodeName === 'string') {
var nt = el.nodeName.toLowerCase();
if ( nt === 'li' ) { return el; }
else if ( nt === 'body' ) { return false; }
else if ( el.parentNode ) { el=el.parentNode; }
else { return false; }
}
return false;
}
function footnotePreview(x, navpop) {
setPopupHTML('<hr>' + x.innerHTML, 'popupPreview', navpop.idNumber, getValueOf('popupSubpopups')
? function() { setupTooltips(document.getElementById('popupPreview' + navpop.idNumber)); }
: null);
}
// var modid=0;
// if(!window.opera) { window.opera={postError: console.log}; }
function modifierKeyHandler(a) {
return function(evt) {
// opera.postError('modifierKeyHandler called' + (++modid));
// opera.postError(''+evt + modid);
// for (var i in evt) {
// opera.postError('' + modid + ' ' + i + ' ' + evt[i]);
// }
// opera.postError(''+evt.ctrlKey + modid);
var mod=getValueOf('popupModifier');
if (!mod) { return true; }
if (!evt && window.event) {evt=window.event;}
// opera.postError('And now....'+modid);
// opera.postError(''+evt+modid);
// opera.postError(''+evt.ctrlKey+modid);
var modPressed = modifierPressed(evt);
var action = getValueOf('popupModifierAction');
// FIXME: probable bug - modifierPressed should be modPressed below?
if ( action === 'disable' && modifierPressed ) { return true; }
if ( action === 'enable' && !modifierPressed ) { return true; }
mouseOverWikiLink2(a, evt);
};
}
function modifierPressed(evt) {
var mod=getValueOf('popupModifier');
if (!mod) { return false; }
if (!evt && window.event) {evt=window.event;}
// opera.postError('And now....'+modid);
// opera.postError(''+evt+modid);
// opera.postError(''+evt.ctrlKey+modid);
return ( evt && mod && evt[mod.toLowerCase() + 'Key'] );
}
function dealWithModifier(a,evt) {
if (!getValueOf('popupModifier')) { return false; }
var action = getValueOf('popupModifierAction');
if ( action == 'enable' && !modifierPressed(evt) ||
action == 'disable' && modifierPressed(evt) ) {
// if the modifier is needed and not pressed, listen for it until
// we mouseout of this link.
restoreTitle(a);
var addHandler='addEventListener';
var rmHandler='removeEventListener';
var on='';
if (!document.addEventListener) {
addHandler='attachEvent';
rmHandler='detachEvent';
on='on';
}
if (!document[addHandler]) { // forget it
return;
}
a.modifierKeyHandler=modifierKeyHandler(a);
switch (action) {
case 'enable':
document[addHandler](on+'keydown', a.modifierKeyHandler, false);
a[addHandler](on+'mouseout', function() {
document[rmHandler](on+'keydown',
a.modifierKeyHandler, false);
}, true);
break;
case 'disable':
document[addHandler](on+'keyup', a.modifierKeyHandler, false);
}
return true;
}
return false;
}
function mouseOverWikiLink2(a, evt) {
if (dealWithModifier(a,evt)) { return; }
if ( getValueOf('removeTitles') ) { removeTitle(a); }
if ( a==pg.current.link && a.navpopup && a.navpopup.isVisible() ) { return; }
pg.current.link=a;
if (getValueOf('simplePopups') && pg.option.popupStructure===null) {
// reset *default value* of popupStructure
setDefault('popupStructure', 'original');
}
var article=(new Title()).fromAnchor(a);
// set global variable (ugh) to hold article (wikipage)
pg.current.article = article;
if (!a.navpopup) {
// FIXME: this doesn't behave well if you mouse out of a popup
// directly into a link with the same href
if (pg.current.linksHash[a.href] && false) {
a.navpopup = pg.current.linksHash[a.href];
}
else {
a.navpopup=newNavpopup(a, article);
pg.current.linksHash[a.href] = a.navpopup;
pg.current.links.push(a);
}
}
if (a.navpopup.pending===null || a.navpopup.pending!==0) {
// either fresh popups or those with unfinshed business are redone from scratch
simplePopupContent(a, article);
}
a.navpopup.showSoonIfStable(a.navpopup.delay);
getValueOf('popupInitialWidth');
clearInterval(pg.timer.checkPopupPosition);
pg.timer.checkPopupPosition=setInterval(checkPopupPosition, 600);
if(getValueOf('simplePopups')) {
if (getValueOf('popupPreviewButton') && !a.simpleNoMore) {
var d=document.createElement('div');
d.className='popupPreviewButtonDiv';
var s=document.createElement('span');
d.appendChild(s);
s.className='popupPreviewButton';
s['on' + getValueOf('popupPreviewButtonEvent')] = function() {
a.simpleNoMore=true;
nonsimplePopupContent(a,article);
};
s.innerHTML=popupString('show preview');
setPopupHTML(d, 'popupPreview', a.navpopup.idNumber);
}
return;
}
if (a.navpopup.pending!==0 ) {
nonsimplePopupContent(a, article);
}
}
// simplePopupContent: the content that is shown even when simplePopups is true
function simplePopupContent(a, article) {
/* FIXME hack */ a.navpopup.hasPopupMenu=false;
a.navpopup.setInnerHTML(popupHTML(a));
fillEmptySpans({navpopup:a.navpopup});
if (getValueOf('popupDraggable'))
{
var dragHandle = getValueOf('popupDragHandle') || null;
if (dragHandle && dragHandle != 'all') {
dragHandle += a.navpopup.idNumber;
}
setTimeout(function(){a.navpopup.makeDraggable(dragHandle);}, 150);
}
//<NOLITE>
if (getValueOf('popupRedlinkRemoval') && a.className=='new') {
setPopupHTML('<br>'+popupRedlinkHTML(article), 'popupRedlink', a.navpopup.idNumber);
}
//</NOLITE>
}
function debugData(navpopup) {
if(getValueOf('popupDebugging') && navpopup.idNumber) {
setPopupHTML('idNumber='+navpopup.idNumber + ', pending=' + navpopup.pending,
'popupError', navpopup.idNumber);
}
}
function newNavpopup(a, article) {
var navpopup = new Navpopup();
navpopup.fuzz=5;
navpopup.delay=getValueOf('popupDelay')*1000;
// increment global counter now
navpopup.idNumber = ++pg.idNumber;
navpopup.parentAnchor = a;
navpopup.parentPopup = (a.popData && a.popData.owner);
navpopup.article = article;
registerHooks(navpopup);
return navpopup;
}
function nonsimplePopupContent(a, article) {
var diff=null, history=null;
var params=parseParams(a.href);
var oldid=(typeof params.oldid=='undefined' ? null : params.oldid);
//<NOLITE>
if(getValueOf('popupPreviewDiffs') && window.loadDiff) {
diff=params.diff;
}
if(getValueOf('popupPreviewHistory')) {
history=(params.action=='history');
}
//</NOLITE>
a.navpopup.pending=0;
var x;
if (x=footnoteTarget(a)) {
footnotePreview(x, a.navpopup);
//<NOLITE>
} else if ( diff || diff === 0 ) {
loadDiff(article, oldid, diff, a.navpopup);
} else if ( history ) {
loadAPIPreview('history', article, a.navpopup);
} else if ( pg.re.contribs.test(a.href) ) {
loadAPIPreview('contribs', article, a.navpopup);
} else if ( pg.re.backlinks.test(a.href) ) {
loadAPIPreview('backlinks', article, a.navpopup);
} else if ( // FIXME should be able to get all preview combinations with options
article.namespaceId()==pg.nsImageId &&
( getValueOf('imagePopupsForImages') || ! anchorContainsImage(a) )
) {
loadAPIPreview('imagepagepreview', article, a.navpopup);
loadImage(article, a.navpopup);
//</NOLITE>
} else {
if (article.namespaceId() == pg.nsCategoryId &&
getValueOf('popupCategoryMembers')) {
loadAPIPreview('category', article, a.navpopup);
} else if ((article.namespaceId() == pg.nsUserId || article.namespaceId() == pg.nsUsertalkId) &&
getValueOf('popupUserInfo')) {
loadAPIPreview('userinfo', article, a.navpopup);
}
startArticlePreview(article, oldid, a.navpopup);
}
}
function pendingNavpopTask(navpop) {
if (navpop && navpop.pending===null) { navpop.pending=0; }
++navpop.pending;
debugData(navpop);
}
function completedNavpopTask(navpop) {
if (navpop && navpop.pending) { --navpop.pending; }
debugData(navpop);
}
function startArticlePreview(article, oldid, navpop) {
navpop.redir=0;
loadPreview(article, oldid, navpop);
}
function loadPreview(article, oldid, navpop) {
pendingNavpopTask(navpop);
if (!navpop.redir) { navpop.originalArticle=article; }
if (!navpop.visible && getValueOf('popupLazyDownloads')) {
var id=(navpop.redir) ? 'DOWNLOAD_PREVIEW_REDIR_HOOK' : 'DOWNLOAD_PREVIEW_HOOK';
navpop.addHook(function() {
getWiki(article, insertPreview, oldid, navpop);
return true; }, 'unhide', 'before', id);
} else {
getWiki(article, insertPreview, oldid, navpop);
}
}
function loadPreviewFromRedir(redirMatch, navpop) {
// redirMatch is a regex match
var target = new Title().fromWikiText(redirMatch[2]);
// overwrite (or add) anchor from original target
// mediawiki does overwrite; eg [[User:Lupin/foo3#Done]]
if ( navpop.article.anchor ) { target.anchor = navpop.article.anchor; }
var trailingRubbish=redirMatch[4];
navpop.redir++;
navpop.redirTarget=target;
//<NOLITE>
if (window.redirLink) {
var warnRedir = redirLink(target, navpop.article);
setPopupHTML(warnRedir, 'popupWarnRedir', navpop.idNumber);
}
//</NOLITE>
navpop.article=target;
fillEmptySpans({redir: true, redirTarget: target, navpopup:navpop});
return loadPreview(target, null, navpop);
}
function insertPreview(download) {
if (!download.owner) { return; }
var redirMatch = pg.re.redirect.exec(download.data);
if (download.owner.redir===0 && redirMatch) {
completedNavpopTask(download.owner);
loadPreviewFromRedir(redirMatch, download.owner);
return;
}
if (download.owner.visible || !getValueOf('popupLazyPreviews')) {
insertPreviewNow(download);
} else {
var id=(download.owner.redir) ? 'PREVIEW_REDIR_HOOK' : 'PREVIEW_HOOK';
download.owner.addHook( function(){insertPreviewNow(download); return true;},
'unhide', 'after', id );
}
}
function insertPreviewNow(download) {
if (!download.owner) { return; }
var wikiText=download.data;
var navpop=download.owner;
completedNavpopTask(navpop);
var art=navpop.redirTarget || navpop.originalArticle;
//<NOLITE>
makeFixDabs(wikiText, navpop);
if (getValueOf('popupSummaryData') && window.getPageInfo) {
var info=getPageInfo(wikiText, download);
setPopupTrailer(getPageInfo(wikiText, download), navpop.idNumber);
}
var imagePage='';
if (art.namespaceId()==pg.nsImageId) { imagePage=art.toString(); }
else { imagePage=getValidImageFromWikiText(wikiText); }
if(imagePage) { loadImage(Title.fromWikiText(imagePage), navpop); }
//</NOLITE>
if (getValueOf('popupPreviews')) { insertArticlePreview(download, art, navpop); }
}
function insertArticlePreview(download, art, navpop) {
if (download && typeof download.data == typeof ''){
if (art.namespaceId()==pg.nsTemplateId && getValueOf('popupPreviewRawTemplates')) {
// FIXME compare/consolidate with diff escaping code for wikitext
var h='<hr><tt>' + download.data.entify().split('\\n').join('<br>\\n') + '</tt>';
setPopupHTML(h, 'popupPreview', navpop.idNumber);
}
else {
var p=prepPreviewmaker(download.data, art, navpop);
p.showPreview();
}
}
}
function prepPreviewmaker(data, article, navpop) {
// deal with tricksy anchors
var d=anchorize(data, article.anchorString());
var urlBase=joinPath([pg.wiki.articlebase, article.urlString()]);
var p=new Previewmaker(d, urlBase, navpop);
return p;
}
// Try to imitate the way mediawiki generates HTML anchors from section titles
function anchorize(d, anch) {
if (!anch) { return d; }
var anchRe=RegExp('(?:=+\\s*' + literalizeRegex(anch).replace(/[_ ]/g, '[_ ]') + '\\s*=+|\\{\\{\\s*'+getValueOf('popupAnchorRegexp')+'\\s*(?:\\|[^|}]*)*?\\s*'+literalizeRegex(anch)+'\\s*(?:\\|[^}]*)?\}\})');
var match=d.match(anchRe);
if(match && match.length > 0 && match[0]) { return d.substring(d.indexOf(match[0])); }
// now try to deal with == foo [[bar|baz]] boom == -> #foo_baz_boom
var lines=d.split('\n');
for (var i=0; i<lines.length; ++i) {
lines[i]=lines[i].replace(RegExp('[[]{2}([^|\\]]*?[|])?(.*?)[\\]]{2}', 'g'), '$2')
.replace(/'''([^'])/g, '$1').replace(RegExp("''([^'])", 'g'), '$1');
if (lines[i].match(anchRe)) {
return d.split('\n').slice(i).join('\n').replace(RegExp('^[^=]*'), '');
}
}
return d;
}
function killPopup() {
if (getValueOf('popupShortcutKeys') && window.rmPopupShortcuts) { rmPopupShortcuts(); }
if (!pg) { return; }
pg.current.link && pg.current.link.navpopup && pg.current.link.navpopup.banish();
pg.current.link=null;
abortAllDownloads();
if (pg.timer.checkPopupPosition !== null) {
clearInterval(pg.timer.checkPopupPosition);
pg.timer.checkPopupPosition=null;
}
return true; // preserve default action
}
// ENDFILE: actions.js
// STARTFILE: domdrag.js
/**
@fileoverview
The {@link Drag} object, which enables objects to be dragged around.
<pre>
*************************************************
dom-drag.js
09.25.2001
www.youngpup.net
**************************************************
10.28.2001 - fixed minor bug where events
sometimes fired off the handle, not the root.
*************************************************
Pared down, some hooks added by [[User:Lupin]]
Copyright Aaron Boodman.
Saying stupid things daily since March 2001.
</pre>
*/
/**
Creates a new Drag object. This is used to make various DOM elements draggable.
@constructor
*/
function Drag () {
/**
Condition to determine whether or not to drag. This function should take one parameter, an Event.
To disable this, set it to <code>null</code>.
@type Function
*/
this.startCondition = null;
/**
Hook to be run when the drag finishes. This is passed the final coordinates of
the dragged object (two integers, x and y). To disables this, set it to <code>null</code>.
@type Function
*/
this.endHook = null;
}
/**
Gets an event in a cross-browser manner.
@param {Event} e
@private
*/
Drag.prototype.fixE = function(e) {
if (typeof e == 'undefined') { e = window.event; }
if (typeof e.layerX == 'undefined') { e.layerX = e.offsetX; }
if (typeof e.layerY == 'undefined') { e.layerY = e.offsetY; }
return e;
};
/**
Initialises the Drag instance by telling it which object you want to be draggable, and what you want to drag it by.
@param {DOMElement} o The "handle" by which <code>oRoot</code> is dragged.
@param {DOMElement} oRoot The object which moves when <code>o</code> is dragged, or <code>o</code> if omitted.
*/
Drag.prototype.init = function(o, oRoot) {
var dragObj = this;
this.obj = o;
o.onmousedown = function(e) { dragObj.start.apply( dragObj, [e]); };
o.dragging = false;
o.popups_draggable = true;
o.hmode = true;
o.vmode = true;
o.root = oRoot && oRoot !== null ? oRoot : o ;
if (isNaN(parseInt(o.root.style.left, 10))) { o.root.style.left = "0px"; }
if (isNaN(parseInt(o.root.style.top, 10))) { o.root.style.top = "0px"; }
o.root.onthisStart = function(){};
o.root.onthisEnd = function(){};
o.root.onthis = function(){};
};
/**
Starts the drag.
@private
@param {Event} e
*/
Drag.prototype.start = function(e) {
var o = this.obj; // = this;
e = this.fixE(e);
if (this.startCondition && !this.startCondition(e)) { return; }
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom, 10);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right, 10);
o.root.onthisStart(x, y);
o.lastMouseX = e.clientX;
o.lastMouseY = e.clientY;
var dragObj = this;
o.onmousemoveDefault = document.onmousemove;
o.dragging = true;
document.onmousemove = function(e) { dragObj.drag.apply( dragObj, [e] ); };
document.onmouseup = function(e) { dragObj.end.apply( dragObj, [e] ); };
return false;
};
/**
Does the drag.
@param {Event} e
@private
*/
Drag.prototype.drag = function(e) {
e = this.fixE(e);
var o = this.obj;
var ey = e.clientY;
var ex = e.clientX;
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom, 10);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right, 10 );
var nx, ny;
nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
this.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
this.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
this.obj.lastMouseX = ex;
this.obj.lastMouseY = ey;
this.obj.root.onthis(nx, ny);
return false;
};
/**
Ends the drag.
@private
*/
Drag.prototype.end = function() {
document.onmousemove=this.obj.onmousemoveDefault;
document.onmouseup = null;
this.obj.dragging = false;
if (this.endHook) {
this.endHook( parseInt(this.obj.root.style[this.obj.hmode ? "left" : "right"], 10),
parseInt(this.obj.root.style[this.obj.vmode ? "top" : "bottom"], 10));
}
};
// ENDFILE: domdrag.js
// STARTFILE: structures.js
//<NOLITE>
pg.structures.original={};
pg.structures.original.popupLayout=function () {
return ['popupError', 'popupImage', 'popupTopLinks', 'popupTitle',
'popupData', 'popupOtherLinks',
'popupRedir', ['popupWarnRedir', 'popupRedirTopLinks',
'popupRedirTitle', 'popupRedirData', 'popupRedirOtherLinks'],
'popupMiscTools', ['popupRedlink'],
'popupPrePreviewSep', 'popupPreview', 'popupSecondPreview', 'popupPreviewMore', 'popupPostPreview', 'popupFixDab'];
};
pg.structures.original.popupRedirSpans=function () {
return ['popupRedir', 'popupWarnRedir', 'popupRedirTopLinks',
'popupRedirTitle', 'popupRedirData', 'popupRedirOtherLinks'];
};
pg.structures.original.popupTitle=function (x) {
log ('defaultstructure.popupTitle');
if (!getValueOf('popupNavLinks')) {
return navlinkStringToHTML('<b><<mainlink>></b>',x.article,x.params);
}
return '';
};
pg.structures.original.popupTopLinks=function (x) {
log ('defaultstructure.popupTopLinks');
if (getValueOf('popupNavLinks')) { return navLinksHTML(x.article, x.hint, x.params); }
return '';
};
pg.structures.original.popupImage=function(x) {
log ('original.popupImage, x.article='+x.article+', x.navpop.idNumber='+x.navpop.idNumber);
return imageHTML(x.article, x.navpop.idNumber);
};
pg.structures.original.popupRedirTitle=pg.structures.original.popupTitle;
pg.structures.original.popupRedirTopLinks=pg.structures.original.popupTopLinks;
function copyStructure(oldStructure, newStructure) {
pg.structures[newStructure]={};
for (var prop in pg.structures[oldStructure]) {
pg.structures[newStructure][prop]=pg.structures[oldStructure][prop];
}
}
copyStructure('original', 'nostalgia');
pg.structures.nostalgia.popupTopLinks=function(x) {
var str='';
str += '<b><<mainlink|shortcut= >></b>';
// user links
// contribs - log - count - email - block
// count only if applicable; block only if popupAdminLinks
str += 'if(user){<br><<contribs|shortcut=c>>';
str+='if(wikimedia){*<<count|shortcut=#>>}';
str+='if(ipuser){}else{*<<email|shortcut=E>>}if(admin){*<<block|shortcut=b>>}}';
// editing links
// talkpage -> edit|new - history - un|watch - article|edit
// other page -> edit - history - un|watch - talk|edit|new
var editstr='<<edit|shortcut=e>>';
var editOldidStr='if(oldid){<<editOld|shortcut=e>>|<<revert|shortcut=v|rv>>|<<edit|cur>>}else{'
+ editstr + '}';
var historystr='<<history|shortcut=h>>';
var watchstr='<<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>>';
str+='<br>if(talk){' +
editOldidStr+'|<<new|shortcut=+>>' + '*' + historystr+'*'+watchstr + '*' +
'<b><<article|shortcut=a>></b>|<<editArticle|edit>>' +
'}else{' + // not a talk page
editOldidStr + '*' + historystr + '*' + watchstr + '*' +
'<b><<talk|shortcut=t>></b>|<<editTalk|edit>>|<<newTalk|shortcut=+|new>>'
+ '}';
// misc links
str += '<br><<whatLinksHere|shortcut=l>>*<<relatedChanges|shortcut=r>>';
str += 'if(admin){<br>}else{*}<<move|shortcut=m>>';
// admin links
str += 'if(admin){*<<unprotect|unprotectShort>>|<<protect|shortcut=p>>*' +
'<<undelete|undeleteShort>>|<<delete|shortcut=d>>}';
return navlinkStringToHTML(str, x.article, x.params);
};
pg.structures.nostalgia.popupRedirTopLinks=pg.structures.nostalgia.popupTopLinks;
/** -- fancy -- **/
copyStructure('original', 'fancy');
pg.structures.fancy.popupTitle=function (x) {
return navlinkStringToHTML('<font size=+0><<mainlink>></font>',x.article,x.params);
};
pg.structures.fancy.popupTopLinks=function(x) {
var hist='<<history|shortcut=h|hist>>|<<lastEdit|shortcut=/|last>>if(mainspace_en){|<<editors|shortcut=E|eds>>}';
var watch='<<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>>';
var move='<<move|shortcut=m|move>>';
return navlinkStringToHTML('if(talk){' +
'<<edit|shortcut=e>>|<<new|shortcut=+|+>>*' + hist + '*' +
'<<article|shortcut=a>>|<<editArticle|edit>>' + '*' + watch + '*' + move +
'}else{<<edit|shortcut=e>>*' + hist +
'*<<talk|shortcut=t|>>|<<editTalk|edit>>|<<newTalk|shortcut=+|new>>' +
'*' + watch + '*' + move+'}<br>', x.article, x.params);
};
pg.structures.fancy.popupOtherLinks=function(x) {
var admin='<<unprotect|unprotectShort>>|<<protect|shortcut=p>>*<<undelete|undeleteShort>>|<<delete|shortcut=d|del>>';
var user='<<contribs|shortcut=c>>if(wikimedia){|<<count|shortcut=#|#>>}';
user+='if(ipuser){|<<arin>>}else{*<<email|shortcut=E|'+
popupString('email')+'>>}if(admin){*<<block|shortcut=b>>}';
var normal='<<whatLinksHere|shortcut=l|links here>>*<<relatedChanges|shortcut=r|related>>';
return navlinkStringToHTML('<br>if(user){' + user + '*}if(admin){'+admin+'if(user){<br>}else{*}}' + normal,
x.article, x.params);
};
pg.structures.fancy.popupRedirTitle=pg.structures.fancy.popupTitle;
pg.structures.fancy.popupRedirTopLinks=pg.structures.fancy.popupTopLinks;
pg.structures.fancy.popupRedirOtherLinks=pg.structures.fancy.popupOtherLinks;
/** -- fancy2 -- **/
// hack for [[User:MacGyverMagic]]
copyStructure('fancy', 'fancy2');
pg.structures.fancy2.popupTopLinks=function(x) { // hack out the <br> at the end and put one at the beginning
return '<br>'+pg.structures.fancy.popupTopLinks(x).replace(RegExp('<br>$','i'),'');
};
pg.structures.fancy2.popupLayout=function () { // move toplinks to after the title
return ['popupError', 'popupImage', 'popupTitle', 'popupData', 'popupTopLinks', 'popupOtherLinks',
'popupRedir', ['popupWarnRedir', 'popupRedirTopLinks', 'popupRedirTitle', 'popupRedirData', 'popupRedirOtherLinks'],
'popupMiscTools', ['popupRedlink'],
'popupPrePreviewSep', 'popupPreview', 'popupSecondPreview', 'popupPreviewMore', 'popupPostPreview', 'popupFixDab'];
};
/** -- menus -- **/
copyStructure('original', 'menus');
pg.structures.menus.popupLayout=function () {
return ['popupError', 'popupImage', 'popupTopLinks', 'popupTitle', 'popupOtherLinks',
'popupRedir', ['popupWarnRedir', 'popupRedirTopLinks', 'popupRedirTitle', 'popupRedirData', 'popupRedirOtherLinks'],
'popupData', 'popupMiscTools', ['popupRedlink'],
'popupPrePreviewSep', 'popupPreview', 'popupSecondPreview', 'popupPreviewMore', 'popupPostPreview', 'popupFixDab'];
};
function toggleSticky(uid) {
var popDiv=document.getElementById('navpopup_maindiv'+uid);
if (!popDiv) { return; }
if (!popDiv.navpopup.sticky) { popDiv.navpopup.stick(); }
else {
popDiv.navpopup.unstick();
popDiv.navpopup.hide();
}
}
pg.structures.menus.popupTopLinks = function (x, shorter) {
// FIXME maybe this stuff should be cached
var s=[];
var dropdiv='<div class="popup_drop">';
var enddiv='</div>';
var endspan='</span>';
var hist='<<history|shortcut=h>>';
if (!shorter) { hist = '<menurow>' + hist +
'|<<historyfeed|rss>>if(mainspace_en){|<<editors|shortcut=E>>}</menurow>'; }
var lastedit='<<lastEdit|shortcut=/|show last edit>>';
var jsHistory='<<lastContrib|last set of edits>><<sinceMe|changes since mine>>';
var linkshere='<<whatLinksHere|shortcut=l|what links here>>';
var related='<<relatedChanges|shortcut=r|related changes>>';
var search='<menurow><<search|shortcut=s>>if(wikimedia){|<<globalsearch|shortcut=g|global>>}' +
'|<<google|shortcut=G|web>></menurow>';
var watch='<menurow><<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>></menurow>';
var protect='<menurow><<unprotect|unprotectShort>>|' +
'<<protect|shortcut=p>>|<<protectlog|log>></menurow>';
var del='<menurow><<undelete|undeleteShort>>|<<delete|shortcut=d>>|' +
'<<deletelog|log>></menurow>';
var move='<<move|shortcut=m|move page>>';
var nullPurge='<menurow><<nullEdit|shortcut=n|null edit>>|<<purge|shortcut=P>></menurow>';
var viewOptions='<menurow><<view|shortcut=v>>|<<render|shortcut=S>>|<<raw>></menurow>';
var editRow='if(oldid){' +
'<menurow><<edit|shortcut=e>>|<<editOld|shortcut=e|this revision>></menurow>' +
'<menurow><<revert|shortcut=v>>|<<undo>></menurow>' + '}else{<<edit|shortcut=e>>}';
var markPatrolled='if(rcid){<<markpatrolled|mark patrolled>>}';
var newTopic='if(talk){<<new|shortcut=+|new topic>>}';
var protectDelete='if(admin){' + protect + del + '}';
if (getValueOf('popupActionsMenu')) {
s.push( '<<mainlink>>*' + dropdiv + menuTitle('actions'));
} else {
s.push( dropdiv + '<<mainlink>>');
}
s.push( '<menu>');
s.push( editRow + markPatrolled + newTopic + hist + lastedit );
if (!shorter) { s.push(jsHistory); }
s.push( move + linkshere + related);
if (!shorter) { s.push(nullPurge + search); }
if (!shorter) { s.push(viewOptions); }
s.push('<hr>' + watch + protectDelete);
s.push('<hr>' +
'if(talk){<<article|shortcut=a|view article>><<editArticle|edit article>>}' +
'else{<<talk|shortcut=t|talk page>><<editTalk|edit talk>>' +
'<<newTalk|shortcut=+|new topic>>}</menu>' + enddiv);
// user menu starts here
var email='<<email|shortcut=E|email user>>';
var contribs= 'if(wikimedia){<menurow>}<<contribs|shortcut=c|contributions>>if(wikimedia){</menurow>}' +
'if(admin){<menurow><<deletedContribs>></menurow>}';
s.push('if(user){*' + dropdiv + menuTitle('user'));
s.push('<menu>'); +
s.push('<menurow><<userPage|shortcut=u|user page>>|<<userSpace|space>></menurow>');
s.push('<<userTalk|shortcut=t|user talk>><<editUserTalk|edit user talk>>' +
'<<newUserTalk|shortcut=+|leave comment>>');
if(!shorter) { s.push( 'if(ipuser){<<arin>>}else{' + email + '}' ); }
else { s.push( 'if(ipuser){}else{' + email + '}' ); }
s.push('<hr>' + contribs + '<<userlog|shortcut=L|user log>>');
s.push('if(wikimedia){<<count|shortcut=#|edit counter>>}');
s.push('if(admin){<menurow><<unblock|unblockShort>>|<<block|shortcut=b|block user>></menurow>}');
s.push('<<blocklog|shortcut=B|block log>>' + getValueOf('popupExtraUserMenu'));
s.push('</menu>' + enddiv + '}');
// popups menu starts here
if (getValueOf('popupSetupMenu') && !x.navpop.hasPopupMenu /* FIXME: hack */) {
x.navpop.hasPopupMenu=true;
s.push('*' + dropdiv + menuTitle('popupsMenu') + '<menu>');
s.push('<<togglePreviews|toggle previews>>');
s.push('<<purgePopups|reset>>');
s.push('<<disablePopups|disable>>');
s.push('</menu>'+enddiv);
}
return navlinkStringToHTML(s.join(''), x.article, x.params);
};
function menuTitle(s) {
return '<a href="#" noPopup=1>' + popupString(s) + '</a>';
}
pg.structures.menus.popupRedirTitle=pg.structures.menus.popupTitle;
pg.structures.menus.popupRedirTopLinks=pg.structures.menus.popupTopLinks;
copyStructure('menus', 'shortmenus');
pg.structures.shortmenus.popupTopLinks=function(x) {
return pg.structures.menus.popupTopLinks(x,true);
};
pg.structures.shortmenus.popupRedirTopLinks=pg.structures.shortmenus.popupTopLinks;
copyStructure('shortmenus', 'dabshortmenus');
pg.structures.dabshortmenus.popupLayout=function () {
return ['popupError', 'popupImage', 'popupTopLinks', 'popupTitle', 'popupOtherLinks',
'popupRedir', ['popupWarnRedir', 'popupRedirTopLinks', 'popupRedirTitle', 'popupRedirData', 'popupRedirOtherLinks'],
'popupData', 'popupMiscTools', ['popupRedlink'], 'popupFixDab',
'popupPrePreviewSep', 'popupPreview', 'popupSecondPreview', 'popupPreviewMore', 'popupPostPreview'];
};
copyStructure('menus', 'dabmenus');
pg.structures.dabmenus.popupLayout=pg.structures.dabshortmenus.popupLayout;
//</NOLITE>
pg.structures.lite={};
pg.structures.lite.popupLayout=function () {
return ['popupTitle', 'popupPreview' ];
};
pg.structures.lite.popupTitle=function (x) {
log (x.article + ': structures.lite.popupTitle');
//return navlinkStringToHTML('<b><<mainlink>></b>',x.article,x.params);
return '<div><span class="popup_mainlink"><b>' + x.article.toString() + '</b></span></div>';
};
// ENDFILE: structures.js
// STARTFILE: autoedit.js
//<NOLITE>
function getParamValue(paramName, h) {
if (typeof h == 'undefined' ) { h = document.location.href; }
var cmdRe=RegExp('[&?]'+paramName+'=([^&]*)');
var m=cmdRe.exec(h);
if (m) {
try {
return decodeURIComponent(m[1]);
} catch (someError) {}
}
return null;
}
function substitute(data,cmdBody) {
// alert('sub\nfrom: '+cmdBody.from+'\nto: '+cmdBody.to+'\nflags: '+cmdBody.flags);
var fromRe=RegExp(cmdBody.from, cmdBody.flags);
return data.replace(fromRe, cmdBody.to);
}
function execCmds(data, cmdList) {
for (var i=0; i<cmdList.length; ++i) {
data=cmdList[i].action(data, cmdList[i]);
}
return data;
}
function parseCmd(str) {
// returns a list of commands
if (!str.length) { return []; }
var p=false;
switch (str.charAt(0)) {
case 's':
p=parseSubstitute(str);
break;
default:
return false;
}
if (p) { return [p].concat(parseCmd(p.remainder)); }
return false;
}
function unEscape(str, sep) {
return str.split('\\\\').join('\\').split('\\'+sep).join(sep).split('\\n').join('\n');
}
function parseSubstitute(str) {
// takes a string like s/a/b/flags;othercmds and parses it
var from,to,flags,tmp;
if (str.length<4) { return false; }
var sep=str.charAt(1);
str=str.substring(2);
tmp=skipOver(str,sep);
if (tmp) { from=tmp.segment; str=tmp.remainder; }
else { return false; }
tmp=skipOver(str,sep);
if (tmp) { to=tmp.segment; str=tmp.remainder; }
else { return false; }
flags='';
if (str.length) {
tmp=skipOver(str,';') || skipToEnd(str, ';');
if (tmp) {flags=tmp.segment; str=tmp.remainder; }
}
return {action: substitute, from: from, to: to, flags: flags, remainder: str};
}
function skipOver(str,sep) {
var endSegment=findNext(str,sep);
if (endSegment<0) { return false; }
var segment=unEscape(str.substring(0,endSegment), sep);
return {segment: segment, remainder: str.substring(endSegment+1)};
}
function skipToEnd(str,sep) {
return {segment: str, remainder: ''};
}
function findNext(str, ch) {
for (var i=0; i<str.length; ++i) {
if (str.charAt(i)=='\\') { i+=2; }
if (str.charAt(i)==ch) { return i; }
}
return -1;
}
function setCheckbox(param, box) {
var val=getParamValue(param);
if (val!==null) {
switch (val) {
case '1': case 'yes': case 'true':
box.checked=true;
break;
case '0': case 'no': case 'false':
box.checked=false;
}
}
}
function autoEdit() {
if (!setupPopups.completed) { setupPopups(); }
if (!window.wgEnableAPI || !wgEnableAPI ) { return false; }
if (getParamValue('autowatchlist') && getParamValue('actoken')===autoClickToken()) {
modifyWatchlist(getParamValue('title'), getParamValue('action'));
}
if (!document.editform) { return false; }
if (window.autoEdit.alreadyRan) { return false; }
window.autoEdit.alreadyRan=true;
var cmdString=getParamValue('autoedit');
if (cmdString) {
try {
var editbox=document.editform.wpTextbox1;
} catch (dang) { return; }
var cmdList=parseCmd(cmdString);
var input=editbox.value;
var output=execCmds(input, cmdList);
editbox.value=output;
// wikEd user script compatibility
if (typeof(wikEdUseWikEd) != 'undefined') {
if (wikEdUseWikEd === true) {
WikEdUpdateFrame();
}
}
}
setCheckbox('autominor', document.editform.wpMinoredit);
setCheckbox('autowatch', document.editform.wpWatchthis);
var rvid = getParamValue('autorv');
if (rvid) {
var url=pg.wiki.apiwikibase + '?action=query&format=json&prop=revisions&revids='+rvid;
startDownload(url, null, autoEdit2);
} else { autoEdit2(); }
}
function autoEdit2(d) {
var summary=getParamValue('autosummary');
var summaryprompt=getParamValue('autosummaryprompt');
var summarynotice='';
if (d && d.data && getParamValue('autorv')) {
var s = getRvSummary(summary, d.data);
if (s===false) {
summaryprompt=true;
summarynotice=popupString('Failed to get revision information, please edit manually.\n\n');
summary = simplePrintf(summary, [getParamValue('autorv'), '(unknown)', '(unknown)']);
} else { summary = s; }
}
if (summaryprompt) {
var txt= summarynotice +
popupString('Enter a non-empty edit summary or press cancel to abort');
var response=prompt(txt, summary);
if (response) { summary=response; }
else { return; }
}
if (summary) { document.editform.wpSummary.value=summary; }
// Attempt to avoid possible premature clicking of the save button
// (maybe delays in updates to the DOM are to blame?? or a red herring)
setTimeout(autoEdit3, 100);
}
function autoClickToken() {
return mw.user.sessionId();
}
function autoEdit3() {
if( getParamValue('actoken') != autoClickToken()) { return; }
var btn=getParamValue('autoclick');
if (btn) {
if (document.editform && document.editform[btn]) {
var button=document.editform[btn];
var msg=tprintf('The %s button has been automatically clicked. Please wait for the next page to load.',
[ button.value ]);
bannerMessage(msg);
document.title='('+document.title+')';
button.click();
} else {
alert(tprintf('Could not find button %s. Please check the settings in your javascript file.',
[ btn ]));
}
}
}
function bannerMessage(s) {
var headings=document.getElementsByTagName('h1');
if (headings) {
var div=document.createElement('div');
div.innerHTML='<font size=+1><b>' + s + '</b></font>';
headings[0].parentNode.insertBefore(div, headings[0]);
}
}
function getRvSummary(template, json) {
try {
var o=getJsObj(json);
var edit = anyChild(o.query.pages).revisions[0];
} catch (badness) {return false;}
var timestamp = edit.timestamp.split(/[A-Z]/g).join(' ').replace(/^ *| *$/g, '');
return simplePrintf(template, [edit.revid, timestamp, edit.user]);
}
//</NOLITE>
// ENDFILE: autoedit.js
// STARTFILE: downloader.js
/**
@fileoverview
{@link Downloader}, a xmlhttprequest wrapper, and helper functions.
*/
/**
Creates a new Downloader
@constructor
@class The Downloader class. Create a new instance of this class to download stuff.
@param {String} url The url to download. This can be omitted and supplied later.
*/
function Downloader(url) {
// Source: http://jibbering.com/2002/4/httprequest.html
/** xmlhttprequest object which we're wrapping */
this.http = false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation,
// we can cope with old IE versions.
// and security blocked creation of the objects.
try {
this.http = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
this.http = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
// this.http = false;
}
}
@end @*/
if (! this.http && typeof XMLHttpRequest!='undefined') { this.http = new XMLHttpRequest(); }
/**
The url to download
@type String
*/
this.url = url;
/**
A universally unique ID number
@type integer
*/
this.id=null;
/**
Modification date, to be culled from the incoming headers
@type Date
@private
*/
this.lastModified = null;
/**
What to do when the download completes successfully
@type Function
@private
*/
this.callbackFunction = null;
/**
What to do on failure
@type Function
@private
*/
this.onFailure = null;
/**
Flag set on <code>abort</code>
@type boolean
*/
this.aborted = false;
/**
HTTP method. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html for possibilities.
@type String
*/
this.method='GET';
/**
Async flag.
@type boolean
*/
this.async=true;
}
new Downloader();
/** Submits the http request. */
Downloader.prototype.send = function (x) {
if (!this.http) { return null; }
return this.http.send(x);
};
/** Aborts the download, setting the <code>aborted</code> field to true. */
Downloader.prototype.abort = function () {
if (!this.http) { return null; }
this.aborted=true;
return this.http.abort();
};
/** Returns the downloaded data. */
Downloader.prototype.getData = function () {if (!this.http) { return null; } return this.http.responseText;};
/** Prepares the download. */
Downloader.prototype.setTarget = function () {
if (!this.http) { return null; }
this.http.open(this.method, this.url, this.async);
};
/** Gets the state of the download. */
Downloader.prototype.getReadyState=function () {if (!this.http) { return null; } return this.http.readyState;};
pg.misc.downloadsInProgress = { };
/** Starts the download.
Note that setTarget {@link Downloader#setTarget} must be run first
*/
Downloader.prototype.start=function () {
if (!this.http) { return; }
pg.misc.downloadsInProgress[this.id] = this;
this.http.send(null);
};
/** Gets the 'Last-Modified' date from the download headers.
Should be run after the download completes.
Returns <code>null</code> on failure.
@return {Date}
*/
Downloader.prototype.getLastModifiedDate=function () {
if(!this.http) { return null; }
var lastmod=null;
try {
lastmod=this.http.getResponseHeader('Last-Modified');
} catch (err) {}
if (lastmod) { return new Date(lastmod); }
return null;
};
/** Sets the callback function.
@param {Function} f callback function, called as <code>f(this)</code> on success
*/
Downloader.prototype.setCallback = function (f) {
if(!this.http) { return; }
this.http.onreadystatechange = f;
};
Downloader.prototype.getStatus = function() { if (!this.http) { return null; } return this.http.status; };
//////////////////////////////////////////////////
// helper functions
/** Creates a new {@link Downloader} and prepares it for action.
@param {String} url The url to download
@param {integer} id The ID of the {@link Downloader} object
@param {Function} callback The callback function invoked on success
@return {String/Downloader} the {@link Downloader} object created, or 'ohdear' if an unsupported browser
*/
function newDownload(url, id, callback, onfailure) {
var d=new Downloader(url);
if (!d.http) { return 'ohdear'; }
d.id=id;
d.setTarget();
if (!onfailure) {
onfailure=2;
}
var f = function () {
if (d.getReadyState() == 4) {
delete pg.misc.downloadsInProgress[this.id];
try {
if ( d.getStatus() == 200 ) {
d.data=d.getData();
d.lastModified=d.getLastModifiedDate();
callback(d);
} else if (typeof onfailure == typeof 1) {
if (onfailure > 0) {
// retry
newDownload(url, id, callback, onfailure - 1);
}
} else if (typeof onfailure == 'function') {
onfailure(d,url,id,callback);
}
} catch (somerr) { /* ignore it */ }
}
};
d.setCallback(f);
return d;
}
/** Simulates a download from cached data.
The supplied data is put into a {@link Downloader} as if it had downloaded it.
@param {String} url The url.
@param {integer} id The ID.
@param {Function} callback The callback, which is invoked immediately as <code>callback(d)</code>,
where <code>d</code> is the new {@link Downloader}.
@param {String} data The (cached) data.
@param {Date} lastModified The (cached) last modified date.
*/
function fakeDownload(url, id, callback, data, lastModified, owner) {
var d=newDownload(url,callback);
d.owner=owner;
d.id=id; d.data=data;
d.lastModified=lastModified;
return callback(d);
}
/**
Starts a download.
@param {String} url The url to download
@param {integer} id The ID of the {@link Downloader} object
@param {Function} callback The callback function invoked on success
@return {String/Downloader} the {@link Downloader} object created, or 'ohdear' if an unsupported browser
*/
function startDownload(url, id, callback) {
var d=newDownload(url, id, callback);
if (typeof d == typeof '' ) { return d; }
d.start();
return d;
}
/**
Aborts all downloads which have been started.
*/
function abortAllDownloads() {
for ( var x in pg.misc.downloadsInProgress ) {
try {
pg.misc.downloadsInProgress[x].aborted=true;
pg.misc.downloadsInProgress[x].abort();
delete pg.misc.downloadsInProgress[x];
} catch (e) { }
}
}
// ENDFILE: downloader.js
// STARTFILE: livepreview.js
// TODO: location is often not correct (eg relative links in previews)
/**
* InstaView - a Mediawiki to HTML converter in JavaScript
* Version 0.6.1
* Copyright (C) Pedro Fayolle 2005-2006
* http://en.wikipedia.org/wiki/User:Pilaf
* Distributed under the BSD license
*
* Changelog:
*
* 0.6.1
* - Fixed problem caused by \r characters
* - Improved inline formatting parser
*
* 0.6
* - Changed name to InstaView
* - Some major code reorganizations and factored out some common functions
* - Handled conversion of relative links (i.e. [[/foo]])
* - Fixed misrendering of adjacent definition list items
* - Fixed bug in table headings handling
* - Changed date format in signatures to reflect Mediawiki's
* - Fixed handling of [[:Image:...]]
* - Updated MD5 function (hopefully it will work with UTF-8)
* - Fixed bug in handling of links inside images
*
* To do:
* - Better support for <math>
* - Full support for <nowiki>
* - Parser-based (as opposed to RegExp-based) inline wikicode handling (make it one-pass and bullet-proof)
* - Support for templates (through AJAX)
* - Support for coloured links (AJAX)
*/
var Insta = {};
function setupLivePreview() {
// options
Insta.conf =
{
baseUrl: '',
user: {},
wiki: {
lang: pg.wiki.lang,
interwiki: pg.wiki.interwiki,
default_thumb_width: 180
},
paths: {
articles: pg.wiki.articlePath + '/',
// Only used for Insta previews with images. (not in popups)
math: '/math/',
images: '//upload.wikimedia.org/wikipedia/en/', // FIXME ( window.getImageUrlStart ? getImageUrlStart(pg.wiki.hostname) : ''),
images_fallback: '//upload.wikimedia.org/wikipedia/commons/',
magnify_icon: 'skins/common/images/magnify-clip.png'
},
locale: {
user: mw.config.get('wgFormattedNamespaces')[pg.nsUserId],
image: mw.config.get('wgFormattedNamespaces')[pg.nsImageId],
category: mw.config.get('wgFormattedNamespaces')[pg.nsCategoryId],
// shouldn't be used in popup previews, i think
months: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
}
};
// options with default values or backreferences
with (Insta.conf) {
user.name = user.name || 'Wikipedian';
user.signature = '[['+locale.user+':'+user.name+'|'+user.name+']]';
//paths.images = '//upload.wikimedia.org/wikipedia/' + wiki.lang + '/';
}
// define constants
Insta.BLOCK_IMAGE = new RegExp('^\\[\\[(?:File|Image|'+Insta.conf.locale.image+
'):.*?\\|.*?(?:frame|thumbnail|thumb|none|right|left|center)', 'i');
}
Insta.dump = function(from, to)
{
if (typeof from == 'string') { from = document.getElementById(from); }
if (typeof to == 'string') { to = document.getElementById(to); }
to.innerHTML = this.convert(from.value);
};
Insta.convert = function(wiki)
{
var ll = (typeof wiki == 'string')? wiki.replace(/\r/g,'').split(/\n/): wiki, // lines of wikicode
o = '', // output
p = 0, // para flag
$r; // result of passing a regexp to $()
// some shorthands
function remain() { return ll.length; }
function sh() { return ll.shift(); } // shift
function ps(s) { o += s; } // push
// similar to C's printf, uses ? as placeholders, ?? to escape question marks
function f()
{
var i=1, a=arguments, f=a[0], o='', c, p;
for (; i<a.length; i++) {
if ((p=f.indexOf('?'))+1) {
// allow character escaping
i -= c = f.charAt(p+1)=='?' ? 1 : 0;
o += f.substring(0,p) + (c ? '?' : a[i]);
f = f.substr(p+1+c);
} else { break; }
}
return o+f;
}
function html_entities(s) {
return s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
}
// Wiki text parsing to html is a nightmare.
// The below functions deliberately don't escape the ampersand since this would make it more difficult,
// and we don't absolutely need to for how we need it.
// This means that any unescaped ampersands in wikitext will remain unescaped and can cause invalid HTML.
// Browsers should all be able to handle it though.
// We also escape significant wikimarkup characters to prevent further matching on the processed text
function htmlescape_text(s) {
return s.replace(/</g,"<").replace(/>/g,">").replace(/:/g,":").replace(/\[/g,"[").replace(/]/g,"]");
}
function htmlescape_attr(s) {
return htmlescape_text(s).replace(/'/g,"'").replace(/"/g,""");
}
function max(a,b) { return (a>b)?a:b; }
function min(a,b) { return (a<b)?a:b; }
// return the first non matching character position between two strings
function str_imatch(a, b)
{
for (var i=0, l=min(a.length, b.length); i<l; i++) {
if (a.charAt(i)!=b.charAt(i)) { break; }
}
return i;
}
// compare current line against a string or regexp
// if passed a string it will compare only the first string.length characters
// if passed a regexp the result is stored in $r
function $(c) { return (typeof c == 'string') ? (ll[0].substr(0,c.length)==c) : ($r = ll[0].match(c)); }
function $$(c) { return ll[0]==c; } // compare current line against a string
function _(p) { return ll[0].charAt(p); } // return char at pos p
function endl(s) { ps(s); sh(); }
function parse_list()
{
var prev='';
while (remain() && $(/^([*#:;]+)(.*)$/)) {
var l_match = $r;
sh();
var ipos = str_imatch(prev, l_match[1]);
// close uncontinued lists
for (var i=prev.length-1; i >= ipos; i--) {
var pi = prev.charAt(i);
if (pi=='*') { ps('</ul>'); }
else if (pi=='#') { ps('</ol>'); }
// close a dl only if the new item is not a dl item (:, ; or empty)
else switch (l_match[1].charAt(i)) { case'':case'*':case'#': ps('</dl>') }
}
// open new lists
for (var i=ipos; i<l_match[1].length; i++) {
var li = l_match[1].charAt(i);
if (li=='*') { ps('<ul>'); }
else if (li=='#') { ps('<ol>'); }
// open a new dl only if the prev item is not a dl item (:, ; or empty)
else { switch(prev.charAt(i)) { case'':case'*':case'#': ps('<dl>') } }
}
switch (l_match[1].charAt(l_match[1].length-1)) {
case '*': case '#':
ps('<li>' + parse_inline_nowiki(l_match[2])); break
case ';':
ps('<dt>');
var dt_match;
// handle ;dt :dd format
if (dt_match = l_match[2].match(/(.*?)(:.*?)$/)) {
ps(parse_inline_nowiki(dt_match[1]))
ll.unshift(dt_match[2])
} else ps(parse_inline_nowiki(l_match[2]))
break;
case ':':
ps('<dd>' + parse_inline_nowiki(l_match[2]))
}
prev=l_match[1]
}
// close remaining lists
for (var i=prev.length-1; i>=0; i--)
ps(f('</?>', (prev.charAt(i)=='*')? 'ul': ((prev.charAt(i)=='#')? 'ol': 'dl')))
}
function parse_table()
{
endl(f('<table>', $(/^\{\|( .*)$/)? $r[1]: ''))
for (;remain();) if ($('|')) switch (_(1)) {
case '}': endl('</table>'); return
case '-': endl(f('<tr>', $(/\|-*(.*)/)[1])); break
default: parse_table_data()
}
else if ($('!')) parse_table_data()
else sh()
}
function parse_table_data()
{
var td_line, match_i
// 1: "|+", '|' or '+'
// 2: ??
// 3: attributes ??
// TODO: finish commenting this regexp
var td_match = sh().match(/^(\|\+|\||!)((?:([^[|]*?)\|(?!\|))?(.*))$/)
if (td_match[1] == '|+') ps('<caption');
else ps('<t' + ((td_match[1]=='|')?'d':'h'))
if (typeof td_match[3] != 'undefined') {
//ps(' ' + td_match[3])
match_i = 4
} else match_i = 2
ps('>')
if (td_match[1] != '|+') {
// use || or !! as a cell separator depending on context
// NOTE: when split() is passed a regexp make sure to use non-capturing brackets
td_line = td_match[match_i].split((td_match[1] == '|')? '||': /(?:\|\||!!)/)
ps(parse_inline_nowiki(td_line.shift()))
while (td_line.length) ll.unshift(td_match[1] + td_line.pop())
} else ps(td_match[match_i])
var tc = 0, td = []
for (;remain(); td.push(sh()))
if ($('|')) {
if (!tc) break // we're at the outer-most level (no nested tables), skip to td parse
else if (_(1)=='}') tc--
}
else if (!tc && $('!')) break
else if ($('{|')) tc++
if (td.length) ps(Insta.convert(td))
}
function parse_pre()
{
ps('<pre>')
do endl(parse_inline_nowiki(ll[0].substring(1)) + "\n"); while (remain() && $(' '))
ps('</pre>')
}
function parse_block_image()
{
ps(parse_image(sh()))
}
function parse_image(str)
{
//<NOLITE>
// get what's in between "[[Image:" and "]]"
var tag = str.substring(str.indexOf(':') + 1, str.length - 2);
var width;
var attr = [], filename, caption = '';
var thumb=0, frame=0, center=0;
var align='';
if (tag.match(/\|/)) {
// manage nested links
var nesting = 0;
var last_attr;
for (var i = tag.length-1; i > 0; i--) {
if (tag.charAt(i) == '|' && !nesting) {
last_attr = tag.substr(i+1);
tag = tag.substring(0, i);
break;
} else switch (tag.substr(i-1, 2)) {
case ']]':
nesting++;
i--;
break;
case '[[':
nesting--;
i--;
}
}
attr = tag.split(/\s*\|\s*/);
attr.push(last_attr);
filename = attr.shift();
var w_match;
for (;attr.length; attr.shift())
if (w_match = attr[0].match(/^(\d*)(?:[px]*\d*)?px$/)) width = w_match[1]
else switch(attr[0]) {
case 'thumb':
case 'thumbnail':
thumb=true;
case 'frame':
frame=true;
break;
case 'none':
case 'right':
case 'left':
center=false;
align=attr[0];
break;
case 'center':
center=true;
align='none';
break;
default:
if (attr.length == 1) caption = attr[0];
}
} else filename = tag;
var o='';
if (frame) {
if (align=='') align = 'right';
o += f("<div class='thumb t?'>", align);
if (thumb) {
if (!width) width = Insta.conf.wiki.default_thumb_width;
o += f("<div style='width:?px;'>?", 2+width*1, make_image(filename, caption, width)) +
f("<div class='thumbcaption'><div class='magnify' style='float:right'><a href='?' class='internal' title='Enlarge'><img src='?'></a></div>?</div>",
htmlescape_attr(Insta.conf.paths.articles + Insta.conf.locale.image + ':' + filename),
Insta.conf.paths.magnify_icon,
parse_inline_nowiki(caption)
)
} else {
o += '<div>' + make_image(filename, caption) + f("<div class='thumbcaption'>?</div>", parse_inline_nowiki(caption))
}
o += '</div></div>';
} else if (align != '') {
o += f("<div class='float?'><span>?</span></div>", align, make_image(filename, caption, width));
} else {
return make_image(filename, caption, width);
}
return center? f("<div class='center'>?</div>", o): o;
//</NOLITE>
}
function parse_inline_nowiki(str)
{
var start, lastend=0
var substart=0, nestlev=0, open, close, subloop;
var html='';
while (-1 != (start = str.indexOf('<nowiki>', substart))) {
html += parse_inline_wiki(str.substring(lastend, start));
start += 8;
substart = start;
subloop = true;
do {
open = str.indexOf('<nowiki>', substart);
close = str.indexOf('</nowiki>', substart);
if (close<=open || open==-1) {
if (close==-1) {
return html + html_entities(str.substr(start));
}
substart = close+9;
if (nestlev) {
nestlev--;
} else {
lastend = substart;
html += html_entities(str.substring(start, lastend-9));
subloop = false;
}
} else {
substart = open+8;
nestlev++;
}
} while (subloop)
}
return html + parse_inline_wiki(str.substr(lastend));
}
function make_image(filename, caption, width)
{
//<NOLITE>
// uppercase first letter in file name
filename = filename.charAt(0).toUpperCase() + filename.substr(1);
// replace spaces with underscores
filename = filename.replace(/ /g, '_');
caption = strip_inline_wiki(caption);
var md5 = hex_md5(filename);
var source = md5.charAt(0) + '/' + md5.substr(0,2) + '/' + filename;
if (width) width = "width='" + width + "px'";
var img = "<img onerror=\""+pg.escapeQuotesHTML("this.onerror=null;this.src='"+pg.jsescape(Insta.conf.paths.images_fallback + source)+"'")+"\" src=\""+pg.escapeQuotesHTML(Insta.conf.paths.images + source)+"\" "+(caption!='' ? "alt=\"" + pg.escapeQuotesHTML(caption) + "\"" : '')+" "+width+">";
return f("<a class='image' ? href=\"?\">?</a>", (caption!='')? "title=\"" + pg.escapeQuotesHTML(caption) + "\"" : '', pg.escapeQuotesHTML(Insta.conf.paths.articles + Insta.conf.locale.image + ':' + filename), img);
//</NOLITE>
}
function parse_inline_images(str)
{
//<NOLITE>
var start, substart=0, nestlev=0;
var loop, close, open, wiki, html;
while (-1 != (start=str.indexOf('[[', substart))) {
if(str.substr(start+2).match(RegExp('^(Image|File|' + Insta.conf.locale.image + '):','i'))) {
loop=true;
substart=start;
do {
substart+=2;
close=str.indexOf(']]',substart);
open=str.indexOf('[[',substart);
if (close<=open||open==-1) {
if (close==-1) return str;
substart=close;
if (nestlev) {
nestlev--;
} else {
wiki=str.substring(start,close+2);
html=parse_image(wiki);
str=str.replace(wiki,html);
substart=start+html.length;
loop=false;
}
} else {
substart=open;
nestlev++;
}
} while (loop)
} else break;
}
//</NOLITE>
return str;
}
// the output of this function doesn't respect the FILO structure of HTML
// but since most browsers can handle it I'll save myself the hassle
function parse_inline_formatting(str)
{
var em,st,i,li,o='';
while ((i=str.indexOf("''",li))+1) {
o += str.substring(li,i);
li=i+2;
if (str.charAt(i+2)=="'") {
li++;
st=!st;
o+=st?'<strong>':'</strong>';
} else {
em=!em;
o+=em?'<em>':'</em>';
}
}
return o+str.substr(li);
}
function parse_inline_wiki(str)
{
var aux_match;
str = parse_inline_images(str);
str = parse_inline_formatting(str);
// math
while (aux_match = str.match(/<(?:)math>(.*?)<\/math>/i)) {
var math_md5 = hex_md5(aux_match[1]);
str = str.replace(aux_match[0], f("<img src='?.png'>", Insta.conf.paths.math+math_md5));
}
// Build a Mediawiki-formatted date string
var date = new Date;
var minutes = date.getUTCMinutes();
if (minutes < 10) minutes = '0' + minutes;
var date = f("?:?, ? ? ? (UTC)", date.getUTCHours(), minutes, date.getUTCDate(), Insta.conf.locale.months[date.getUTCMonth()], date.getUTCFullYear());
// text formatting
return str.
// signatures
replace(/~{5}(?!~)/g, date).
replace(/~{4}(?!~)/g, Insta.conf.user.name+' '+date).
replace(/~{3}(?!~)/g, Insta.conf.user.name).
// [[:Category:...]], [[:Image:...]], etc...
replace(RegExp('\\[\\[:((?:'+Insta.conf.locale.category+'|Image|File|'+Insta.conf.locale.image+'|'+Insta.conf.wiki.interwiki+'):[^|]*?)\\]\\](\w*)','gi'), function($0,$1,$2){return f("<a href='?'>?</a>", Insta.conf.paths.articles + htmlescape_attr($1), htmlescape_text($1) + htmlescape_text($2));}).
// remove straight category and interwiki tags
replace(RegExp('\\[\\[(?:'+Insta.conf.locale.category+'|'+Insta.conf.wiki.interwiki+'):.*?\\]\\]','gi'),'').
// [[:Category:...|Links]], [[:Image:...|Links]], etc...
replace(RegExp('\\[\\[:((?:'+Insta.conf.locale.category+'|Image|File|'+Insta.conf.locale.image+'|'+Insta.conf.wiki.interwiki+'):.*?)\\|([^\\]]+?)\\]\\](\\w*)','gi'), function($0,$1,$2,$3){return f("<a href='?'>?</a>", Insta.conf.paths.articles + htmlescape_attr($1), htmlescape_text($2) + htmlescape_text($3));}).
// [[/Relative links]]
replace(/\[\[(\/[^|]*?)\]\]/g, function($0,$1){return f("<a href='?'>?</a>", Insta.conf.baseUrl + htmlescape_attr($1), htmlescape_text($1)); }).
// [[/Replaced|Relative links]]
replace(/\[\[(\/.*?)\|(.+?)\]\]/g, function($0,$1,$2){return f("<a href='?'>?</a>", Insta.conf.baseUrl + htmlescape_attr($1), htmlescape_text($2)); }).
// [[Common links]]
replace(/\[\[([^|]*?)\]\](\w*)/g, function($0,$1,$2){return f("<a href='?'>?</a>", Insta.conf.paths.articles + htmlescape_attr($1), htmlescape_text($1) + htmlescape_text($2)); }).
// [[Replaced|Links]]
replace(/\[\[(.*?)\|([^\]]+?)\]\](\w*)/g, function($0,$1,$2,$3){return f("<a href='?'>?</a>", Insta.conf.paths.articles + htmlescape_attr($1), htmlescape_text($2) + htmlescape_text($3)); }).
// [[Stripped:Namespace|Namespace]]
replace(/\[\[([^\]]*?:)?(.*?)( *\(.*?\))?\|\]\]/g, function($0,$1,$2,$3){return f("<a href='?'>?</a>", Insta.conf.paths.articles + htmlescape_attr($1) + htmlescape_attr($2) + htmlescape_attr($3), htmlescape_text($2)); }).
// External links
replace(/\[(https?|news|ftp|mailto|gopher|irc):(\/*)([^\]]*?) (.*?)\]/g, function($0,$1,$2,$3,$4){return f("<a class='external' href='?:?'>?</a>", htmlescape_attr($1), htmlescape_attr($2) + htmlescape_attr($3), htmlescape_text($4)); }).
replace(/\[http:\/\/(.*?)\]/g, function($0,$1){return f("<a class='external' href='http://?'>[#]</a>", htmlescape_attr($1)); }).
replace(/\[(news|ftp|mailto|gopher|irc):(\/*)(.*?)\]/g, function($0,$1,$2,$3,$4){return f("<a class='external' href='?:?'>?:?</a>", htmlescape_attr($1), htmlescape_attr($2) + htmlescape_attr($3), htmlescape_text($1), htmlescape_text($2) + htmlescape_text($3)); }).
replace(/(^| )(https?|news|ftp|mailto|gopher|irc):(\/*)([^ $]*[^.,!?;: $])/g, function($0,$1,$2,$3,$4){return f("?<a class='external' href='?:?'>?:?</a>", htmlescape_text($1), htmlescape_attr($2), htmlescape_attr($3) + htmlescape_attr($4), htmlescape_text($2), htmlescape_text($3) + htmlescape_text($4)); }).
replace('__NOTOC__','').
replace('__NOEDITSECTION__','');
}
/*
*/
function strip_inline_wiki(str)
{
return str
.replace(/\[\[[^\]]*\|(.*?)\]\]/g,'$1')
.replace(/\[\[(.*?)\]\]/g,'$1')
.replace(/''(.*?)''/g,'$1');
}
// begin parsing
for (;remain();) if ($(/^(={1,6})(.*)\1(.*)$/)) {
p=0
endl(f('<h?>?</h?>?', $r[1].length, parse_inline_nowiki($r[2]), $r[1].length, $r[3]))
} else if ($(/^[*#:;]/)) {
p=0
parse_list()
} else if ($(' ')) {
p=0
parse_pre()
} else if ($('{|')) {
p=0
parse_table()
} else if ($(/^----+$/)) {
p=0
endl('<hr>')
} else if ($(Insta.BLOCK_IMAGE)) {
p=0
parse_block_image()
} else {
// handle paragraphs
if ($$('')) {
if (p = (remain()>1 && ll[1]==(''))) endl('<p><br>')
} else {
if(!p) {
ps('<p>')
p=1
}
ps(parse_inline_nowiki(ll[0]) + ' ')
}
sh();
}
return o
};
window.wiki2html=function(txt,baseurl) {
Insta.conf.baseUrl=baseurl;
return Insta.convert(txt);
};
// ENDFILE: livepreview.js
// STARTFILE: pageinfo.js
//<NOLITE>
function popupFilterPageSize(data) {
return formatBytes(data.length);
}
function popupFilterCountLinks(data) {
var num=countLinks(data);
return String(num) + ' ' + ((num!=1)?popupString('wikiLinks'):popupString('wikiLink'));
}
function popupFilterCountImages(data) {
var num=countImages(data);
return String(num) + ' ' + ((num!=1)?popupString('images'):popupString('image'));
}
function popupFilterCountCategories(data) {
var num=countCategories(data);
return String(num) + ' ' + ((num!=1)?popupString('categories'):popupString('category'));
}
function popupFilterLastModified(data,download) {
var lastmod=download.lastModified;
var now=new Date();
var age=now-lastmod;
if (lastmod && getValueOf('popupLastModified')) {
return (tprintf('%s old', [formatAge(age)])).replace(RegExp(' ','g'), ' ');
}
return '';
}
function formatAge(age) {
// coerce into a number
var a=0+age, aa=a;
var seclen = 1000;
var minlen = 60*seclen;
var hourlen = 60*minlen;
var daylen = 24*hourlen;
var weeklen = 7*daylen;
var numweeks = (a-a%weeklen)/weeklen; a = a-numweeks*weeklen; var sweeks = addunit(numweeks, 'week');
var numdays = (a-a%daylen)/daylen; a = a-numdays*daylen; var sdays = addunit(numdays, 'day');
var numhours = (a-a%hourlen)/hourlen; a = a-numhours*hourlen; var shours = addunit(numhours,'hour');
var nummins = (a-a%minlen)/minlen; a = a-nummins*minlen; var smins = addunit(nummins, 'minute');
var numsecs = (a-a%seclen)/seclen; a = a-numsecs*seclen; var ssecs = addunit(numsecs, 'second');
if (aa > 4*weeklen) { return sweeks; }
if (aa > weeklen) { return sweeks + ' ' + sdays; }
if (aa > daylen) { return sdays + ' ' + shours; }
if (aa > 6*hourlen) { return shours; }
if (aa > hourlen) { return shours + ' ' + smins; }
if (aa > 10*minlen) { return smins; }
if (aa > minlen) { return smins + ' ' + ssecs; }
return ssecs;
}
function addunit(num,str) { return '' + num + ' ' + ((num!=1) ? popupString(str+'s') : popupString(str)) ;}
function runPopupFilters(list, data, download) {
var ret=[];
for (var i=0; i<list.length; ++i) {
if (list[i] && typeof list[i] == 'function') {
var s=list[i](data, download, download.owner.article);
if (s) { ret.push(s); }
}
}
return ret;
}
function getPageInfo(data, download) {
if (!data || data.length === 0) { return popupString('Empty page'); }
var popupFilters=getValueOf('popupFilters') || [];
var extraPopupFilters = getValueOf('extraPopupFilters') || [];
var pageInfoArray = runPopupFilters(popupFilters.concat(extraPopupFilters), data, download);
var pageInfo=pageInfoArray.join(', ');
if (pageInfo !== '' ) { pageInfo = upcaseFirst(pageInfo); }
return pageInfo;
}
// this could be improved!
function countLinks(wikiText) { return wikiText.split('[[').length - 1; }
// if N = # matches, n = # brackets, then
// String.parenSplit(regex) intersperses the N+1 split elements
// with Nn other elements. So total length is
// L= N+1 + Nn = N(n+1)+1. So N=(L-1)/(n+1).
function countImages(wikiText) {
return (wikiText.parenSplit(pg.re.image).length - 1) / (pg.re.imageBracketCount + 1);
}
function countCategories(wikiText) {
return (wikiText.parenSplit(pg.re.category).length - 1) / (pg.re.categoryBracketCount + 1);
}
function popupFilterStubDetect(data, download, article) {
var counts=stubCount(data, article);
if (counts.real) { return popupString('stub'); }
if (counts.sect) { return popupString('section stub'); }
return '';
}
function popupFilterDisambigDetect(data, download, article) {
if (getValueOf('popupOnlyArticleDabStub') && article.namespace()) { return ''; }
return (isDisambig(data, article)) ? popupString('disambig') : '';
}
function formatBytes(num) {
return (num > 949) ? (Math.round(num/100)/10+popupString('kB')) : (num +' ' + popupString('bytes')) ;
}
//</NOLITE>
// ENDFILE: pageinfo.js
// STARTFILE: titles.js
/**
@fileoverview Defines the {@link Title} class, and associated crufty functions.
<code>Title</code> deals with article titles and their various
forms. {@link Stringwrapper} is the parent class of
<code>Title</code>, which exists simply to make things a little
neater.
*/
/**
Creates a new Stringwrapper.
@constructor
@class the Stringwrapper class. This base class is not really
useful on its own; it just wraps various common string operations.
*/
function Stringwrapper() {
/**
Wrapper for this.toString().indexOf()
@param {String} x
@type integer
*/
this.indexOf=function(x){return this.toString().indexOf(x);};
/**
Returns this.value.
@type String
*/
this.toString=function(){return this.value;};
/**
Wrapper for {@link String#parenSplit} applied to this.toString()
@param {RegExp} x
@type Array
*/
this.parenSplit=function(x){return this.toString().parenSplit(x);};
/**
Wrapper for this.toString().substring()
@param {String} x
@param {String} y (optional)
@type String
*/
this.substring=function(x,y){
if (typeof y=='undefined') { return this.toString().substring(x); }
return this.toString().substring(x,y);
};
/**
Wrapper for this.toString().split()
@param {String} x
@type Array
*/
this.split=function(x){return this.toString().split(x);};
/**
Wrapper for this.toString().replace()
@param {String} x
@param {String} y
@type String
*/
this.replace=function(x,y){ return this.toString().replace(x,y); };
}
/**
Creates a new <code>Title</code>.
@constructor
@class The Title class. Holds article titles and converts them into
various forms. Also deals with anchors, by which we mean the bits
of the article URL after a # character, representing locations
within an article.
@param {String} value The initial value to assign to the
article. This must be the canonical title (see {@link
Title#value}. Omit this in the constructor and use another function
to set the title if this is unavailable.
*/
function Title(val) {
/**
The canonical article title. This must be in UTF-8 with no
entities, escaping or nasties. Also, underscores should be
replaced with spaces.
@type String
@private
*/
this.value=null;
/**
The canonical form of the anchor. This should be exactly as
it appears in the URL, i.e. with the .C3.0A bits in.
@type String
*/
this.anchor='';
this.setUtf(val);
}
Title.prototype=new Stringwrapper();
/**
Returns the canonical representation of the article title, optionally without anchor.
@param {boolean} omitAnchor
@fixme Decide specs for anchor
@return String The article title and the anchor.
*/
Title.prototype.toString=function(omitAnchor) {
return this.value + ( (!omitAnchor && this.anchor) ? '#' + this.anchorString() : '' );
};
Title.prototype.anchorString=function() {
if (!this.anchor) { return ''; }
var split=this.anchor.parenSplit(/((?:[.][0-9A-F]{2})+)/);
var len=split.length;
for (var j=1; j<len; j+=2) {
// FIXME s/decodeURI/decodeURIComponent/g ?
split[j]=decodeURIComponent(split[j].split('.').join('%')).split('_').join(' ');
}
return split.join('');
};
Title.prototype.urlAnchor=function() {
var split=this.anchor.parenSplit('/((?:[%][0-9A-F]{2})+)/');
var len=split.length;
for (var j=1; j<len; j+=2) {
split[j]=split[j].split('%').join('.');
}
return split.join('');
};
Title.prototype.anchorFromUtf=function(str) {
this.anchor=encodeURIComponent(str.split(' ').join('_'))
.split('%3A').join(':').split("'").join('%27').split('%').join('.');
};
Title.fromURL=function(h) {
return new Title().fromURL(h);
};
Title.prototype.fromURL=function(h) {
if (typeof h != 'string') {
this.value=null;
return this;
}
// NOTE : playing with decodeURI, encodeURI, escape, unescape,
// we seem to be able to replicate the IE borked encoding
// IE doesn't do this new-fangled utf-8 thing.
// and it's worse than that.
// IE seems to treat the query string differently to the rest of the url
// the query is treated as bona-fide utf8, but the first bit of the url is pissed around with
// we fix up & for all browsers, just in case.
var splitted=h.split('?');
splitted[0]=splitted[0].split('&').join('%26');
if (pg.flag.linksLikeIE6) {
splitted[0]=encodeURI(decode_utf8(splitted[0]));
}
h=splitted.join('?');
var contribs=pg.re.contribs.exec(h);
if (contribs !== null) {
if (contribs[1]=='title=') { contribs[3]=contribs[3].split('+').join(' '); }
var u=new Title(contribs[3]);
this.setUtf(this.decodeNasties(mw.config.get('wgFormattedNamespaces')[pg.nsUserId] + ':' + u.stripNamespace()));
return this;
}
var email=pg.re.email.exec(h);
if (email !== null) {
this.setUtf(this.decodeNasties(mw.config.get('wgFormattedNamespaces')[pg.nsUserId] + ':' + new Title(email[3]).stripNamespace()));
return this;
}
var backlinks=pg.re.backlinks.exec(h);
if (backlinks) {
this.setUtf(this.decodeNasties(new Title(backlinks[3])));
return this;
}
// no more special cases to check --
// hopefully it's not a disguised user-related or specially treated special page
var m=pg.re.main.exec(h);
if(m===null) { this.value=null; }
else {
var fromBotInterface = /[?](.+[&])?title=/.test(h);
if (fromBotInterface) {
m[2]=m[2].split('+').join('_');
}
var extracted = m[2] + (m[3] ? '#' + m[3] : '');
if (pg.flag.isSafari && /%25[0-9A-Fa-f]{2}/.test(extracted)) {
// Fix Safari issue
// Safari sometimes encodes % as %25 in UTF-8 encoded strings like %E5%A3 -> %25E5%25A3.
this.setUtf(decodeURIComponent(unescape(extracted)));
} else {
this.setUtf(this.decodeNasties(extracted));
}
}
return this;
};
Title.prototype.decodeNasties=function(txt) {
var ret= this.decodeEscapes(decodeURI(txt));
ret = ret.replace(/[_ ]*$/, '');
return ret;
};
Title.prototype.decodeEscapes=function(txt) {
var split=txt.parenSplit(/((?:[%][0-9A-Fa-f]{2})+)/);
var len=split.length;
for (var i=1; i<len; i=i+2) {
// FIXME is decodeURIComponent better?
split[i]=unescape(split[i]);
}
return split.join('');
};
Title.fromAnchor=function(a) {
return new Title().fromAnchor(a);
};
Title.prototype.fromAnchor=function(a) {
if (!a) { this.value=null; return this; }
return this.fromURL(a.href);
};
Title.fromWikiText=function(txt) {
return new Title().fromWikiText(txt);
};
Title.prototype.fromWikiText=function(txt) {
// FIXME - testing needed
if (!pg.flag.linksLikeIE6) { txt=myDecodeURI(txt); }
this.setUtf(txt);
return this;
};
Title.prototype.hintValue=function(){
if(!this.value) { return ''; }
return safeDecodeURI(this.value);
};
//<NOLITE>
Title.prototype.toUserName=function(withNs) {
if (this.namespaceId() != pg.nsUserId && this.namespaceId() != pg.nsUsertalkId) {
this.value=null;
return;
}
this.value = (withNs ? mw.config.get('wgFormattedNamespaces')[pg.nsUserId] + ':' : '') + this.stripNamespace().split('/')[0];
};
Title.prototype.userName=function(withNs) {
var t=(new Title(this.value));
t.toUserName(withNs);
if (t.value) { return t; }
return null;
};
Title.prototype.toTalkPage=function() {
// convert article to a talk page, or if we can't, return null
// In other words: return null if this ALREADY IS a talk page
// and return the corresponding talk page otherwise
//
// Per http://www.mediawiki.org/wiki/Manual:Namespace#Subject_and_talk_namespaces
// * All discussion namespaces have odd-integer indices
// * The discussion namespace index for a specific namespace with index n is n + 1
if (this.value===null) { return null; }
var namespaceId = this.namespaceId();
if (namespaceId>=0 && namespaceId % 2 == 0) //non-special and subject namespace
{
var localizedNamespace = mw.config.get('wgFormattedNamespaces')[namespaceId+1];
if (typeof localizedNamespace!=='undefined')
{
if (localizedNamespace==='') return this.value = this.stripNamespace();
this.value = localizedNamespace.split(' ').join('_') + ':' + this.stripNamespace();
return this.value;
}
}
this.value=null;
return null;
};
//</NOLITE>
// Return canonical, localized namespace
Title.prototype.namespace=function() {
return mw.config.get('wgFormattedNamespaces')[this.namespaceId()];
};
Title.prototype.namespaceId=function() {
var n=this.value.indexOf(':');
if (n<0) { return 0; } //mainspace
var namespaceId = mw.config.get('wgNamespaceIds')[this.value.substring(0,n).split(' ').join('_').toLowerCase()];
if (typeof namespaceId=='undefined') return 0; //mainspace
return namespaceId;
};
//<NOLITE>
Title.prototype.talkPage=function() {
var t=new Title(this.value);
t.toTalkPage();
if (t.value) { return t; }
return null;
};
Title.prototype.isTalkPage=function() {
if (this.talkPage()===null) { return true; }
return false;
};
Title.prototype.toArticleFromTalkPage=function() {
//largely copy/paste from toTalkPage above.
if (this.value===null) { return null; }
var namespaceId = this.namespaceId();
if (namespaceId>=0 && namespaceId % 2 == 1) //non-special and talk namespace
{
var localizedNamespace = mw.config.get('wgFormattedNamespaces')[namespaceId-1];
if (typeof localizedNamespace!=='undefined')
{
if (localizedNamespace==='') return this.value = this.stripNamespace();
this.value = localizedNamespace.split(' ').join('_') + ':' + this.stripNamespace();
return this.value;
}
}
this.value=null;
return null;
};
Title.prototype.articleFromTalkPage=function() {
var t=new Title(this.value);
t.toArticleFromTalkPage();
if (t.value) { return t; }
return null;
};
Title.prototype.articleFromTalkOrArticle=function() {
var t=new Title(this.value);
if ( t.toArticleFromTalkPage() ) { return t; }
return this;
};
Title.prototype.isIpUser=function() {
return pg.re.ipUser.test(this.userName());
};
//</NOLITE>
Title.prototype.stripNamespace=function(){ // returns a string, not a Title
var n=this.value.indexOf(':');
if (n<0) { return this.value; }
var namespaceId = this.namespaceId();
if (namespaceId===pg.nsMainspaceId) return this.value;
return this.value.substring(n+1);
};
Title.prototype.setUtf=function(value){
if (!value) { this.value=''; return; }
var anch=value.indexOf('#');
if(anch < 0) { this.value=value.split('_').join(' '); this.anchor=''; return; }
this.value=value.substring(0,anch).split('_').join(' ');
this.anchor=value.substring(anch+1);
this.ns=null; // wait until namespace() is called
};
Title.prototype.setUrl=function(urlfrag) {
var anch=urlfrag.indexOf('#');
this.value=safeDecodeURI(urlfrag.substring(0,anch));
this.anchor=value.substring(anch+1);
};
Title.prototype.append=function(x){
this.setUtf(this.value + x);
};
Title.prototype.urlString=function(x) {
x || ( x={} );
var v=this.toString(true);
if (!x.omitAnchor && this.anchor) { v+= '#' + this.urlAnchor(); }
if (!x.keepSpaces) { v=v.split(' ').join('_'); }
return encodeURI(v).split('&').join('%26').split('?').join('%3F').split('+').join('%2B');
};
Title.prototype.removeAnchor=function() {
return new Title(this.toString(true));
};
Title.prototype.toUrl=function() {
return pg.wiki.titlebase + this.urlString();
};
function paramValue(param, url) {
var s=url.parenSplit(RegExp('[?&]' + literalizeRegex(param) + '=([^?&]*)'));
if (!url) { return null; }
return s[1] || null;
}
function parseParams(url) {
var ret={};
if (url.indexOf('?')==-1) { return ret; }
var s=url.split('?').slice(1).join();
var t=s.split('&');
for (var i=0; i<t.length; ++i) {
var z=t[i].split('=');
z.push(null);
ret[z[0]]=z[1];
}
return ret;
}
// all sorts of stuff here
// FIXME almost everything needs to be rewritten
function oldidFromAnchor(a) { return paramValue('oldid', a.href); }
//function diffFromAnchor(a) { return paramValue('diff', a.href); }
function wikiMarkupToAddressFragment (str) { // for images
var ret = safeDecodeURI(str);
ret = ret.split(' ').join('_');
ret = encodeURI(ret);
return ret;
}
// (a) myDecodeURI (first standard decodeURI, then pg.re.urlNoPopup)
// (b) change spaces to underscores
// (c) encodeURI (just the straight one, no pg.re.urlNoPopup)
function myDecodeURI (str) {
var ret;
// FIXME decodeURIComponent??
try { ret=decodeURI(str.toString()); }
catch (summat) { return str; }
for (var i=0; i<pg.misc.decodeExtras.length; ++i) {
var from=pg.misc.decodeExtras[i].from;
var to=pg.misc.decodeExtras[i].to;
ret=ret.split(from).join(to);
}
return ret;
}
function safeDecodeURI(str) { var ret=myDecodeURI(str); return ret || str; }
///////////
// TESTS //
///////////
//<NOLITE>
function isIpUser(user) {return pg.re.ipUser.test(user);}
function isDisambig(data, article) {
if (!getValueOf('popupAllDabsStubs') && article.namespace()) { return false; }
return ! article.isTalkPage() && pg.re.disambig.test(data);
}
function stubCount(data, article) {
if (!getValueOf('popupAllDabsStubs') && article.namespace()) { return false; }
var sectStub=0;
var realStub=0;
if (pg.re.stub.test(data)) {
var s=data.parenSplit(pg.re.stub);
for (var i=1; i<s.length; i=i+2) {
if (s[i]) { ++sectStub; }
else { ++realStub; }
}
}
return { real: realStub, sect: sectStub };
}
function isValidImageName(str){ // extend as needed...
return ( str.indexOf('{') == -1 );
}
function isInStrippableNamespace(article) {
//I believe that this method means to return whether the given article is in a namspace without subpages. Meaning, it's broken.
return ( article.namespace() !== '' );
}
function isInMainNamespace(article) { return !isInStrippableNamespace(article); }
function anchorContainsImage(a) {
// iterate over children of anchor a
// see if any are images
if (a===null) { return false; }
kids=a.childNodes;
for (var i=0; i<kids.length; ++i) { if (kids[i].nodeName=='IMG') { return true; } }
return false;
}
//</NOLITE>
function isPopupLink(a) {
// NB for performance reasons, TOC links generally return true
// they should be stripped out later
if (!markNopopupSpanLinks.done) { markNopopupSpanLinks(); }
if (a.inNopopupSpan) { return false; }
// FIXME is this faster inline?
if (a.onmousedown || a.getAttribute('nopopup')) { return false; }
var h=a.href;
if (h===document.location.href+'#') { return false; }
if (!pg.re.basenames.test(h)) { return false; }
if (!pg.re.urlNoPopup.test(h)) { return true; }
return (
(pg.re.email.test(h) || pg.re.contribs.test(h) || pg.re.backlinks.test(h)) &&
h.indexOf('&limit=') == -1 );
}
function markNopopupSpanLinks() {
if( !getValueOf('popupOnlyArticleLinks'))
fixVectorMenuPopups();
var s=getElementsByClassName(document, '*', "nopopups")
for (var i=0; i<s.length; ++i) {
var as=s[i].getElementsByTagName('a');
for (var j=0; j<as.length; ++j) {
as[j].inNopopupSpan=true;
}
}
markNopopupSpanLinks.done=true;
}
function fixVectorMenuPopups() {
var vmenus = getElementsByClassName( document, 'div', 'vectorMenu');
for( i= 0; vmenus && i< vmenus.length; i++ ) {
var h5 = vmenus[i].getElementsByTagName('h5')[0];
if( h5) var a = h5.getElementsByTagName('a')[0];
if( a ) a.inNopopupSpan=true;
}
}
// ENDFILE: titles.js
// STARTFILE: cookies.js
//<NOLITE>
//////////////////////////////////////////////////
// Cookie handling
// from http://www.quirksmode.org/js/cookies.html
var Cookie= {
create: function(name,value,days)
{
var expires;
if (days)
{
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
expires = "; expires="+date.toGMTString();
}
else { expires = ""; }
document.cookie = name+"="+value+expires+"; path=/";
},
read: function(name)
{
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++)
{
var c = ca[i];
while (c.charAt(0)==' ') { c = c.substring(1,c.length); }
if (c.indexOf(nameEQ) === 0) { return c.substring(nameEQ.length,c.length); }
}
return null;
},
erase: function(name)
{
Cookie.create(name,"",-1);
}
};
//</NOLITE>
// ENDFILE: cookies.js
// STARTFILE: getpage.js
//////////////////////////////////////////////////
// Wiki-specific downloading
//
// Schematic for a getWiki call
//
// getWiki->-getPageWithCaching
// |
// false | true
// getPage<-[findPictureInCache]->-onComplete(a fake download)
// \.
// (async)->addPageToCache(download)->-onComplete(download)
/** @todo {document}
@param {Title} article
@param {Function} onComplete
@param {integer} oldid
@param {Navapopup} owner
*/
function getWiki(article, onComplete, oldid, owner) {
// set ctype=text/css to get around opera gzip bug
var url = pg.wiki.titlebase + article.removeAnchor().urlString() +
'&action=raw&ctype=text/css';
if (oldid || oldid===0 || oldid==='0') { url += '&oldid='+oldid; }
url += '&maxage=0&smaxage=0';
getPageWithCaching(url, onComplete, owner);
}
// check cache to see if page exists
function getPageWithCaching(url, onComplete, owner) {
log('getPageWithCaching, url='+url);
var i=findInPageCache(url);
if (i > -1) {
var d=fakeDownload(url, owner.idNumber, onComplete,
pg.cache.pages[i].data, pg.cache.pages[i].lastModified,
owner);
} else {
var d=getPage(url, onComplete, owner);
if (d && owner && owner.addDownload) {
owner.addDownload(d);
d.owner=owner;
}
}
}
function getPage(url, onComplete, owner) {
log('getPage');
var callback= function (d) { if (!d.aborted) {addPageToCache(d); onComplete(d);} };
return startDownload(url, owner.idNumber, callback);
}
function findInPageCache(url) {
for (var i=0; i<pg.cache.pages.length; ++i) {
if (url==pg.cache.pages[i].url) { return i; }
}
return -1;
}
function addPageToCache(download) {
log('addPageToCache '+download.url);
var page = {url: download.url, data: download.data, lastModified: download.lastModified};
return pg.cache.pages.push(page);
}
// ENDFILE: getpage.js
// STARTFILE: md5-2.2alpha.js
//<NOLITE>
/*
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 2.2-alpha Copyright (C) Paul Johnston 1999 - 2005
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for more info.
*/
/*
* Configurable variables. You may need to tweak these to be compatible with
* the server-side, but the defaults work in most cases.
*/
var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
/*
* These are the functions you'll usually want to call
* They take string arguments and return either hex or base-64 encoded strings
*/
function hex_md5(s) { return rstr2hex(rstr_md5(str2rstr_utf8(s))); }
function b64_md5(s) { return rstr2b64(rstr_md5(str2rstr_utf8(s))); }
function any_md5(s, e) { return rstr2any(rstr_md5(str2rstr_utf8(s)), e); }
function hex_hmac_md5(k, d)
{ return rstr2hex(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d))); }
function b64_hmac_md5(k, d)
{ return rstr2b64(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d))); }
function any_hmac_md5(k, d, e)
{ return rstr2any(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d)), e); }
/*
* Perform a simple self-test to see if the VM is working
*/
function md5_vm_test()
{
return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
}
/*
* Calculate the MD5 of a raw string
*/
function rstr_md5(s)
{
return binl2rstr(binl_md5(rstr2binl(s), s.length * 8));
}
/*
* Calculate the HMAC-MD5, of a key and some data (raw strings)
*/
function rstr_hmac_md5(key, data)
{
var bkey = rstr2binl(key);
if(bkey.length > 16) bkey = binl_md5(bkey, key.length * 8);
var ipad = Array(16), opad = Array(16);
for(var i = 0; i < 16; i++)
{
ipad[i] = bkey[i] ^ 0x36363636;
opad[i] = bkey[i] ^ 0x5C5C5C5C;
}
var hash = binl_md5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
return binl2rstr(binl_md5(opad.concat(hash), 512 + 128));
}
/*
* Convert a raw string to a hex string
*/
function rstr2hex(input)
{
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
var output = "";
var x;
for(var i = 0; i < input.length; i++)
{
x = input.charCodeAt(i);
output += hex_tab.charAt((x >>> 4) & 0x0F)
+ hex_tab.charAt( x & 0x0F);
}
return output;
}
/*
* Convert a raw string to a base-64 string
*/
function rstr2b64(input)
{
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var output = "";
var len = input.length;
for(var i = 0; i < len; i += 3)
{
var triplet = (input.charCodeAt(i) << 16)
| (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)
| (i + 2 < len ? input.charCodeAt(i+2) : 0);
for(var j = 0; j < 4; j++)
{
if(i * 8 + j * 6 > input.length * 8) output += b64pad;
else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F);
}
}
return output;
}
/*
* Convert a raw string to an arbitrary string encoding
*/
function rstr2any(input, encoding)
{
var divisor = encoding.length;
var remainders = Array();
var i, q, x, quotient;
/* Convert to an array of 16-bit big-endian values, forming the dividend */
var dividend = Array(input.length / 2);
for(i = 0; i < dividend.length; i++)
{
dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1);
}
/*
* Repeatedly perform a long division. The binary array forms the dividend,
* the length of the encoding is the divisor. Once computed, the quotient
* forms the dividend for the next step. We stop when the dividend is zero.
* All remainders are stored for later use.
*/
while(dividend.length > 0)
{
quotient = Array();
x = 0;
for(i = 0; i < dividend.length; i++)
{
x = (x << 16) + dividend[i];
q = Math.floor(x / divisor);
x -= q * divisor;
if(quotient.length > 0 || q > 0)
quotient[quotient.length] = q;
}
remainders[remainders.length] = x;
dividend = quotient;
}
/* Convert the remainders to the output string */
var output = "";
for(i = remainders.length - 1; i >= 0; i--)
output += encoding.charAt(remainders[i]);
return output;
}
/*
* Encode a string as utf-8.
* For efficiency, this assumes the input is valid utf-16.
*/
function str2rstr_utf8(input)
{
var output = "";
var i = -1;
var x, y;
while(++i < input.length)
{
/* Decode utf-16 surrogate pairs */
x = input.charCodeAt(i);
y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0;
if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF)
{
x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF);
i++;
}
/* Encode output as utf-8 */
if(x <= 0x7F)
output += String.fromCharCode(x);
else if(x <= 0x7FF)
output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),
0x80 | ( x & 0x3F));
else if(x <= 0xFFFF)
output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),
0x80 | ((x >>> 6 ) & 0x3F),
0x80 | ( x & 0x3F));
else if(x <= 0x1FFFFF)
output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),
0x80 | ((x >>> 12) & 0x3F),
0x80 | ((x >>> 6 ) & 0x3F),
0x80 | ( x & 0x3F));
}
return output;
}
/*
* Encode a string as utf-16
*/
function str2rstr_utf16le(input)
{
var output = "";
for(var i = 0; i < input.length; i++)
output += String.fromCharCode( input.charCodeAt(i) & 0xFF,
(input.charCodeAt(i) >>> 8) & 0xFF);
return output;
}
function str2rstr_utf16be(input)
{
var output = "";
for(var i = 0; i < input.length; i++)
output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF,
input.charCodeAt(i) & 0xFF);
return output;
}
/*
* Convert a raw string to an array of little-endian words
* Characters >255 have their high-byte silently ignored.
*/
function rstr2binl(input)
{
var output = Array(input.length >> 2);
for(var i = 0; i < output.length; i++)
output[i] = 0;
for(var i = 0; i < input.length * 8; i += 8)
output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (i%32);
return output;
}
/*
* Convert an array of little-endian words to a string
*/
function binl2rstr(input)
{
var output = "";
for(var i = 0; i < input.length * 32; i += 8)
output += String.fromCharCode((input[i>>5] >>> (i % 32)) & 0xFF);
return output;
}
/*
* Calculate the MD5 of an array of little-endian words, and a bit length.
*/
function binl_md5(x, len)
{
/* append padding */
x[len >> 5] |= 0x80 << ((len) % 32);
x[(((len + 64) >>> 9) << 4) + 14] = len;
var a = 1732584193;
var b = -271733879;
var c = -1732584194;
var d = 271733878;
for(var i = 0; i < x.length; i += 16)
{
var olda = a;
var oldb = b;
var oldc = c;
var oldd = d;
a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
a = safe_add(a, olda);
b = safe_add(b, oldb);
c = safe_add(c, oldc);
d = safe_add(d, oldd);
}
return Array(a, b, c, d);
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function md5_cmn(q, a, b, x, s, t)
{
return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
}
function md5_ff(a, b, c, d, x, s, t)
{
return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
}
function md5_gg(a, b, c, d, x, s, t)
{
return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
}
function md5_hh(a, b, c, d, x, s, t)
{
return md5_cmn(b ^ c ^ d, a, b, x, s, t);
}
function md5_ii(a, b, c, d, x, s, t)
{
return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
}
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safe_add(x, y)
{
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
return (msw << 16) | (lsw & 0xFFFF);
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function bit_rol(num, cnt)
{
return (num << cnt) | (num >>> (32 - cnt));
}
//</NOLITE>
// ENDFILE: md5-2.2alpha.js
// STARTFILE: parensplit.js
//////////////////////////////////////////////////
// parenSplit
// String.prototype.parenSplit should do what ECMAscript says String.prototype.split does,
// interspersing paren matches (regex capturing groups) between the split elements.
// i.e. 'abc'.split(/(b)/)) should return ['a','b','c'], not ['a','c']
if (String('abc'.split(/(b)/))!='a,b,c') {
// broken String.split, e.g. konq, IE
String.prototype.parenSplit=function (re) {
re=nonGlobalRegex(re);
var s=this;
var m=re.exec(s);
var ret=[];
while (m && s) {
// without the following loop, we have
// 'ab'.parenSplit(/a|(b)/) != 'ab'.split(/a|(b)/)
for(var i=0; i<m.length; ++i) {
if (typeof m[i]=='undefined') m[i]='';
}
ret.push(s.substring(0,m.index));
ret = ret.concat(m.slice(1));
s=s.substring(m.index + m[0].length);
m=re.exec(s);
}
ret.push(s);
return ret;
};
} else {
String.prototype.parenSplit=function (re) { return this.split(re); };
String.prototype.parenSplit.isNative=true;
}
function nonGlobalRegex(re) {
var s=re.toString();
flags='';
for (var j=s.length; s.charAt(j) != '/'; --j) {
if (s.charAt(j) != 'g') { flags += s.charAt(j); }
}
var t=s.substring(1,j);
return RegExp(t,flags);
}
// ENDFILE: parensplit.js
// STARTFILE: tools.js
// IE madness with encoding
// ========================
//
// suppose throughout that the page is in utf8, like wikipedia
//
// if a is an anchor DOM element and a.href should consist of
//
// http://host.name.here/wiki/foo?bar=baz
//
// then IE gives foo as "latin1-encoded" utf8; we have foo = decode_utf8(decodeURI(foo_ie))
// but IE gives bar=baz correctly as plain utf8
//
// ---------------------------------
//
// IE's xmlhttp doesn't understand utf8 urls. Have to use encodeURI here.
//
// ---------------------------------
//
// summat else
// Source: http://aktuell.de.selfhtml.org/artikel/javascript/utf8b64/utf8.htm
//<NOLITE>
function encode_utf8(rohtext) {
// dient der Normalisierung des Zeilenumbruchs
rohtext = rohtext.replace(/\r\n/g,"\n");
var utftext = "";
for(var n=0; n<rohtext.length; n++)
{
// ermitteln des Unicodes des aktuellen Zeichens
var c=rohtext.charCodeAt(n);
// alle Zeichen von 0-127 => 1byte
if (c<128)
utftext += String.fromCharCode(c);
// alle Zeichen von 127 bis 2047 => 2byte
else if((c>127) && (c<2048)) {
utftext += String.fromCharCode((c>>6)|192);
utftext += String.fromCharCode((c&63)|128);}
// alle Zeichen von 2048 bis 66536 => 3byte
else {
utftext += String.fromCharCode((c>>12)|224);
utftext += String.fromCharCode(((c>>6)&63)|128);
utftext += String.fromCharCode((c&63)|128);}
}
return utftext;
}
function getJsObj(json) {
try {
var json_ret = eval('(' + json + ')');
} catch (someError) {
errlog('Something went wrong with getJsobj, json='+json);
return 1;
}
if( json_ret['warnings'] ) {
for( var w=0; w < json_ret['warnings'].length; w++ ) {
log( json_ret['warnings'][w]['*'] );
}
} else if ( json_ret['error'] ) {
errlog( json_ret['error'].code + ': ' + json_ret['error'].info );
}
return json_ret;
}
function anyChild(obj) {
for (var p in obj) {
return obj[p];
}
return null;
}
//</NOLITE>
function decode_utf8(utftext) {
var plaintext = ""; var i=0, c=0, c1=0, c2=0;
// while-Schleife, weil einige Zeichen uebersprungen werden
while(i<utftext.length)
{
c = utftext.charCodeAt(i);
if (c<128) {
plaintext += String.fromCharCode(c);
i++;}
else if((c>191) && (c<224)) {
c2 = utftext.charCodeAt(i+1);
plaintext += String.fromCharCode(((c&31)<<6) | (c2&63));
i+=2;}
else {
c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2);
plaintext += String.fromCharCode(((c&15)<<12) | ((c2&63)<<6) | (c3&63));
i+=3;}
}
return plaintext;
}
function upcaseFirst(str) {
if (typeof str != typeof '' || str=='') return '';
return str.charAt(0).toUpperCase() + str.substring(1);
}
function findInArray(arr, foo) {
if (!arr || !arr.length) { return -1; }
var len=arr.length;
for (var i=0; i<len; ++i) { if (arr[i]==foo) { return i; } }
return -1;
}
function nextOne (array, value) {
// NB if the array has two consecutive entries equal
// then this will loop on successive calls
var i=findInArray(array, value);
if (i<0) { return null; }
return array[i+1];
}
function literalizeRegex(str){
return str.replace(RegExp('([-.|()\\\\+?*^${}\\[\\]])', 'g'), '\\$1');
}
String.prototype.entify=function() {
//var shy='­';
return this.split('&').join('&').split('<').join('<').split('>').join('>'/*+shy*/).split('"').join('"');
};
function findThis(array, value) {
if (typeof array.length == 'undefined') { return null; }
for (var i=0; i<array.length; ++i) {
if (array[i]==value) { return i; }
}
return null;
}
function removeNulls(list) {
var ret=[];
for (var i=0; i<list.length; ++i) {
if (list[i]) {
ret.push(list[i]);
}
}
return ret;
}
function joinPath(list) {
return removeNulls(list).join('/');
}
function simplePrintf(str, subs) {
if (!str || !subs) { return str; }
var ret=[];
var s=str.parenSplit(/(%s|\$[0-9]+)/);
var i=0;
do {
ret.push(s.shift());
if ( !s.length ) { break; }
var cmd=s.shift();
if (cmd == '%s') {
if ( i < subs.length ) { ret.push(subs[i]); } else { ret.push(cmd); }
++i;
} else {
var j=parseInt( cmd.replace('$', ''), 10 ) - 1;
if ( j > -1 && j < subs.length ) { ret.push(subs[j]); } else { ret.push(cmd); }
}
} while (s.length > 0);
return ret.join('');
}
function max(a,b){return a<b ? b : a;}
function min(a,b){return a>b ? b : a;}
function isString(x) { return (typeof x === 'string' || x instanceof String); }
//function isNumber(x) { return (typeof x === 'number' || x instanceof Number); }
function isRegExp(x) { return x instanceof RegExp; }
function isArray (x) { return x instanceof Array; }
function isObject(x) { return x instanceof Object; }
function isFunction(x) {
return !isRegExp(x) && (typeof x === 'function' || x instanceof Function);
}
function repeatString(s,mult) {
var ret='';
for (var i=0; i<mult; ++i) { ret += s; }
return ret;
}
function zeroFill(s, min) {
min = min || 2;
var t=s.toString();
return repeatString('0', min - t.length) + t;
}
function map(f, o) {
if (isArray(o)) { return map_array(f,o); }
return map_object(f,o);
}
function map_array(f,o) {
var ret=[];
for (var i=0; i<o.length; ++i) {
ret.push(f(o[i]));
}
return ret;
}
function map_object(f,o) {
var ret={};
for (var i in o) { ret[o]=f(o[i]); }
return ret;
}
pg.escapeQuotesHTML = function ( text ) { var re = new RegExp( '&', "g" ); text = text.replace( re, "&" ); re = new RegExp( '"', "g" ); text = text.replace( re, """ ); re = new RegExp( '<', "g" ); text = text.replace( re, "<" ); re = new RegExp( '>', "g" ); text = text.replace( re, ">" ); return text;}
pg.jsescape = function(s)
{
if (typeof s !== "string") throw "Invalid type in pg.jsescape";
var res = "";
//this can be optimized by copying substrings instead of char by char!
for (var i=0; i<s.length; i++)
{
var c = s[i];
switch (c)
{
case '\b': res += '\\b'; continue;
case '\f': res += '\\f'; continue;
case '\n': res += '\\n'; continue;
case '\0': res += '\\0'; continue;
case '\r': res += '\\r'; continue;
case '\t': res += '\\t'; continue;
case '\v': res += '\\v'; continue;
case '\\': res += '\\\\'; continue;
case '\"': res += '\\\"'; continue;
case '\'': res += '\\\''; continue;
continue;
default:
if (c < ' ' || c==='<' || c==='>' || c==="'")
{
var unicodeChar = c.charCodeAt(0).toString(16).toUpperCase();
res += "\\u" + (unicodeChar.length>1?"00":"000") + unicodeChar;
}
else
{
res += c;
}
}
}
return res;
}
// ENDFILE: tools.js
// STARTFILE: dab.js
//<NOLITE>
//////////////////////////////////////////////////
// Dab-fixing code
//
function retargetDab(newTarget, oldTarget, friendlyCurrentArticleName, titleToEdit) {
log('retargetDab: newTarget='+newTarget + ' oldTarget=' + oldTarget);
return changeLinkTargetLink(
{newTarget: newTarget,
text: newTarget.split(' ').join(' '),
hint: tprintf('disambigHint', [newTarget]),
summary: simplePrintf(
getValueOf('popupFixDabsSummary'), [friendlyCurrentArticleName, newTarget ]),
clickButton: 'wpDiff', minor: true, oldTarget: oldTarget,
watch: getValueOf('popupWatchDisambiggedPages'),
title: titleToEdit});
}
function listLinks(wikitext, oldTarget, titleToEdit) {
// mediawiki strips trailing spaces, so we do the same
// testcase: http://en.wikipedia.org/w/index.php?title=Radial&oldid=97365633
var reg=RegExp('\\[\\[([^|]*?) *(\\||\\]\\])', 'gi');
var ret=[];
var splitted=wikitext.parenSplit(reg);
// ^[a-z]+ should match interwiki links, hopefully (case-insensitive)
// and ^[a-z]* should match those and [[:Category...]] style links too
var omitRegex=RegExp('^[a-z]*:|^[Ss]pecial:|^[Ii]mage|^[Cc]ategory');
var friendlyCurrentArticleName= oldTarget.toString();
var wikPos = getValueOf('popupDabWiktionary');
for (var i=1; i<splitted.length; i=i+3) {
if (typeof splitted[i] == typeof 'string' && splitted[i].length>0 && !omitRegex.test(splitted[i])) {
ret.push( retargetDab(splitted[i], oldTarget, friendlyCurrentArticleName, titleToEdit) );
} /* if */
} /* for loop */
ret = rmDupesFromSortedList(ret.sort());
if (wikPos) {
var wikTarget='wiktionary:' +
friendlyCurrentArticleName.replace( RegExp('^(.+)\\s+[(][^)]+[)]\\s*$'), '$1' );
var meth;
if (wikPos.toLowerCase() == 'first') { meth = 'unshift'; }
else { meth = 'push'; }
ret[meth]( retargetDab(wikTarget, oldTarget, friendlyCurrentArticleName, titleToEdit) );
}
ret.push(changeLinkTargetLink(
{ newTarget: null,
text: popupString('remove this link').split(' ').join(' '),
hint: popupString("remove all links to this disambig page from this article"),
clickButton: "wpDiff", oldTarget: oldTarget,
summary: simplePrintf(getValueOf('popupRmDabLinkSummary'), [friendlyCurrentArticleName]),
watch: getValueOf('popupWatchDisambiggedPages'),
title: titleToEdit
}));
return ret;
}
function rmDupesFromSortedList(list) {
var ret=[];
for (var i=0; i<list.length; ++i) {
if (ret.length===0 || list[i]!=ret[ret.length-1]) { ret.push(list[i]); }
}
return ret;
}
function makeFixDab(data, navpop) {
// grab title from parent popup if there is one; default exists in changeLinkTargetLink
var titleToEdit=(navpop.parentPopup && navpop.parentPopup.article.toString());
var list=listLinks(data, navpop.originalArticle, titleToEdit);
if (list.length===0) { log('listLinks returned empty list'); return null; }
var html='<hr>' + popupString('Click to disambiguate this link to:') + '<br>';
html+=list.join(', ');
return html;
}
function makeFixDabs(wikiText, navpop) {
if (getValueOf('popupFixDabs') && isDisambig(wikiText, navpop.article) &&
Title.fromURL(location.href).namespaceId() != pg.nsSpecialId &&
navpop.article.talkPage() ) {
setPopupHTML(makeFixDab(wikiText, navpop), 'popupFixDab', navpop.idNumber);
}
}
function popupRedlinkHTML(article) {
return changeLinkTargetLink(
{ newTarget: null, text: popupString('remove this link').split(' ').join(' '),
hint: popupString("remove all links to this page from this article"),
clickButton: "wpDiff",
oldTarget: article.toString(),
summary: simplePrintf(getValueOf('popupRedlinkSummary'), [article.toString()])});
}
//</NOLITE>
// ENDFILE: dab.js
// STARTFILE: htmloutput.js
function appendPopupContent(obj, elementId, popupId, onSuccess) {
return setPopupHTML(obj, elementId, popupId, onSuccess, true);
}
// this has to use a timer loop as we don't know if the DOM element exists when we want to set the text
function setPopupHTML (str, elementId, popupId, onSuccess, append) {
if (elementId=='popupPreview') {
}
if (typeof popupId === 'undefined') {
//console.error('popupId is not defined in setPopupHTML, html='+str.substring(0,100));
popupId = pg.idNumber;
}
var popupElement=document.getElementById(elementId+popupId);
if (popupElement) {
if (!append) { popupElement.innerHTML=''; }
if (isString(str)) {
popupElement.innerHTML+=str;
} else {
popupElement.appendChild(str);
}
if (onSuccess) { onSuccess(); }
setTimeout(checkPopupPosition, 100);
return true;
} else {
// call this function again in a little while...
setTimeout(function(){
setPopupHTML(str,elementId,popupId,onSuccess);
}, 600);
}
return null;
}
//<NOLITE>
function setPopupTrailer(str,id) {return setPopupHTML(str, 'popupData', id);}
//</NOLITE>
function fillEmptySpans(args) { return fillEmptySpans2(args); }
// args.navpopup is mandatory
// optional: args.redir, args.redirTarget
// FIXME: ye gods, this is ugly stuff
function fillEmptySpans2(args) { // if redir is present and true then redirTarget is mandatory
var redir=true;
if (typeof args != 'object' || typeof args.redir == 'undefined' || !args.redir) { redir=false; }
var a=args.navpopup.parentAnchor;
var article, hint=null, oldid=null, params={};
if (redir && typeof args.redirTarget == typeof {}) {
article=args.redirTarget;
//hint=article.hintValue();
} else {
article=(new Title()).fromAnchor(a);
hint=a.originalTitle || article.hintValue();
params=parseParams(a.href);
oldid=(getValueOf('popupHistoricalLinks')) ? params.oldid : null;
rcid=params.rcid;
}
var x={ article:article, hint: hint, oldid: oldid, rcid: rcid, navpop:args.navpopup, params:params };
var structure=pg.structures[getValueOf('popupStructure')];
if (typeof structure != 'object') {
setPopupHTML('popupError', 'Unknown structure (this should never happen): '+
pg.option.popupStructure, args.navpopup.idNumber);
return;
}
var spans=flatten(pg.misc.layout);
var numspans = spans.length;
var redirs=pg.misc.redirSpans;
for (var i=0; i<numspans; ++i) {
var f=findThis(redirs, spans[i]);
//log('redir='+redir+', f='+f+', spans[i]='+spans[i]);
if ( (f!==null && !redir) || (f===null && redir) ) {
//log('skipping this set of the loop');
continue;
}
var structurefn=structure[spans[i]];
var setfn = setPopupHTML;
if (getValueOf('popupActiveNavlinks') &&
(spans[i].indexOf('popupTopLinks')==0 || spans[i].indexOf('popupRedirTopLinks')==0)
) {
setfn = setPopupTipsAndHTML;
}
switch (typeof structurefn) {
case 'function':
//log('running '+spans[i]+'({article:'+x.article+', hint:'+x.hint+', oldid: '+x.oldid+'})');
setfn(structurefn(x), spans[i], args.navpopup.idNumber);
break;
case 'string':
setfn(structurefn, spans[i], args.navpopup.idNumber);
break;
default:
errlog('unknown thing with label '+spans[i]);
break;
}
}
}
// flatten an array
function flatten(list, start) {
var ret=[];
if (typeof start == 'undefined') { start=0; }
for (var i=start; i<list.length; ++i) {
if (typeof list[i] == typeof []) {
return ret.concat(flatten(list[i])).concat(flatten(list, i+1));
}
else { ret.push(list[i]); }
}
return ret;
}
// Generate html for whole popup
function popupHTML (a) {
getValueOf('popupStructure');
var structure=pg.structures[pg.option.popupStructure];
if (typeof structure != 'object') {
//return 'Unknown structure: '+pg.option.popupStructure;
// override user choice
pg.option.popupStructure=pg.optionDefault.popupStructure;
return popupHTML(a);
}
if (typeof structure.popupLayout != 'function') { return 'Bad layout'; }
pg.misc.layout=structure.popupLayout();
if (typeof structure.popupRedirSpans == 'function') { pg.misc.redirSpans=structure.popupRedirSpans(); }
else { pg.misc.redirSpans=[]; }
return makeEmptySpans(pg.misc.layout, a.navpopup);
}
function makeEmptySpans (list, navpop) {
var ret='';
for (var i=0; i<list.length; ++i) {
if (typeof list[i] == typeof '') {
ret += emptySpanHTML(list[i], navpop.idNumber, 'div');
} else if (typeof list[i] == typeof [] && list[i].length > 0 ) {
ret = ret.parenSplit(RegExp('(</[^>]*?>$)')).join(makeEmptySpans(list[i], navpop));
} else if (typeof list[i] == typeof {} && list[i].nodeType ) {
ret += emptySpanHTML(list[i].name, navpop.idNumber, list[i].nodeType);
}
}
return ret;
}
function emptySpanHTML(name, id, tag, classname) {
tag = tag || 'span';
if (!classname) { classname = emptySpanHTML.classAliases[name]; }
classname = classname || name;
if (name == getValueOf('popupDragHandle')) { classname += ' popupDragHandle'; }
return simplePrintf('<%s id="%s" class="%s"></%s>', [tag, name + id, classname, tag]);
}
emptySpanHTML.classAliases={ 'popupSecondPreview': 'popupPreview' };
// generate html for popup image
// <a id="popupImageLinkn"><img id="popupImagen">
// where n=idNumber
function imageHTML(article, idNumber) {
return simplePrintf('<a id="popupImageLink$1">' +
'<img align="right" valign="top" id="popupImg$1" style="display: none;"></img>' +
'</a>', [ idNumber ]);
}
function popTipsSoonFn(id, when, popData) {
when || ( when=250 );
var popTips=function(){ setupTooltips(document.getElementById(id), false, true, popData); };
return function() { setTimeout( popTips, when, popData ); };
}
function setPopupTipsAndHTML(html, divname, idnumber, popData) {
setPopupHTML(html, divname, idnumber,
getValueOf('popupSubpopups') ?
popTipsSoonFn(divname + idnumber, null, popData) :
null);
}
// ENDFILE: htmloutput.js
// STARTFILE: mouseout.js
//////////////////////////////////////////////////
// fuzzy checks
function fuzzyCursorOffMenus(x,y, fuzz, parent) {
if (!parent) { return null; }
var uls=parent.getElementsByTagName('ul');
for (var i=0; i<uls.length; ++i) {
if (uls[i].className=='popup_menu') {
if (uls[i].offsetWidth > 0) return false;
} // else {document.title+='.';}
}
return true;
}
function checkPopupPosition () { // stop the popup running off the right of the screen
// FIXME avoid pg.current.link
pg.current.link && pg.current.link.navpopup &&
pg.current.link.navpopup.limitHorizontalPosition();
}
function mouseOutWikiLink () {
if (!window.popupsReady || !window.popupsReady()) { return; }
//console ('mouseOutWikiLink');
var a=this;
if (a.navpopup==null) return;
if ( ! a.navpopup.isVisible() ) {
a.navpopup.banish();
return;
}
restoreTitle(a);
Navpopup.tracker.addHook(posCheckerHook(a.navpopup));
}
function posCheckerHook(navpop) {
return function() {
if (!navpop.isVisible()) { return true; /* remove this hook */ }
if (Navpopup.tracker.dirty) {
return false;
}
var x=Navpopup.tracker.x, y=Navpopup.tracker.y;
var mouseOverNavpop = navpop.isWithin(x,y,navpop.fuzz, navpop.mainDiv) ||
!fuzzyCursorOffMenus(x,y,navpop.fuzz, navpop.mainDiv);
// FIXME it'd be prettier to do this internal to the Navpopup objects
var t=getValueOf('popupHideDelay');
if (t) { t = t * 1000; }
if (!t) {
if(!mouseOverNavpop) {
if(navpop.parentAnchor) {
restoreTitle( navpop.parentAnchor );
}
navpop.banish();
return true; /* remove this hook */
}
return false;
}
// we have a hide delay set
var d=+(new Date());
if ( !navpop.mouseLeavingTime ) {
navpop.mouseLeavingTime = d;
return false;
}
if ( mouseOverNavpop ) {
navpop.mouseLeavingTime=null;
return false;
}
if (d - navpop.mouseLeavingTime > t) {
navpop.mouseLeavingTime=null;
navpop.banish(); return true; /* remove this hook */
}
return false;
};
}
function runStopPopupTimer(navpop) {
// at this point, we should have left the link but remain within the popup
// so we call this function again until we leave the popup.
if (!navpop.stopPopupTimer) {
navpop.stopPopupTimer=setInterval(posCheckerHook(navpop), 500);
navpop.addHook(function(){clearInterval(navpop.stopPopupTimer);},
'hide', 'before');
}
}
// ENDFILE: mouseout.js
// STARTFILE: previewmaker.js
/**
@fileoverview
Defines the {@link Previewmaker} object, which generates short previews from wiki markup.
*/
/**
Creates a new Previewmaker
@constructor
@class The Previewmaker class. Use an instance of this to generate short previews from Wikitext.
@param {String} wikiText The Wikitext source of the page we wish to preview.
@param {String} baseUrl The url we should prepend when creating relative urls.
@param {Navpopup} owner The navpop associated to this preview generator
*/
function Previewmaker(wikiText, baseUrl, owner) {
/** The wikitext which is manipulated to generate the preview. */
this.originalData=wikiText;
this.setData();
this.baseUrl=baseUrl;
this.owner=owner;
this.maxCharacters=getValueOf('popupMaxPreviewCharacters');
this.maxSentences=getValueOf('popupMaxPreviewSentences');
}
Previewmaker.prototype.setData=function() {
var maxSize=max(10000, 2*this.maxCharacters);
this.data=this.originalData.substring(0,maxSize);
};
/** Remove HTML comments
@private
*/
Previewmaker.prototype.killComments = function () {
// this also kills one trailing newline, eg [[diamyo]]
this.data=this.data.replace(RegExp('<!--[\\s\\S]*?-->\\n?', 'g'), '');
};
/**
@private
*/
Previewmaker.prototype.killDivs = function () {
// say goodbye, divs (can be nested, so use * not *?)
this.data=this.data.replace(RegExp('< *div[^>]* *>[\\s\\S]*?< */ *div *>',
'gi'), '');
};
/**
@private
*/
Previewmaker.prototype.killGalleries = function () {
this.data=this.data.replace(RegExp('< *gallery[^>]* *>[\\s\\S]*?< */ *gallery *>',
'gi'), '');
};
/**
@private
*/
Previewmaker.prototype.kill = function(opening, closing, subopening, subclosing, repl) {
var oldk=this.data;
var k=this.killStuff(this.data, opening, closing, subopening, subclosing, repl);
while (k.length < oldk.length) {
oldk=k;
k=this.killStuff(k, opening, closing, subopening, subclosing, repl);
}
this.data=k;
};
/**
@private
*/
Previewmaker.prototype.killStuff = function (txt, opening, closing, subopening, subclosing, repl) {
var op=this.makeRegexp(opening);
var cl=this.makeRegexp(closing, '^');
var sb=subopening ? this.makeRegexp(subopening, '^') : null;
var sc=subclosing ? this.makeRegexp(subclosing, '^') : cl;
if (!op || !cl) {
alert('Navigation Popups error: op or cl is null! something is wrong.');
return;
}
if (!op.test(txt)) { return txt; }
var ret='';
var opResult = op.exec(txt);
ret = txt.substring(0,opResult.index);
txt=txt.substring(opResult.index+opResult[0].length);
var depth = 1;
while (txt.length > 0) {
var removal=0;
if (depth==1 && cl.test(txt)) {
depth--;
removal=cl.exec(txt)[0].length;
} else if (depth > 1 && sc.test(txt)) {
depth--;
removal=sc.exec(txt)[0].length;
}else if (sb && sb.test(txt)) {
depth++;
removal=sb.exec(txt)[0].length;
}
if ( !removal ) { removal = 1; }
txt=txt.substring(removal);
if (depth==0) { break; }
}
return ret + (repl || '') + txt;
};
/**
@private
*/
Previewmaker.prototype.makeRegexp = function (x, prefix, suffix) {
prefix = prefix || '';
suffix = suffix || '';
var reStr='';
var flags='';
if (isString(x)) {
reStr=prefix + literalizeRegex(x) + suffix;
} else if (isRegExp(x)) {
var s=x.toString().substring(1);
var sp=s.split('/');
flags=sp[sp.length-1];
sp[sp.length-1]='';
s=sp.join('/');
s=s.substring(0,s.length-1);
reStr= prefix + s + suffix;
} else {
log ('makeRegexp failed');
}
log ('makeRegexp: got reStr=' + reStr + ', flags=' + flags);
return RegExp(reStr, flags);
};
/**
@private
*/
Previewmaker.prototype.killBoxTemplates = function () {
// taxobox removal... in fact, there's a saudiprincebox_begin, so let's be more general
// also, have float_begin, ... float_end
this.kill(RegExp('[{][{][^{}\\s|]*?(float|box)[_ ](begin|start)', 'i'), /[}][}]\s*/, '{{');
// infoboxes etc
// from [[User:Zyxw/popups.js]]: kill frames too
this.kill(RegExp('[{][{][^{}\\s|]*?(infobox|elementbox|frame)[_ ]', 'i'), /[}][}]\s*/, '{{');
};
/**
@private
*/
Previewmaker.prototype.killTemplates = function () {
this.kill('{{', '}}', '{', '}', ' ');
};
/**
@private
*/
Previewmaker.prototype.killTables = function () {
// tables are bad, too
// this can be slow, but it's an inprovement over a browser hang
// torture test: [[Comparison_of_Intel_Central_Processing_Units]]
this.kill('{|', /[|]}\s*/, '{|');
this.kill(/<table.*?>/i, /<\/table.*?>/i, /<table.*?>/i);
// remove lines starting with a pipe for the hell of it (?)
this.data=this.data.replace(RegExp('^[|].*$', 'mg'), '');
};
/**
@private
*/
Previewmaker.prototype.killImages = function () {
var forbiddenNamespaceAliases = [];
jQuery.each(mw.config.get('wgNamespaceIds'), function(_localizedNamespaceLc, _namespaceId) {
if (_namespaceId!=pg.nsImageId && _namespaceId!=pg.nsCategoryId) return;
forbiddenNamespaceAliases.push(_localizedNamespaceLc.split(' ').join('[ _]')); //todo: escape regexp fragments!
});
// images and categories are a nono
this.kill(RegExp('[[][[]\\s*(' + forbiddenNamespaceAliases.join('|') + ')\\s*:', 'i'),
/\]\]\s*/, '[', ']');
};
/**
@private
*/
Previewmaker.prototype.killHTML = function () {
// kill <ref ...>...</ref>
this.kill(/<ref\b[^/>]*?>/i, /<\/ref>/i);
// let's also delete entire lines starting with <. it's worth a try.
this.data=this.data.replace(RegExp('(^|\\n) *<.*', 'g'), '\n');
// and those pesky html tags, but not <nowiki> or <blockquote>
var splitted=this.data.parenSplit(/(<[\w\W]*?(?:>|$|(?=<)))/);
var len=splitted.length;
for (var i=1; i<len; i=i+2) {
switch (splitted[i]) {
case '<nowiki>':
case '</nowiki>':
case '<blockquote>':
case '</blockquote>':
break;
default:
splitted[i]='';
}
}
this.data=splitted.join('');
};
/**
@private
*/
Previewmaker.prototype.killChunks = function() { // heuristics alert
// chunks of italic text? you crazy, man?
var italicChunkRegex=new RegExp
("((^|\\n)\\s*:*\\s*''[^']([^']|'''|'[^']){20}(.|\\n[^\\n])*''[.!?\\s]*\\n)+", 'g');
// keep stuff separated, though, so stick in \n (fixes [[Union Jack]]?
this.data=this.data.replace(italicChunkRegex, '\n');
};
/**
@private
*/
Previewmaker.prototype.mopup = function () {
// we simply *can't* be doing with horizontal rules right now
this.data=this.data.replace(RegExp('^-{4,}','mg'),'');
// no indented lines
this.data=this.data.replace(RegExp('(^|\\n) *:[^\\n]*','g'), '');
// replace __TOC__, __NOTOC__ and whatever else there is
// this'll probably do
this.data=this.data.replace(RegExp('^__[A-Z_]*__ *$', 'gmi'),'');
};
/**
@private
*/
Previewmaker.prototype.firstBit = function () {
// dont't be givin' me no subsequent paragraphs, you hear me?
/// first we "normalize" section headings, removing whitespace after, adding before
var d=this.data;
if (getValueOf('popupPreviewCutHeadings')) {
this.data=this.data.replace(RegExp('\\s*(==+[^=]*==+)\\s*', 'g'), '\n\n$1 ');
/// then we want to get rid of paragraph breaks whose text ends badly
this.data=this.data.replace(RegExp('([:;]) *\\n{2,}', 'g'), '$1\n');
this.data=this.data.replace(RegExp('^[\\s\\n]*'), '');
stuff=(RegExp('^([^\\n]|\\n[^\\n\\s])*')).exec(this.data);
if (stuff) { d = stuff[0]; }
if (!getValueOf('popupPreviewFirstParOnly')) { d = this.data; }
/// now put \n\n after sections so that bullets and numbered lists work
d=d.replace(RegExp('(==+[^=]*==+)\\s*', 'g'), '$1\n\n');
}
// Split sentences. Superfluous sentences are RIGHT OUT.
// note: exactly 1 set of parens here needed to make the slice work
d = d.parenSplit(RegExp('([!?.]+["'+"'"+']*\\s)','g'));
// leading space is bad, mmkay?
d[0]=d[0].replace(RegExp('^\\s*'), '');
var notSentenceEnds=RegExp('([^.][a-z][.] *[a-z]|etc|sic|Dr|Mr|Mrs|Ms|St|no|op|cit|\\[[^\\]]*|\\s[A-Zvclm])$', 'i');
d = this.fixSentenceEnds(d, notSentenceEnds);
this.fullLength=d.join('').length;
var maxChars=getValueOf('popupMaxPreviewCharacters') + this.extraCharacters;
var n=this.maxSentences;
var dd=this.firstSentences(d,n);
do {
dd=this.firstSentences(d,n); --n;
} while ( dd.length > this.maxCharacters && n != 0 );
this.data = dd;
};
/**
@private
*/
Previewmaker.prototype.fixSentenceEnds = function(strs, reg) {
// take an array of strings, strs
// join strs[i] to strs[i+1] & strs[i+2] if strs[i] matches regex reg
var abbrevRe=/\b[a-z][^a-z]*$/i;
for (var i=0; i<strs.length-2; ++i) {
if (reg.test(strs[i])) {
a=[];
for (var j=0; j<strs.length; ++j) {
if (j<i) a[j]=strs[j];
if (j==i) a[i]=strs[i]+strs[i+1]+strs[i+2];
if (j>i+2) a[j-2]=strs[j];
}
return this.fixSentenceEnds(a,reg);
}
// BUGGY STUFF - trying to fix up [[S. C. Johnson & Son]] preview
if (false && abbrevRe.test(strs[i])) {
var j=i, buf='';
do {
buf=buf+strs[i]+strs[i+1];
i=i+2;
} while (i<strs.length-2 && abbrevRe.test(strs[i]));
strs[i]=buf+strs[i];
var a=(j?strs.slice(0,j-1):[]).concat(strs.slice(i));
return this.fixSentenceEnds(a,reg);
}
}
return strs;
};
/**
@private
*/
Previewmaker.prototype.firstSentences = function(strs, howmany) {
var t=strs.slice(0, 2*howmany);
return t.join('');
};
/**
@private
*/
Previewmaker.prototype.killBadWhitespace = function() {
// also cleans up isolated '''', eg [[Suntory Sungoliath]]
this.data=this.data.replace(RegExp('^ *\'+ *$', 'gm'), '');
};
/**
Runs the various methods to generate the preview.
The preview is stored in the <code>html</html> field.
@private
*/
Previewmaker.prototype.makePreview = function() {
if (this.owner.article.namespaceId()!=pg.nsTemplateId &&
this.owner.article.namespaceId()!=pg.nsImageId ) {
this.killComments();
this.killDivs();
this.killGalleries();
this.killBoxTemplates();
if (getValueOf('popupPreviewKillTemplates')) {
this.killTemplates();
} else {
this.killMultilineTemplates();
}
this.killTables();
this.killImages();
this.killHTML();
this.killChunks();
this.mopup();
this.firstBit();
this.killBadWhitespace();
}
else
{
this.killHTML();
}
this.html=wiki2html(this.data, this.baseUrl); // needs livepreview
this.fixHTML();
this.stripLongTemplates();
};
/**
@private
*/
Previewmaker.prototype.esWiki2HtmlPart = function(data) {
var reLinks = /(?:\[\[([^|\]]*)(?:\|([^|\]]*))*]]([a-z]*))/gi; //match a wikilink
reLinks.lastIndex = 0; //reset regex
var match;
var result = "";
var postfixIndex = 0;
while ((match = reLinks.exec(data)) != null) //match all wikilinks
{
//FIXME: the way that link is built here isn't perfect. It is clickable, but popups preview won't recognize it in some cases.
result += pg.escapeQuotesHTML(data.substring(postfixIndex, match.index)) +
'<a href="'+Insta.conf.paths.articles+pg.escapeQuotesHTML(match[1])+'">'+pg.escapeQuotesHTML((match[2]?match[2]:match[1])+match[3])+"</a>";
postfixIndex = reLinks.lastIndex;
}
//append the rest
result += pg.escapeQuotesHTML(data.substring(postfixIndex));
return result;
};
Previewmaker.prototype.editSummaryPreview=function() {
var reAes = /\/\* *(.*?) *\*\//g; //match the first section marker
reAes.lastIndex = 0; //reset regex
var match;
match = reAes.exec(this.data);
if (match)
{
//we have a section link. Split it, process it, combine it.
var prefix = this.data.substring(0,match.index-1);
var section = match[1];
var postfix = this.data.substring(reAes.lastIndex);
var start = "<span class='autocomment'>";
var end = "</span>";
if (prefix.length>0) start = this.esWiki2HtmlPart(prefix) + " " + start + "- ";
if (postfix.length>0) end = ": " + end + this.esWiki2HtmlPart(postfix);
var t=new Title().fromURL(this.baseUrl);
t.anchorFromUtf(section);
var sectionLink = Insta.conf.paths.articles + pg.escapeQuotesHTML(t.toString(true)) + '#' + pg.escapeQuotesHTML(t.anchor);
return start + '<a href="'+sectionLink+'">→</a> '+pg.escapeQuotesHTML(section) + end;
}
//else there's no section link, htmlify the whole thing.
return this.esWiki2HtmlPart(this.data);
};
//<NOLITE>
/** Test function for debugging preview problems one step at a time.
*/
function previewSteps(txt) {
try {
txt=txt || document.editform.wpTextbox1.value;
} catch (err) {
if (pg.cache.pages.length > 0) {
txt=pg.cache.pages[pg.cache.pages.length-1].data;
} else {
alert('provide text or use an edit page');
}
}
txt=txt.substring(0,10000);
var base=pg.wiki.articlebase + Title.fromURL(document.location.href).urlString();
var p=new Previewmaker(txt, base, pg.current.link.navpopup);
if (this.owner.article.namespaceId() != pg.nsTemplateId) {
p.killComments(); if (!confirm('done killComments(). Continue?\n---\n' + p.data)) { return; }
p.killDivs(); if (!confirm('done killDivs(). Continue?\n---\n' + p.data)) { return; }
p.killGalleries(); if (!confirm('done killGalleries(). Continue?\n---\n' + p.data)) { return; }
p.killBoxTemplates(); if (!confirm('done killBoxTemplates(). Continue?\n---\n' + p.data)) { return; }
if (getValueOf('popupPreviewKillTemplates')) {
p.killTemplates(); if (!confirm('done killTemplates(). Continue?\n---\n' + p.data)) { return; }
} else {
p.killMultilineTemplates(); if (!confirm('done killMultilineTemplates(). Continue?\n---\n' + p.data)) { return; }
}
p.killTables(); if (!confirm('done killTables(). Continue?\n---\n' + p.data)) { return; }
p.killImages(); if (!confirm('done killImages(). Continue?\n---\n' + p.data)) { return; }
p.killHTML(); if (!confirm('done killHTML(). Continue?\n---\n' + p.data)) { return; }
p.killChunks(); if (!confirm('done killChunks(). Continue?\n---\n' + p.data)) { return; }
p.mopup(); if (!confirm('done mopup(). Continue?\n---\n' + p.data)) { return; }
p.firstBit(); if (!confirm('done firstBit(). Continue?\n---\n' + p.data)) { return; }
p.killBadWhitespace(); if (!confirm('done killBadWhitespace(). Continue?\n---\n' + p.data)) { return; }
}
p.html=wiki2html(p.data, base); // needs livepreview
p.fixHTML(); if (!confirm('done fixHTML(). Continue?\n---\n' + p.html)) { return; }
p.stripLongTemplates(); if (!confirm('done stripLongTemplates(). Continue?\n---\n' + p.html)) { return; }
alert('finished preview - end result follows.\n---\n' + p.html);
}
//</NOLITE>
/**
Works around livepreview bugs.
@private
*/
Previewmaker.prototype.fixHTML = function() {
if(!this.html) return;
var ret = this.html;
// fix question marks in wiki links
// maybe this'll break some stuff :-(
ret=ret.replace(RegExp('\(<a href="' + pg.wiki.articlePath + '/[^"]*\)[?]\(.*?"\)', 'g'), '$1%3F$2');
ret=ret.replace(RegExp('\(<a href=\'' + pg.wiki.articlePath + '/[^\']*\)[?]\(.*?\'\)', 'g'), '$1%3F$2');
// FIXME fix up % too
this.html=ret;
};
/**
Generates the preview and displays it in the current popup.
Does nothing if the generated preview is invalid or consists of whitespace only.
Also activates wikilinks in the preview for subpopups if the popupSubpopups option is true.
*/
Previewmaker.prototype.showPreview = function () {
this.makePreview();
if (typeof this.html != typeof '') return;
if (RegExp('^\\s*$').test(this.html)) return;
setPopupHTML('<hr>', 'popupPrePreviewSep', this.owner.idNumber);
setPopupTipsAndHTML(this.html, 'popupPreview', this.owner.idNumber, { owner: this.owner });
var more = (this.fullLength > this.data.length) ? this.moreLink() : '';
setPopupHTML(more, 'popupPreviewMore', this.owner.idNumber);
};
/**
@private
*/
Previewmaker.prototype.moreLink=function() {
var a=document.createElement('a');
a.className='popupMoreLink';
a.innerHTML=popupString('more...');
var savedThis=this;
a.onclick=function() {
savedThis.maxCharacters+=2000;
savedThis.maxSentences+=20;
savedThis.setData();
savedThis.showPreview();
}
return a;
}
/**
@private
*/
Previewmaker.prototype.stripLongTemplates = function() {
// operates on the HTML!
this.html=this.html.replace(RegExp('^.{0,1000}[{][{][^}]*?(<(p|br)( /)?>\\s*){2,}([^{}]*?[}][}])?', 'gi'), '');
this.html=this.html.split('\n').join(' '); // workaround for <pre> templates
this.html=this.html.replace(RegExp('[{][{][^}]*<pre>[^}]*[}][}]','gi'), '');
};
/**
@private
*/
Previewmaker.prototype.killMultilineTemplates = function() {
this.kill('{{{', '}}}');
this.kill(RegExp('\\s*[{][{][^{}]*\\n'), '}}', '{{');
};
// ENDFILE: previewmaker.js
// STARTFILE: querypreview.js
function loadAPIPreview(queryType, article, navpop) {
var art=new Title(article).urlString();
var url=pg.wiki.apiwikibase + '?format=json&action=query&';
var htmlGenerator=function(a,d){alert('invalid html generator');};
switch (queryType) {
case 'history':
url += 'meta=userinfo&uiprop=options&titles=' + art + '&prop=revisions&rvlimit=' +
getValueOf('popupHistoryPreviewLimit');
htmlGenerator=APIhistoryPreviewHTML;
break;
case 'category':
url += 'list=categorymembers&cmtitle=' + art;
htmlGenerator=APIcategoryPreviewHTML;
break;
case 'userinfo':
var username = new Title( article ).userName();
var usernameart = encodeURIComponent( username );
if (pg.re.ipUser.test(username)) {
url += 'list=blocks&bkprop=range&bkip=' + usernameart;
} else {
url += 'list=users&usprop=blockinfo|groups|editcount|registration&ususers=' + usernameart + "&meta=globaluserinfo&guiprop=groups|unattached&guiuser="+ usernameart;
}
htmlGenerator=APIuserInfoPreviewHTML;
break;
case 'contribs':
var usernameart = encodeURIComponent( new Title( article ).userName() );
url += 'list=usercontribs&meta=userinfo&uiprop=options&ucuser=' + usernameart +
'&uclimit=' + getValueOf('popupContribsPreviewLimit');
htmlGenerator=APIcontribsPreviewHTML;
break;
case 'imagepagepreview':
var trail='';
if (getValueOf('popupImageLinks')) { trail = '&list=imageusage&iutitle=' + art; }
url += 'titles=' + art + '&prop=revisions|imageinfo&rvprop=content' + trail;
htmlGenerator=APIimagepagePreviewHTML;
break;
case 'backlinks':
url += 'list=backlinks&bltitle=' + art;
htmlGenerator=APIbacklinksPreviewHTML;
break;
}
pendingNavpopTask(navpop);
if( !window.wgEnableAPI || !wgEnableAPI ) {
/* The API is not available */
htmlGenerator=function(a,d){
return 'This function of navigation popups now requires a MediaWiki ' +
'installation with the <a href="http://www.mediawiki.org/wiki/API">API</a> enabled.'; };
}
var callback=function(d){
log( "callback of API functions was hit" );
showAPIPreview(queryType, htmlGenerator(article,d,navpop), navpop.idNumber, navpop, d);
};
if (pg.flag.isIE) {
url = url + '&*'; //to circumvent https://bugzilla.wikimedia.org/show_bug.cgi?id=28840
}
var go = function(){
getPageWithCaching(url, callback, navpop);
return true;
}
if (navpop.visible || !getValueOf('popupLazyDownloads')) { go(); }
else { navpop.addHook(go, 'unhide', 'before', 'DOWNLOAD_'+queryType+'_QUERY_DATA'); }
}
function linkList(list) {
list.sort(function(x,y) { return (x==y ? 0 : (x<y ? -1 : 1)); });
var buf=[];
for (var i=0; i<list.length; ++i) {
buf.push(wikiLink({article: new Title(list[i]),
text: list[i].split(' ').join(' '),
action: 'view'}));
}
return buf.join(', ');
}
function getTimeOffset(tz) {
if( tz ) {
if( tz.indexOf('|') > -1 ) {
// New format
return parseInt(tz.split('|')[1],10);
} else if ( tz.indexOf(':') > -1 ) {
// Old format
return( parseInt(tz,10)*60 + parseInt(tz.split(':')[1],10) );
}
}
return 0;
}
function editPreviewTable(article, h, reallyContribs, timeOffset) {
var html=['<table>'];
var day=null;
var curart=article;
for (var i=0; i<h.length; ++i) {
if (reallyContribs) {
var page=h[i]['title']; curart = new Title(page);
}
var minor=typeof h[i]['minor']=='undefined' ? '' : '<b>m </b>';
var editDate=adjustDate(getDateFromTimestamp(h[i].timestamp), timeOffset);
var thisDay = dayFormat(editDate);
var thisTime = timeFormat(editDate);
if (thisDay==day) { thisDay=''; }
else { day=thisDay; }
if (thisDay) {
html.push( '<tr><td colspan=3><span class="popup_history_date">' +
thisDay+'</span></td></tr>' );
}
html.push('<tr class="popup_history_row_' + ( (i%2) ? 'odd' : 'even') + '">');
html.push('<td>(<a href="' + pg.wiki.titlebase + new Title(curart).urlString() +
'&diff=prev&oldid=' + h[i]['revid'] + '">' + popupString('last') + '</a>)</td>');
html.push('<td>' +
'<a href="' + pg.wiki.titlebase + new Title(curart).urlString() +
'&oldid=' + h[i]['revid'] + '">' + thisTime + '</a></td>');
var col3url='', col3txt='';
if (!reallyContribs) {
var user=h[i]['user'];
if( typeof h[i]['userhidden'] == "undefined" ) {
if( pg.re.ipUser.test(user) ) {
col3url=pg.wiki.titlebase + mw.config.get('wgFormattedNamespaces')[pg.nsSpecialId] + ':Contributions&target=' + new Title(user).urlString();
} else {
col3url=pg.wiki.titlebase + mw.config.get('wgFormattedNamespaces')[pg.nsUserId] + ':' + new Title(user).urlString();
}
col3txt=pg.escapeQuotesHTML(user);
} else {
col3url=getValueOf('popupRevDelUrl');
col3txt=pg.escapeQuotesHTML( popupString('revdel'));
}
} else {
col3url=pg.wiki.titlebase + curart.urlString();
col3txt=pg.escapeQuotesHTML(page);
}
html.push('<td>' + (reallyContribs ? minor : '') +
'<a href="' + col3url + '">' + col3txt + '</a></td>');
var comment='';
var c=h[i].comment || h[i]['*'];
if (c) {
comment=new Previewmaker(c, new Title(curart).toUrl()).editSummaryPreview();
} else if (typeof h[i]['commenthidden'] != "undefined" ) {
comment=popupString('revdel');
}
html.push('<td>' + (!reallyContribs ? minor : '') + comment + '</td>');
html.push('</tr>');
html=[html.join('')];
}
html.push('</table>');
return html.join('');
}
function getDateFromTimestamp(t) {
var s=t.split(/[^0-9]/);
switch(s.length) {
case 0: return null;
case 1: return new Date(s[0]);
case 2: return new Date(s[0], s[1]-1);
case 3: return new Date(s[0], s[1]-1, s[2]);
case 4: return new Date(s[0], s[1]-1, s[2], s[3]);
case 5: return new Date(s[0], s[1]-1, s[2], s[3], s[4]);
case 6: return new Date(s[0], s[1]-1, s[2], s[3], s[4], s[5]);
default: return new Date(s[0], s[1]-1, s[2], s[3], s[4], s[5], s[6]);
}
}
function adjustDate(d, offset) {
// offset is in minutes
var o=offset * 60 * 1000;
return new Date( +d + o);
}
function dayFormat(editDate, utc) {
if (utc) { return map(zeroFill, [editDate.getUTCFullYear(), editDate.getUTCMonth()+1, editDate.getUTCDate()]).join('-'); }
return map(zeroFill, [editDate.getFullYear(), editDate.getMonth()+1, editDate.getDate()]).join('-');
}
function timeFormat(editDate, utc) {
if (utc) { return map(zeroFill, [editDate.getUTCHours(), editDate.getUTCMinutes(), editDate.getUTCSeconds()]).join(':'); }
return map(zeroFill, [editDate.getHours(), editDate.getMinutes(), editDate.getSeconds()]).join(':');
}
function showAPIPreview(queryType, html, id, navpop, download) {
// DJ: done
var target='popupPreview';
switch (queryType) {
case 'imagelinks':
case 'category':
case 'userinfo':
target='popupPostPreview'; break;
}
setPopupTipsAndHTML(html, target, id);
completedNavpopTask(navpop);
}
function APIbacklinksPreviewHTML(article, download, navpop) {
try {
var jsObj=getJsObj(download.data);
var list=jsObj.query.backlinks;
} catch (someError) { return 'backlinksPreviewHTML went wonky'; }
var html=[];
if (!list) { return popupString('No backlinks found'); }
for ( var i=0; i < list.length; i++ ) {
var t=new Title(list[i]['title']);
html.push('<a href="' + pg.wiki.titlebase + t.urlString() + '">' + t + '</a>');
}
html=html.join(', ');
if (jsObj['query-continue'] && jsObj['query-continue'].backlinks && jsObj['query-continue'].backlinks.blcontinue) {
html += popupString(' and more');
}
return html;
}
function APIsharedImagePagePreviewHTML(obj) {
log( "APIsharedImagePagePreviewHTML" );
var popupid = obj['requestid'];
if( obj['query'] && obj['query']['pages'] )
{
var page=anyChild(obj['query']['pages']);
var content=(page && page.revisions ) ? page.revisions[0]['*'] : null;
if( content )
{
/* Not entirely safe, but the best we can do */
var p=new Previewmaker(content, pg.current.link.navpopup.article, pg.current.link.navpopup);
p.makePreview();
setPopupHTML( p.html, "popupSecondPreview", popupid );
}
}
}
function APIimagepagePreviewHTML(article, download, navpop) {
try {
var jsObj=getJsObj(download.data);
var page=anyChild(jsObj.query.pages);
var content=(page && page.revisions ) ? page.revisions[0]['*'] : null;
} catch (someError) {
return 'API imagepage preview failed :(';
}
var ret='';
var alt='';
try{alt=navpop.parentAnchor.childNodes[0].alt;} catch(e){}
if (alt) {
ret = ret + '<hr><b>' + popupString('Alt text:') + '</b> ' + pg.escapeQuotesHTML(alt);
}
if (content) {
var p=prepPreviewmaker(content, article, navpop);
p.makePreview();
if (p.html) { ret += '<hr>' + p.html; }
}
if (content!==null && getValueOf('popupSummaryData')) {
var info=getPageInfo(content, download);
log(info);
setPopupTrailer(info, navpop.idNumber);
}
if (page && page.imagerepository == "shared" ) {
var art=new Title(article);
var encart = encodeURIComponent( "File:" + art.stripNamespace() );
var shared_url = pg.wiki.apicommonsbase + '?format=json&callback=APIsharedImagePagePreviewHTML' +
'&requestid=' + navpop.idNumber +
'&action=query&prop=revisions&rvprop=content&titles=' + encart;
if (pg.flag.isIE) {
shared_url = shared_url + '&*'; //to circumvent https://bugzilla.wikimedia.org/show_bug.cgi?id=28840
}
ret = ret +'<hr>' + popupString( 'Image from Commons') +
': <a href="' + pg.wiki.commonsbase + '?title=' + encart + '">' +
popupString( 'Description page') + '</a>';
importScriptURI( shared_url );
}
showAPIPreview('imagelinks', APIimagelinksPreviewHTML(article,download), navpop.idNumber, download);
return ret;
}
function APIimagelinksPreviewHTML(article, download) {
try {
var jsobj=getJsObj(download.data);
var list=jsobj.query.imageusage;
if (!list) { return popupString('No image links found'); }
} catch(someError) { return 'Image links preview generation failed :('; }
var ret=[];
for (var i=0; i < list.length; i++) {
ret.push(list[i]['title']);
}
if (ret.length === 0) { return popupString('No image links found'); }
return '<h2>' + popupString('File links') + '</h2>' + linkList(ret);
}
function APIcategoryPreviewHTML(article, download) {
try{
var jsobj=getJsObj(download.data);
var list=jsobj.query.categorymembers;
} catch(someError) { return 'Category preview failed :('; }
var ret=[];
for (var p=0; p < list.length; p++) {
ret.push(list[p]['title']);
}
if (ret.length === 0) { return popupString('Empty category'); }
ret = '<h2>' + tprintf('Category members (%s shown)', [ret.length]) + '</h2>' +linkList(ret);
if (jsobj['query-continue'] && jsobj['query-continue'].categorymembers && jsobj['query-continue'].categorymembers.cmcontinue) {
ret += popupString(' and more');
}
return ret;
}
function APIuserInfoPreviewHTML(article, download) {
var ret=[];
try{
var queryobj=getJsObj(download.data).query;
} catch(someError) { return 'Userinfo preview failed :('; }
var user=anyChild(queryobj.users);
if (user) {
var globaluserinfo=queryobj.globaluserinfo;
if (user.invalid == '') {
ret.push( popupString( 'Invalid user') );
} else if (user.missing == '') {
ret.push( popupString( 'Not a registered username') );
}
if( user.blockedby )
ret.push('<b>' + popupString('BLOCKED') + '</b>');
if( globaluserinfo && (globaluserinfo.locked != null || globaluserinfo.hidden != null) ) {
var lockedSulAccountIsAttachedToThis = true;
for( var i=0; globaluserinfo.unattached && i < globaluserinfo.unattached.length; i++) {
if (globaluserinfo.unattached[i].wiki===wgDBname) { lockedSulAccountIsAttachedToThis=false; break; }
}
if (lockedSulAccountIsAttachedToThis) {
if (globaluserinfo.locked != null) ret.push('<b><i>' + popupString('LOCKED') + '</i></b>');
if (globaluserinfo.hidden != null) ret.push('<b><i>' + popupString('HIDDEN') + '</i></b>');
}
}
for( var i=0; (user.groups && i < user.groups.length); i++) {
switch (user.groups[i]) {
case '*':
case 'user':
case 'autoconfirmed':
break;
default:
ret.push( pg.escapeQuotesHTML(user.groups[i]) );
}
}
for( var i=0; (globaluserinfo && globaluserinfo.groups && i < globaluserinfo.groups.length); i++) {
ret.push( '<i>'+pg.escapeQuotesHTML(globaluserinfo.groups[i])+'</i>' );
}
if( user.editcount || user.registration )
ret.push( pg.escapeQuotesHTML((user.editcount?user.editcount:'') + popupString(' edits since: ') + (user.registration?dayFormat(getDateFromTimestamp(user.registration)):'')) );
}
if (queryobj.blocks) {
ret.push( popupString( 'IP user') ); //we only request list=blocks for IPs
for (var i=0; i<queryobj.blocks.length; i++) {
ret.push('<b>' + popupString(queryobj.blocks[i].rangestart===queryobj.blocks[i].rangeend ? 'BLOCKED' : 'RANGEBLOCKED') + '</b>' );
}
}
ret = '<hr>' + ret.join( ', ' );
return ret;
}
function APIcontribsPreviewHTML(article, download, navpop) {
return APIhistoryPreviewHTML(article, download, navpop, true);
}
function APIhistoryPreviewHTML(article, download, navpop, reallyContribs) {
try {
var jsobj=getJsObj(download.data);
var tz=jsobj.query.userinfo.options.timecorrection;
if( reallyContribs )
var edits=jsobj.query.usercontribs;
else
var edits=anyChild(jsobj.query.pages)['revisions'];
} catch (someError) {
return 'History preview failed :-(';
}
var timeOffset = getTimeOffset(tz);
Cookie.create('popTz', timeOffset, 1);
var ret=editPreviewTable(article, edits, reallyContribs, timeOffset);
return ret;
}
//</NOLITE>
// ENDFILE: querypreview.js
// STARTFILE: debug.js
////////////////////////////////////////////////////////////////////
// Debugging functions
////////////////////////////////////////////////////////////////////
function log(){}; // dummy to stop errors
function setupDebugging() {
//<NOLITE>
if (window.popupDebug) { // popupDebug is set from .version
window.log=function(x) { //if(gMsg!='')gMsg += '\n'; gMsg+=time() + ' ' + x; };
window.console.log(x);
}
window.errlog=function(x) {
window.console.error(x);
}
log('Initializing logger');
} else {
//</NOLITE>
window.log = function(x) {};
window.errlog = function(x) {};
//<NOLITE>
}
//</NOLITE>
}
// ENDFILE: debug.js
// STARTFILE: images.js
// load image of type Title.
function loadImage(image, navpop) {
if (typeof image.stripNamespace != 'function') { alert('loadImages bad'); }
// API call to retrieve image info.
if (!getValueOf('popupImages') || !window.wgEnableAPI || !wgEnableAPI) return;
if (!isValidImageName(image)) return false;
var art=image.urlString();
var url=pg.wiki.apiwikibase + '?format=json&action=query';
url += '&prop=imageinfo&iiprop=url|mime&iiurlwidth=' + getValueOf('popupImageSizeLarge');;
url += '&titles=' + art;
if (pg.flag.isIE) {
url = url + '&*'; //to circumvent https://bugzilla.wikimedia.org/show_bug.cgi?id=28840
}
pendingNavpopTask(navpop);
var callback=function(d){
popupsInsertImage(navpop.idNumber, navpop, d);
};
var go = function(){
getPageWithCaching(url, callback, navpop);
return true;
}
if (navpop.visible || !getValueOf('popupLazyDownloads')) { go(); }
else { navpop.addHook(go, 'unhide', 'after', 'DOWNLOAD_IMAGE_QUERY_DATA'); }
}
function popupsInsertImage(id, navpop, download) {
log( "popupsInsertImage");
try {
var jsObj=getJsObj(download.data);
var imagepage=anyChild(jsObj.query.pages);
if (typeof imagepage.imageinfo === 'undefined') return;
var imageinfo = imagepage.imageinfo[0];
} catch (someError) {
log( "popupsInsertImage failed :(" );
return;
}
var popupImage = document.getElementById("popupImg"+id);
if (!popupImage) {
log( "could not find insertion point for image");
return;
}
popupImage.width=getValueOf('popupImageSize');
popupImage.style.display='inline';
// Set the source for the image.
if( imageinfo.thumburl )
popupImage.src=imageinfo.thumburl;
else if( imageinfo.mime.indexOf("image") == 0 ){
popupImage.src=imageinfo.url;
log( "a thumb could not be found, using original image" );
} else log( "fullsize imagethumb, but not sure if it's an image");
var a=document.getElementById("popupImageLink"+id);
if (a === null) { return null; }
// Determine the action of the surrouding imagelink.
switch (getValueOf('popupThumbAction')) {
case 'imagepage':
if (pg.current.article.namespaceId()!=pg.nsImageId) {
a.href=imageinfo.descriptionurl;
// FIXME: unreliable pg.idNumber
popTipsSoonFn('popupImage' + id)();
break;
} // else fall through
case 'sizetoggle':
a.onclick=toggleSize;
a.title=popupString('Toggle image size');
return;
case 'linkfull':
a.href = imageinfo.url;
a.title=popupString('Open full-size image');
return;
}
}
// Toggles the image between inline small and navpop fullwidth.
// It's the same image, no actual sizechange occurs, only display width.
function toggleSize() {
var imgContainer=this;
if (!imgContainer) { alert('imgContainer is null :/'); return;}
img=imgContainer.firstChild;
if (!img) { alert('img is null :/'); return;}
if (!img.style.width || img.style.width=='') { img.style.width='100%'; }
else { img.style.width=''; }
}
// Returns one title of an image from wikiText.
function getValidImageFromWikiText(wikiText) {
// nb in pg.re.image we're interested in the second bracketed expression
// this may change if the regex changes :-(
//var match=pg.re.image.exec(wikiText);
var matched=null;
var match;
// strip html comments, used by evil bots :-(
var t = removeMatchesUnless(wikiText, RegExp('(<!--[\\s\\S]*?-->)'), 1,
RegExp('^<!--[^[]*popup', 'i'));
while ( match = pg.re.image.exec(t) ) {
// now find a sane image name - exclude templates by seeking {
var m = match[2] || match[6];
if ( isValidImageName(m) ) {
matched=m;
break;
}
}
pg.re.image.lastIndex=0;
if (!matched) { return null; }
return mw.config.get('wgFormattedNamespaces')[pg.nsImageId]+':'+upcaseFirst(matched);
}
function removeMatchesUnless(str, re1, parencount, re2) {
var split=str.parenSplit(re1);
var c=parencount + 1;
for (var i=0; i<split.length; ++i) {
if ( i%c === 0 || re2.test(split[i]) ) { continue; }
split[i]='';
}
return split.join('');
}
//</NOLITE>
// ENDFILE: images.js
// STARTFILE: namespaces.js
// Set up namespaces and other non-strings.js localization
// (currently that means redirs too)
function namespaceListToRegex(list) {return RegExp('^('+list.join('|').split(' ').join('[ _]')+'):');};
function setNamespaces() {
pg.nsSpecialId = -1;
pg.nsMainspaceId = 0;
pg.nsImageId = 6;
pg.nsUserId = 2;
pg.nsUsertalkId = 3;
pg.nsCategoryId = 14;
pg.nsTemplateId = 10;
}
function setRedirs() {
var r='redirect';
var R='REDIRECT';
var redirLists={
//<NOLITE>
'ar': [ R, 'تحويل' ],
'be': [ r, 'перанакіраваньне' ],
'bg': [ r, 'пренасочване', 'виж' ],
'bs': [ r, 'Preusmjeri', 'preusmjeri', 'PREUSMJERI' ],
'cs': [ R, 'PŘESMĚRUJ' ],
'cy': [ r, 'ail-cyfeirio' ],
'de': [ R, 'WEITERLEITUNG' ],
'eo': [ R, 'ALIDIREKTU', 'ALIDIREKTI' ],
'es': [ R, 'REDIRECCIÓN' ],
'et': [ r, 'suuna' ],
'ga': [ r, 'athsheoladh' ],
'gl': [ r, 'REDIRECCIÓN', 'REDIRECIONAMENTO'],
'he': [ R, 'הפניה' ],
'hu': [ R, 'ÁTIRÁNYÍTÁS' ],
'is': [ r, 'tilvísun', 'TILVÍSUN' ],
'it': [ R, 'RINVIA', 'Rinvia'],
'ja': [ R, '転送' ],
'mk': [ r, 'пренасочување', 'види' ],
'nds': [ r, 'wiederleiden' ],
'nl': [ R, 'DOORVERWIJZING' ],
'nn': [ r, 'omdiriger' ],
'pl': [ R, 'PATRZ', 'PRZEKIERUJ', 'TAM' ],
'pt': [ R, 'redir' ],
'ru': [ R, 'ПЕРЕНАПРАВЛЕНИЕ', 'ПЕРЕНАПР' ],
'sk': [ r, 'presmeruj' ],
'sr': [ r, 'Преусмери', 'преусмери', 'ПРЕУСМЕРИ', 'Preusmeri', 'preusmeri', 'PREUSMERI' ],
'tt': [ R, 'yünältü', 'перенаправление', 'перенапр' ],
'uk': [ R, 'ПЕРЕНАПРАВЛЕННЯ', 'ПЕРЕНАПР' ],
'vi': [ r, 'đổi' ] // no comma
//</NOLITE>
};
var redirList=redirLists[ pg.wiki.lang ] || [r, R];
// Mediawiki is very tolerant about what comes after the #redirect at the start
pg.re.redirect=RegExp('^\\s*[#](' + redirList.join('|') + ').*?\\[{2}([^\\|\\]]*)(|[^\\]]*)?\\]{2}\\s*(.*)', 'i');
}
function setInterwiki() {
if (pg.wiki.wikimedia) {
// From http://meta.wikimedia.org/wiki/List_of_Wikipedias
pg.wiki.interwiki='aa|ab|ace|af|ak|als|am|an|ang|ar|arc|arz|as|ast|av|ay|az|ba|bar|bat-smg|bcl|be|be-x-old|bg|bh|bi|bjn|bm|bn|bo|bpy|br|bs|bug|bxr|ca|cbk-zam|cdo|ce|ceb|ch|cho|chr|chy|ckb|co|cr|crh|cs|csb|cu|cv|cy|da|de|diq|dsb|dv|dz|ee|el|eml|en|eo|es|et|eu|ext|fa|ff|fi|fiu-vro|fj|fo|fr|frp|frr|fur|fy|ga|gag|gan|gd|gl|glk|gn|got|gu|gv|ha|hak|haw|he|hi|hif|ho|hr|hsb|ht|hu|hy|hz|ia|id|ie|ig|ii|ik|ilo|io|is|it|iu|ja|jbo|jv|ka|kaa|kab|kbd|kg|ki|kj|kk|kl|km|kn|ko|koi|kr|krc|ks|ksh|ku|kv|kw|ky|la|lad|lb|lbe|lg|li|lij|lmo|ln|lo|lt|ltg|lv|map-bms|mdf|mg|mh|mhr|mi|mk|ml|mn|mo|mr|mrj|ms|mt|mus|mwl|my|myv|mzn|na|nah|nap|nds|nds-nl|ne|new|ng|nl|nn|no|nov|nrm|nv|ny|oc|om|or|os|pa|pag|pam|pap|pcd|pdc|pfl|pi|pih|pl|pms|pnb|pnt|ps|pt|qu|rm|rmy|rn|ro|roa-rup|roa-tara|ru|rue|rw|sa|sah|sc|scn|sco|sd|se|sg|sh|si|simple|sk|sl|sm|sn|so|sq|sr|srn|ss|st|stq|su|sv|sw|szl|ta|te|tet|tg|th|ti|tk|tl|tn|to|tpi|tr|ts|tt|tum|tw|ty|udm|ug|uk|ur|uz|ve|vec|vi|vls|vo|wa|war|wo|wuu|xal|xh|yi|yo|za|zea|zh|zh-classical|zh-min-nan|zh-yue|zu';
pg.re.interwiki=RegExp('^'+pg.wiki.interwiki+':');
} else {
pg.wiki.interwiki=null;
pg.re.interwiki=RegExp('^$');
}
}
// return a regexp pattern matching all variants to write the given namespace
function nsRe(namespaceId) {
var imageNamespaceVariants = [];
jQuery.each(mw.config.get('wgNamespaceIds'), function(_localizedNamespaceLc, _namespaceId) {
if (_namespaceId!=namespaceId) return;
//todo: escape regexp fragments!
_localizedNamespaceLc = upcaseFirst(_localizedNamespaceLc);
imageNamespaceVariants.push(_localizedNamespaceLc.split(' ').join('[ _]'));
imageNamespaceVariants.push(encodeURI(_localizedNamespaceLc));
});
return '(?:' + imageNamespaceVariants.join('|') + ')';
}
function nsReImage() {
return nsRe(pg.nsImageId);
}
// ENDFILE: namespaces.js
// STARTFILE: selpop.js
//<NOLITE>
function getEditboxSelection() {
// see http://www.webgurusforum.com/8/12/0
try {
var editbox=document.editform.wpTextbox1;
} catch (dang) { return; }
// IE, Opera
if (document.selection) { return document.selection.createRange().text; }
// Mozilla
var selStart = editbox.selectionStart;
var selEnd = editbox.selectionEnd;
return (editbox.value).substring(selStart, selEnd);
}
function doSelectionPopup() {
// popup if the selection looks like [[foo|anything afterwards at all
// or [[foo|bar]]text without ']]'
// or [[foo|bar]]
var sel=getEditboxSelection();
var open=sel.indexOf('[[');
var pipe=sel.indexOf('|');
var close=sel.indexOf(']]');
if (open == -1 || ( pipe == -1 && close == -1) ) { return; }
if (pipe != -1 && open > pipe || close != -1 && open > close) { return; }
if (getValueOf('popupOnEditSelection')=='boxpreview') {
return doSeparateSelectionPopup(sel);
}
var article=new Title(sel.substring(open+2, (pipe < 0) ? close : pipe)).urlString();
if (close > 0 && sel.substring(close+2).indexOf('[[') >= 0) {
return;
}
var a=document.createElement('a');
a.href=pg.wiki.titlebase + article;
mouseOverWikiLink2(a);
if (a.navpopup) {
a.navpopup.addHook(function(){runStopPopupTimer(a.navpopup);}, 'unhide', 'after');
}
}
function doSeparateSelectionPopup(str) {
var div=document.getElementById('selectionPreview');
if (!div) {
div = document.createElement('div');
div.id='selectionPreview';
try { var box=document.editform.wpTextbox1; }
catch (oopsie) { return; }
box.parentNode.insertBefore(div, box);
}
div.innerHTML=wiki2html(str);
div.ranSetupTooltipsAlready = false;
popTipsSoonFn('selectionPreview')();
}
//</NOLITE>
// ENDFILE: selpop.js
// STARTFILE: navpopup.js
/**
@fileoverview Defines two classes: {@link Navpopup} and {@link Mousetracker}.
<code>Navpopup</code> describes popups: when they appear, where, what
they look like and so on.
<code>Mousetracker</code> "captures" the mouse using
<code>document.onmousemove</code>.
*/
/**
Creates a new Mousetracker.
@constructor
@class The Mousetracker class. This monitors mouse movements and manages associated hooks.
*/
function Mousetracker() {
/**
Interval to regularly run the hooks anyway, in milliseconds.
@type Integer
*/
this.loopDelay=400;
/**
Timer for the loop.
@type Timer
*/
this.timer=null;
/**
Flag - are we switched on?
@type Boolean
*/
this.active=false;
/**
Flag - are we probably inaccurate, i.e. not reflecting the actual mouse position?
*/
this.dirty=true;
/**
Array of hook functions.
@private
@type Array
*/
this.hooks=[];
}
/**
Adds a hook, to be called when we get events.
@param {Function} f A function which is called as
<code>f(x,y)</code>. It should return <code>true</code> when it
wants to be removed, and <code>false</code> otherwise.
*/
Mousetracker.prototype.addHook = function (f) {
this.hooks.push(f);
};
/**
Runs hooks, passing them the x
and y coords of the mouse. Hook functions that return true are
passed to {@link Mousetracker#removeHooks} for removal.
@private
*/
Mousetracker.prototype.runHooks = function () {
if (!this.hooks || !this.hooks.length) { return; }
//log('Mousetracker.runHooks; we got some hooks to run');
var remove=false;
var removeObj={};
// this method gets called a LOT -
// pre-cache some variables
var x=this.x, y=this.y, len = this.hooks.length;
for (var i=0; i<len; ++i) {
//~ run the hook function, and remove it if it returns true
if (this.hooks[i](x, y)===true) {
remove=true;
removeObj[i]=true;
}
}
if (remove) { this.removeHooks(removeObj); }
};
/**
Removes hooks.
@private
@param {Object} removeObj An object whose keys are the index
numbers of functions for removal, with values that evaluate to true
*/
Mousetracker.prototype.removeHooks = function(removeObj) {
var newHooks=[];
var len = this.hooks.length;
for (var i=0; i<len; ++i) {
if (! removeObj[i]) { newHooks.push(this.hooks[i]); }
}
this.hooks=newHooks;
};
/**
Event handler for mouse wiggles.
We simply grab the event, set x and y and run the hooks.
This makes the cpu all hot and bothered :-(
@private
@param {Event} e Mousemove event
*/
Mousetracker.prototype.track=function (e) {
//~ Apparently this is needed in IE.
e = e || window.event;
var x, y;
if (e) {
if (e.pageX) { x=e.pageX; y=e.pageY; }
else if (typeof e.clientX!='undefined') {
var left, top, docElt = window.document.documentElement;
if (docElt) { left=docElt.scrollLeft; }
left = left || window.document.body.scrollLeft || window.document.scrollLeft || 0;
if (docElt) { top=docElt.scrollTop; }
top = top || window.document.body.scrollTop || window.document.scrollTop || 0;
x=e.clientX + left;
y=e.clientY + top;
} else { return; }
this.setPosition(x,y);
}
};
/**
Sets the x and y coordinates stored and takes appropriate action,
running hooks as appropriate.
@param {Integer} x, y Screen coordinates to set
*/
Mousetracker.prototype.setPosition=function(x,y) {
this.x = x;
this.y = y;
if (this.dirty || this.hooks.length === 0) { this.dirty=false; return; }
if (typeof this.lastHook_x != 'number') { this.lastHook_x = -100; this.lastHook_y=-100; }
var diff = (this.lastHook_x - x)*(this.lastHook_y - y);
diff = (diff >= 0) ? diff : -diff;
if ( diff > 1 ) {
this.lastHook_x=x;
this.lastHook_y=y;
if (this.dirty) { this.dirty = false; }
else { this.runHooks(); }
}
}
/**
Sets things in motion, unless they are already that is, registering an event handler on <code>document.onmousemove</code>.
A half-hearted attempt is made to preserve the old event handler if there is one.
*/
Mousetracker.prototype.enable = function () {
if (this.active) { return; }
this.active=true;
//~ Save the current handler for mousemove events. This isn't too
//~ robust, of course.
this.savedHandler=document.onmousemove;
//~ Gotta save @tt{this} again for the closure, and use apply for
//~ the member function.
var savedThis=this;
document.onmousemove=function (e) {savedThis.track.apply(savedThis, [e]);};
if (this.loopDelay) { this.timer = setInterval(function() { //log('loop delay in mousetracker is working');
savedThis.runHooks();}, this.loopDelay); }
};
/**
Disables the tracker, removing the event handler.
*/
Mousetracker.prototype.disable = function () {
if (!this.active) { return; }
if (typeof this.savedHandler=='function') {
document.onmousemove=this.savedHandler;
} else { delete document.onmousemove; }
if (this.timer) { clearInterval(this.timer); }
this.active=false;
};
/**
Creates a new Navpopup.
Gets a UID for the popup and
@param init Contructor object. If <code>init.draggable</code> is true or absent, the popup becomes draggable.
@constructor
@class The Navpopup class. This generates popup hints, and does some management of them.
*/
function Navpopup(init) {
//alert('new Navpopup(init)');
/** UID for each Navpopup instance.
Read-only.
@type integer
*/
this.uid=Navpopup.uid++;
/**
Read-only flag for current visibility of the popup.
@type boolean
@private
*/
this.visible=false;
/** Flag to be set when we want to cancel a previous request to
show the popup in a little while.
@private
@type boolean
*/
this.noshow=false;
/** Categorised list of hooks.
@see #runHooks
@see #addHook
@private
@type Object
*/
this.hooks={
'create': [],
'unhide': [],
'hide': []
};
/** list of unique IDs of hook functions, to avoid duplicates
@private
*/
this.hookIds={};
/** List of downloads associated with the popup.
@private
@type Array
*/
this.downloads=[];
/** Number of uncompleted downloads.
@type integer
*/
this.pending=null;
/** Tolerance in pixels when detecting whether the mouse has left the popup.
@type integer
*/
this.fuzz=5;
/** Flag to toggle running {@link #limitHorizontalPosition} to regulate the popup's position.
@type boolean
*/
this.constrained=true;
/** The popup width in pixels.
@private
@type integer
*/
this.width=0;
/** The popup width in pixels.
@private
@type integer
*/
this.height=0;
/** The main content DIV element.
@type HTMLDivElement
*/
this.mainDiv=null;
this.createMainDiv();
// if (!init || typeof init.popups_draggable=='undefined' || init.popups_draggable) {
// this.makeDraggable(true);
// }
}
/**
A UID for each Navpopup. This constructor property is just a counter.
@type integer
@private
*/
Navpopup.uid=0;
/**
Retrieves the {@link #visible} attribute, indicating whether the popup is currently visible.
@type boolean
*/
Navpopup.prototype.isVisible=function() {
return this.visible;
};
/**
Repositions popup using CSS style.
@private
@param {integer} x x-coordinate (px)
@param {integer} y y-coordinate (px)
@param {boolean} noLimitHor Don't call {@link #limitHorizontalPosition}
*/
Navpopup.prototype.reposition= function (x,y, noLimitHor) {
log ('reposition('+x+','+y+','+noLimitHor+')');
if (typeof x != 'undefined' && x!==null) { this.left=x; }
if (typeof y != 'undefined' && y!==null) { this.top=y; }
if (typeof this.left != 'undefined' && typeof this.top != 'undefined') {
this.mainDiv.style.left=this.left + 'px';
this.mainDiv.style.top=this.top + 'px';
}
if (!noLimitHor) { this.limitHorizontalPosition(); }
//console.log('navpop'+this.uid+' - (left,top)=(' + this.left + ',' + this.top + '), css=('
//+ this.mainDiv.style.left + ',' + this.mainDiv.style.top + ')');
};
/**
Prevents popups from being in silly locations. Hopefully.
Should not be run if {@link #constrained} is true.
@private
*/
Navpopup.prototype.limitHorizontalPosition=function() {
if (!this.constrained || this.tooWide) { return; }
this.updateDimensions();
var x=this.left;
var w=this.width;
var cWidth=document.body.clientWidth;
// log('limitHorizontalPosition: x='+x+
// ', this.left=' + this.left +
// ', this.width=' + this.width +
// ', cWidth=' + cWidth);
if ( (x+w) >= cWidth ||
( x > 0 && this.maxWidth && this.width < this.maxWidth && this.height > this.width
&& x > cWidth - this.maxWidth ) ) {
// This is a very nasty hack. There has to be a better way!
// We find the "natural" width of the div by positioning it at the far left
// then reset it so that it should be flush right (well, nearly)
this.mainDiv.style.left='-10000px';
this.mainDiv.style.width = this.maxWidth + 'px';
var naturalWidth=parseInt(this.mainDiv.offsetWidth, 10);
var newLeft=cWidth - naturalWidth - 1;
if (newLeft < 0) { newLeft = 0; this.tooWide=true; } // still unstable for really wide popups?
log ('limitHorizontalPosition: moving to ('+newLeft + ','+ this.top+');' + ' naturalWidth=' + naturalWidth + ', clientWidth=' + cWidth);
this.reposition(newLeft, null, true);
}
};
/**
Counter indicating the z-order of the "highest" popup.
We start the z-index at 1000 so that popups are above everything
else on the screen.
@private
@type integer
*/
Navpopup.highest=1000;
/**
Brings popup to the top of the z-order.
We increment the {@link #highest} property of the contructor here.
@private
*/
Navpopup.prototype.raise = function () {
this.mainDiv.style.zIndex=Navpopup.highest + 1;
++Navpopup.highest;
};
/**
Shows the popup provided {@link #noshow} is not true.
Updates the position, brings the popup to the top of the z-order and unhides it.
*/
Navpopup.prototype.show = function () {
//document.title+='s';
if (this.noshow) { return; }
//document.title+='t';
this.reposition();
this.raise();
this.unhide();
};
/**
Runs the {@link #show} method in a little while, unless we're
already visible.
@param {integer} time Delay in milliseconds
@see #showSoonIfStable
*/
Navpopup.prototype.showSoon = function (time) {
if (this.visible) { return; }
this.noshow=false;
//~ We have to save the value of @tt{this} so that the closure below
//~ works.
var savedThis=this;
//this.start_x = Navpopup.tracker.x;
//this.start_y = Navpopup.tracker.y;
setTimeout(function () {
if (Navpopup.tracker.active) {
savedThis.reposition.apply(savedThis, [Navpopup.tracker.x + 2, Navpopup.tracker.y + 2]);
}
//~ Have to use apply to invoke his member function here
savedThis.show.apply(savedThis, []);
}, time);
};
/**
Checks to see if the mouse pointer has
stabilised (checking every <code>time</code>/2 milliseconds) and runs the
{@link #show} method if it has. This method makes {@link #showSoon} redundant.
@param {integer} time The minimum time (ms) before the popup may be shown.
*/
Navpopup.prototype.showSoonIfStable = function (time) {
log ('showSoonIfStable, time='+time);
if (this.visible) { return; }
this.noshow = false;
//~ initialize these variables so that we never run @tt{show} after
//~ just half the time
this.stable_x = -10000; this.stable_y = -10000;
var stableShow = function() {
log('stableShow called');
var new_x = Navpopup.tracker.x, new_y = Navpopup.tracker.y;
var dx = savedThis.stable_x - new_x, dy = savedThis.stable_y - new_y;
var fuzz2 = 0; // savedThis.fuzz * savedThis.fuzz;
//document.title += '[' + [savedThis.stable_x,new_x, savedThis.stable_y,new_y, dx, dy, fuzz2].join(',') + '] ';
if ( dx * dx <= fuzz2 && dy * dy <= fuzz2 ) {
log ('mouse is stable');
clearInterval(savedThis.showSoonStableTimer);
savedThis.reposition.apply(savedThis, [new_x + 2, new_y + 2]);
savedThis.show.apply(savedThis, []);
return;
}
savedThis.stable_x = new_x; savedThis.stable_y = new_y;
};
var savedThis = this;
this.showSoonStableTimer = setInterval(stableShow, time/2);
};
/**
Makes the popup unhidable until we call {@link #unstick}.
*/
Navpopup.prototype.stick=function() {
this.noshow=false;
this.sticky=true;
};
/**
Allows the popup to be hidden.
*/
Navpopup.prototype.unstick=function() {
this.sticky=false;
};
/**
Sets the {@link #noshow} flag and hides the popup. This should be called
when the mouse leaves the link before
(or after) it's actually been displayed.
*/
Navpopup.prototype.banish = function () {
log ('banish called');
// hide and prevent showing with showSoon in the future
this.noshow=true;
if (this.showSoonStableTimer) {
log('clearing showSoonStableTimer');
clearInterval(this.showSoonStableTimer);
}
this.hide();
};
/**
Runs hooks added with {@link #addHook}.
@private
@param {String} key Key name of the {@link #hooks} array - one of 'create', 'unhide', 'hide'
@param {String} when Controls exactly when the hook is run: either 'before' or 'after'
*/
Navpopup.prototype.runHooks = function (key, when) {
if (!this.hooks[key]) { return; }
var keyHooks=this.hooks[key];
var len=keyHooks.length;
for (var i=0; i< len; ++i) {
if (keyHooks[i] && keyHooks[i].when == when) {
if (keyHooks[i].hook.apply(this, [])) {
// remove the hook
if (keyHooks[i].hookId) {
delete this.hookIds[keyHooks[i].hookId];
}
keyHooks[i]=null;
}
}
}
};
/**
Adds a hook to the popup. Hook functions are run with <code>this</code> set to refer to the Navpopup instance, and no arguments.
@param {Function} hook The hook function. Functions that return true are deleted.
@param {String} key Key name of the {@link #hooks} array - one of 'create', 'unhide', 'hide'
@param {String} when Controls exactly when the hook is run: either 'before' or 'after'
@param {String} uid A truthy string identifying the hook function; if it matches another hook in this position, it won't be added again.
*/
Navpopup.prototype.addHook = function ( hook, key, when, uid ) {
when = when || 'after';
if (!this.hooks[key]) { return; }
// if uid is specified, don't add duplicates
var hookId=null;
if (uid) {
hookId=[key,when,uid].join('|');
if (this.hookIds[hookId]) {
return;
}
this.hookIds[hookId]=true;
}
this.hooks[key].push( {hook: hook, when: when, hookId: hookId} );
};
/**
Creates the main DIV element, which contains all the actual popup content.
Runs hooks with key 'create'.
@private
*/
Navpopup.prototype.createMainDiv = function () {
if (this.mainDiv) { return; }
this.runHooks('create', 'before');
var mainDiv=document.createElement('div');
var savedThis=this;
mainDiv.onclick=function(e) {savedThis.onclickHandler(e);};
mainDiv.className=(this.className) ? this.className : 'navpopup_maindiv';
mainDiv.id=mainDiv.className + this.uid;
mainDiv.style.position='absolute';
mainDiv.style.display='none';
mainDiv.className='navpopup';
// easy access to javascript object through DOM functions
mainDiv.navpopup=this;
this.mainDiv=mainDiv;
document.body.appendChild(mainDiv);
this.runHooks('create', 'after');
};
/**
Calls the {@link #raise} method.
@private
*/
Navpopup.prototype.onclickHandler=function(e) {
this.raise();
};
/**
Makes the popup draggable, using a {@link Drag} object.
@private
*/
Navpopup.prototype.makeDraggable=function(handleName) {
if (!this.mainDiv) { this.createMainDiv(); }
var drag=new Drag();
if (!handleName) {
drag.startCondition=function(e) {
try { if (!e.shiftKey) { return false; } } catch (err) { return false; }
return true;
};
}
var dragHandle;
if (handleName) dragHandle = document.getElementById(handleName);
if (!dragHandle) dragHandle = this.mainDiv;
var np=this;
drag.endHook=function(x,y) {
Navpopup.tracker.dirty=true;
np.reposition(x,y);
};
drag.init(dragHandle,this.mainDiv);
};
/** Hides the popup using CSS. Runs hooks with key 'hide'.
Sets {@link #visible} appropriately. {@link #banish} should be called externally instead of this method.
@private
*/
Navpopup.prototype.hide = function () {
this.runHooks('hide', 'before');
this.abortDownloads();
if (this.sticky) { return; }
if (typeof this.visible != 'undefined' && this.visible) {
this.mainDiv.style.display='none';
this.visible=false;
}
this.runHooks('hide', 'after');
};
/** Shows the popup using CSS. Runs hooks with key 'unhide'.
Sets {@link #visible} appropriately. {@link #show} should be called externally instead of this method.
@private
*/
Navpopup.prototype.unhide = function () {
this.runHooks('unhide', 'before');
if (typeof this.visible != 'undefined' && !this.visible) {
this.mainDiv.style.display='inline';
this.visible=true;
}
this.runHooks('unhide', 'after');
};
/**
Sets the <code>innerHTML</code> attribute of the main div containing the popup content.
@param {String} html The HTML to set.
*/
Navpopup.prototype.setInnerHTML = function (html) {
this.mainDiv.innerHTML = html;
};
/**
Updates the {@link #width} and {@link #height} attributes with the CSS properties.
@private
*/
Navpopup.prototype.updateDimensions = function () {
this.width=parseInt(this.mainDiv.offsetWidth, 10);
this.height=parseInt(this.mainDiv.offsetHeight, 10);
};
/**
Checks if the point (x,y) is within {@link #fuzz} of the
{@link #mainDiv}.
@param {integer} x x-coordinate (px)
@param {integer} y y-coordinate (px)
@type boolean
*/
Navpopup.prototype.isWithin = function(x,y) {
//~ If we're not even visible, no point should be considered as
//~ being within the popup.
if (!this.visible) { return false; }
this.updateDimensions();
var fuzz=this.fuzz || 0;
//~ Use a simple box metric here.
return (x+fuzz >= this.left && x-fuzz <= this.left + this.width &&
y+fuzz >= this.top && y-fuzz <= this.top + this.height);
};
/**
Adds a download to {@link #downloads}.
@param {Downloader} download
*/
Navpopup.prototype.addDownload=function(download) {
if (!download) { return; }
this.downloads.push(download);
};
/**
Aborts the downloads listed in {@link #downloads}.
@see Downloader#abort
*/
Navpopup.prototype.abortDownloads=function() {
for(var i=0; i<this.downloads.length; ++i) {
var d=this.downloads[i];
if (d && d.abort) { d.abort(); }
}
this.downloads=[];
};
/**
A {@link Mousetracker} instance which is a property of the constructor (pseudo-global).
*/
Navpopup.tracker=new Mousetracker();
// ENDFILE: navpopup.js
// STARTFILE: diff.js
//<NOLITE>
/*
* Javascript Diff Algorithm
* By John Resig (http://ejohn.org/) and [[:en:User:Lupin]]
*
* More Info:
* http://ejohn.org/projects/javascript-diff-algorithm/
*/
function delFmt(x) {
if (!x.length) { return ''; }
return "<del class='popupDiff'>" + x.join('') +"</del>";
}
function insFmt(x) {
if (!x.length) { return ''; }
return "<ins class='popupDiff'>" + x.join('') +"</ins>";
}
function countCrossings(a, b, i, eject) {
// count the crossings on the edge starting at b[i]
if (!b[i].row && b[i].row !== 0) { return -1; }
var count=0;
for (var j=0; j<a.length; ++j) {
if (!a[j].row && a[j].row !== 0) { continue; }
if ( (j-b[i].row)*(i-a[j].row) > 0) {
if(eject) { return true; }
count++;
}
}
return count;
}
function shortenDiffString(str, context) {
var re=RegExp('(<del[\\s\\S]*?</del>|<ins[\\s\\S]*?</ins>)');
var splitted=str.parenSplit(re);
var ret=[''];
for (var i=0; i<splitted.length; i+=2) {
if (splitted[i].length < 2*context) {
ret[ret.length-1] += splitted[i];
if (i+1<splitted.length) { ret[ret.length-1] += splitted[i+1]; }
continue;
}
else {
if (i > 0) { ret[ret.length-1] += splitted[i].substring(0,context); }
if (i+1 < splitted.length) {
ret.push(splitted[i].substring(splitted[i].length-context) +
splitted[i+1]);
}
}
}
while (ret.length > 0 && !ret[0]) { ret = ret.slice(1); }
return ret;
}
function diffString( o, n, simpleSplit ) {
var splitRe=RegExp('([[]{2}|[\\]]{2}|[{]{2,3}|[}]{2,3}|[|]|=|<|>|[*:]+|\\s|\\b)');
// We need to split the strings o and n first, and entify() the parts
// individually, so that the HTML entities are never cut apart. (AxelBoldt)
var out, i, oSplitted, nSplitted;
if (simpleSplit) {
oSplitted=o.split(/\b/);
nSplitted=n.split(/\b/);
} else {
oSplitted=o.parenSplit(splitRe);
nSplitted=n.parenSplit(splitRe);
}
for (i=0; i<oSplitted.length; ++i) {oSplitted[i]=oSplitted[i].entify();}
for (i=0; i<nSplitted.length; ++i) {nSplitted[i]=nSplitted[i].entify();}
out = diff (oSplitted, nSplitted);
var str = "";
var acc=[]; // accumulator for prettier output
// crossing pairings -- eg 'A B' vs 'B A' -- cause problems, so let's iron them out
// this doesn't always do things optimally but it should be fast enough
var maxOutputPair=0;
for (i=0; i<out.n.length; ++i) {
if ( out.n[i].paired ) {
if( maxOutputPair > out.n[i].row ) {
// tangle - delete pairing
out.o[ out.n[i].row ]=out.o[ out.n[i].row ].text;
out.n[i]=out.n[i].text;
}
if (maxOutputPair < out.n[i].row) { maxOutputPair = out.n[i].row; }
}
}
// output the stuff preceding the first paired old line
for (i=0; i<out.o.length && !out.o[i].paired; ++i) { acc.push( out.o[i] ); }
str += delFmt(acc); acc=[];
// main loop
for ( i = 0; i < out.n.length; ++i ) {
// output unpaired new "lines"
while ( i < out.n.length && !out.n[i].paired ) { acc.push( out.n[i++] ); }
str += insFmt(acc); acc=[];
if ( i < out.n.length ) { // this new "line" is paired with the (out.n[i].row)th old "line"
str += out.n[i].text;
// output unpaired old rows starting after this new line's partner
var m = out.n[i].row + 1;
while ( m < out.o.length && !out.o[m].paired ) { acc.push ( out.o[m++] ); }
str += delFmt(acc); acc=[];
}
}
return str;
}
// see http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object
// FIXME: use obj.hasOwnProperty instead of this kludge!
window.jsReservedProperties=RegExp('^(constructor|prototype|__((define|lookup)[GS]etter)__' +
'|eval|hasOwnProperty|propertyIsEnumerable' +
'|to(Source|String|LocaleString)|(un)?watch|valueOf)$');
function diffBugAlert(word) {
if (!diffBugAlert.list[word]) {
diffBugAlert.list[word]=1;
alert('Bad word: '+word+'\n\nPlease report this bug.');
}
}
diffBugAlert.list={};
function makeDiffHashtable(src) {
var ret={};
for ( var i = 0; i < src.length; i++ ) {
if ( jsReservedProperties.test(src[i]) ) { src[i] += '<!-- -->'; }
if ( !ret[ src[i] ] ) { ret[ src[i] ] = []; }
try { ret[ src[i] ].push( i ); } catch (err) { diffBugAlert(src[i]); }
}
return ret;
}
function diff( o, n ) {
// pass 1: make hashtable ns with new rows as keys
var ns = makeDiffHashtable(n);
// pass 2: make hashtable os with old rows as keys
var os = makeDiffHashtable(o);
// pass 3: pair unique new rows and matching unique old rows
var i;
for ( i in ns ) {
if ( ns[i].length == 1 && os[i] && os[i].length == 1 ) {
n[ ns[i][0] ] = { text: n[ ns[i][0] ], row: os[i][0], paired: true };
o[ os[i][0] ] = { text: o[ os[i][0] ], row: ns[i][0], paired: true };
}
}
// pass 4: pair matching rows immediately following paired rows (not necessarily unique)
for ( i = 0; i < n.length - 1; i++ ) {
if ( n[i].paired && ! n[i+1].paired && n[i].row + 1 < o.length && ! o[ n[i].row + 1 ].paired &&
n[i+1] == o[ n[i].row + 1 ] ) {
n[i+1] = { text: n[i+1], row: n[i].row + 1, paired: true };
o[n[i].row+1] = { text: o[n[i].row+1], row: i + 1, paired: true };
}
}
// pass 5: pair matching rows immediately preceding paired rows (not necessarily unique)
for ( i = n.length - 1; i > 0; i-- ) {
if ( n[i].paired && ! n[i-1].paired && n[i].row > 0 && ! o[ n[i].row - 1 ].paired &&
n[i-1] == o[ n[i].row - 1 ] ) {
n[i-1] = { text: n[i-1], row: n[i].row - 1, paired: true };
o[n[i].row-1] = { text: o[n[i].row-1], row: i - 1, paired: true };
}
}
return { o: o, n: n };
}
//</NOLITE>
// ENDFILE: diff.js
// STARTFILE: init.js
function setSiteInfo() {
if (window.popupLocalDebug) {
pg.wiki.hostname = 'en.wikipedia.org';
} else {
pg.wiki.hostname = location.hostname; // use in preference to location.hostname for flexibility (?)
}
pg.wiki.wikimedia=RegExp('(wiki([pm]edia|source|books|news|quote|versity)|wiktionary|mediawiki)[.]org').test(pg.wiki.hostname);
pg.wiki.wikia=RegExp('[.]wikia[.]com$', 'i').test(pg.wiki.hostname);
pg.wiki.isLocal=RegExp('^localhost').test(pg.wiki.hostname);
pg.wiki.commons=( pg.wiki.wikimedia && pg.wiki.hostname != 'commons.wikimedia.org') ? 'commons.wikimedia.org' : null;
pg.wiki.lang = wgContentLanguage;
var port = location.port ? ':' + location.port : '';
pg.wiki.sitebase = pg.wiki.hostname + port;
}
function setTitleBase() {
var protocol = ( window.popupLocalDebug ? 'http:' : location.protocol );
pg.wiki.articlePath = wgArticlePath.replace(/\/\$1/, ""); // as in http://some.thing.com/wiki/Article
pg.wiki.botInterfacePath = wgScript;
pg.wiki.APIPath = wgScriptPath +"/api.php";
// default mediawiki setting is paths like http://some.thing.com/articlePath/index.php?title=foo
var titletail = pg.wiki.botInterfacePath + '?title=';
//var titletail2 = joinPath([pg.wiki.botInterfacePath, 'wiki.phtml?title=']);
// other sites may need to add code here to set titletail depending on how their urls work
pg.wiki.titlebase = protocol + '//' + pg.wiki.sitebase + titletail;
//pg.wiki.titlebase2 = protocol + '//' + joinPath([pg.wiki.sitebase, titletail2]);
pg.wiki.wikibase = protocol + '//' + pg.wiki.sitebase + pg.wiki.botInterfacePath;
pg.wiki.apiwikibase = protocol + '//' + pg.wiki.sitebase + pg.wiki.APIPath;
pg.wiki.articlebase = protocol + '//' + pg.wiki.sitebase + pg.wiki.articlePath;
pg.wiki.commonsbase = protocol + '//' + pg.wiki.commons + pg.wiki.botInterfacePath;
pg.wiki.apicommonsbase = protocol + '//' + pg.wiki.commons + pg.wiki.APIPath;
pg.re.basenames = RegExp( '^(' +
map( literalizeRegex, [ pg.wiki.titlebase, //pg.wiki.titlebase2,
pg.wiki.articlebase ]).join('|') + ')' );
}
//////////////////////////////////////////////////
// Global regexps
function setMainRegex() {
var reStart='[^:]*://';
var preTitles = literalizeRegex(wgScriptPath) + '/(?:index[.]php|wiki[.]phtml)[?]title=';
preTitles += '|' + literalizeRegex( pg.wiki.articlePath + '/' );
var reEnd='(' + preTitles + ')([^&?#]*)[^#]*(?:#(.+))?';
pg.re.main = RegExp(reStart + literalizeRegex(pg.wiki.sitebase) + reEnd);
}
function setRegexps() {
setMainRegex();
var sp=nsRe(pg.nsSpecialId);
pg.re.urlNoPopup=RegExp('((title=|/)' + sp + '(?:%3A|:)|section=[0-9]|^#$)') ;
pg.re.contribs =RegExp('(title=|/)' + sp + '(?:%3A|:)Contributions' + '(&target=|/|/' + mw.config.get('wgFormattedNamespaces')[pg.nsUserId]+':)(.*)') ;
pg.re.email =RegExp('(title=|/)' + sp + '(?:%3A|:)EmailUser' + '(&target=|/|/(?:' + mw.config.get('wgFormattedNamespaces')[pg.nsUserId]+':)?)(.*)') ;
pg.re.backlinks =RegExp('(title=|/)' + sp + '(?:%3A|:)WhatLinksHere' + '(&target=|/)([^&]*)');
//<NOLITE>
var im=nsReImage();
// note: tries to get images in infobox templates too, e.g. movie pages, album pages etc
// (^|\[\[)image: *([^|\]]*[^|\] ]) *
// (^|\[\[)image: *([^|\]]*[^|\] ])([^0-9\]]*([0-9]+) *px)?
// $4 = 120 as in 120px
pg.re.image = RegExp('(^|\\[\\[)' + im + ': *([^|\\]]*[^|\\] ])' +
'([^0-9\\]]*([0-9]+) *px)?|(?:\\n *[|]?|[|]) *' +
'(' + getValueOf('popupImageVarsRegexp') + ')' +
' *= *(?:\\[\\[ *)?(?:' + im + ':)?' +
'([^|]*?)(?:\\]\\])? *[|]? *\\n', 'img') ;
pg.re.imageBracketCount = 6;
pg.re.category = RegExp('\\[\\[' +nsRe(pg.nsCategoryId) +
': *([^|\\]]*[^|\\] ]) *', 'i');
pg.re.categoryBracketCount = 1;
pg.re.ipUser=RegExp('^' +
// IPv6
'(?::(?::|(?::[0-9A-Fa-f]{1,4}){1,7})|[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4}){0,6}::|[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4}){7})' +
// IPv4
'|(((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}' +
'(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]))$');
pg.re.stub= RegExp(getValueOf('popupStubRegexp'), 'im');
pg.re.disambig=RegExp(getValueOf('popupDabRegexp'), 'im');
//</NOLITE>
// FIXME replace with general parameter parsing function, this is daft
pg.re.oldid=RegExp('[?&]oldid=([^&]*)');
pg.re.diff=RegExp('[?&]diff=([^&]*)');
}
//////////////////////////////////////////////////
// miscellany
function setupCache() {
// page caching
pg.cache.pages = [];
}
function setMisc() {
pg.current.link=null;
pg.current.links=[];
pg.current.linksHash={};
setupCache();
pg.timer.checkPopupPosition=null;
pg.counter.loop=0;
// ids change with each popup: popupImage0, popupImage1 etc
pg.idNumber=0;
// for myDecodeURI
pg.misc.decodeExtras = [
{from: '%2C', to: ',' },
{from: '_', to: ' ' },
{from: '%24', to: '$'},
{from: '%26', to: '&' } // no ,
];
}
function leadingInteger(s){
var n=s.match(/^(\d*)/)[1];
if (n) { return +n; }
return null;
}
function setBrowserHacks() {
var useOriginal=false;
// browser-specific hacks
if (typeof window.opera != 'undefined') {
//if (leadingInteger(opera.version()) < 9)
{ useOriginal=true; } // v9 beta still seems to have buggy css
setDefault('popupNavLinkSeparator', ' · ');
} else if (navigator.appName=='Konqueror') {
setDefault('popupNavLinkSeparator', ' • ');
pg.flag.isKonq=true;
} else if ( navigator.vendor && navigator.vendor.toLowerCase().indexOf('apple computer')===0) {
pg.flag.isSafari=true;
var webkit=+navigator.userAgent.replace(RegExp('^.*AppleWebKit[/](\\d+).*', 'i'), '$1');
if (webkit < 420) { useOriginal=true; }
} else if (navigator.appName.indexOf("Microsoft")!=-1) {
setDefault('popupNavLinkSeparator', ' · ');
var ver=+navigator.userAgent.replace(RegExp('^.*MSIE (\\d+).*'), '$1');
pg.flag.isIE=true;
pg.flag.IEVersion=ver;
}
if (pg.flag.isIE && pg.flag.IEVersion < 8) {
useOriginal=true;
}
if ((pg.flag.isIE && pg.flag.IEVersion < 7) || pg.flag.isKonq || (pg.flag.isSafari && webkit < 420)) {
pg.flag.linksLikeIE6=true;
}
if (useOriginal && pg.structures.original) {
setDefault('popupStructure','original');
}
}
// We need a callback since this might end up asynchronous because of
// the mw.loader.using() call.
function setupPopups( callback ) {
mw.loader.using( 'mediawiki.user', function() {
// NB translatable strings should be set up first (strings.js)
// basics
setupDebugging();
setSiteInfo();
setTitleBase();
setOptions(); // see options.js
// namespaces etc
setNamespaces();
setInterwiki();
// regexps
setRegexps();
setRedirs();
// other stuff
setBrowserHacks();
setMisc();
setupLivePreview();
// main deal here
setupTooltips();
Navpopup.tracker.enable();
setupPopups.completed = true;
if ( $.isFunction( callback ) ) {
callback();
}
});
}
// ENDFILE: init.js
// STARTFILE: navlinks.js
//<NOLITE>
//////////////////////////////////////////////////
// navlinks... let the fun begin
//
function defaultNavlinkSpec() {
var str='';
str += '<b><<mainlink|shortcut= >></b>';
if (getValueOf('popupLastEditLink')) {
str += '*<<lastEdit|shortcut=/>>|<<lastContrib>>|<<sinceMe>>if(oldid){|<<oldEdit>>|<<diffCur>>}';
}
// user links
// contribs - log - count - email - block
// count only if applicable; block only if popupAdminLinks
str += 'if(user){<br><<contribs|shortcut=c>>*<<userlog|shortcut=L|log>>';
str+='if(ipuser){*<<arin>>}if(wikimedia){*<<count|shortcut=#>>}';
str+='if(ipuser){}else{*<<email|shortcut=E>>}if(admin){*<<block|shortcut=b>>|<<blocklog|log>>}}';
// editing links
// talkpage -> edit|new - history - un|watch - article|edit
// other page -> edit - history - un|watch - talk|edit|new
var editstr='<<edit|shortcut=e>>';
var editOldidStr='if(oldid){<<editOld|shortcut=e>>|<<revert|shortcut=v|rv>>|<<edit|cur>>}else{' + editstr + '}'
var historystr='<<history|shortcut=h>>if(mainspace_en){|<<editors|shortcut=E|>>}';
var watchstr='<<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>>';
str+='<br>if(talk){' +
editOldidStr+'|<<new|shortcut=+>>' + '*' + historystr+'*'+watchstr + '*' +
'<b><<article|shortcut=a>></b>|<<editArticle|edit>>' +
'}else{' + // not a talk page
editOldidStr + '*' + historystr + '*' + watchstr + '*' +
'<b><<talk|shortcut=t>></b>|<<editTalk|edit>>|<<newTalk|shortcut=+|new>>'
+ '}';
// misc links
str += '<br><<whatLinksHere|shortcut=l>>*<<relatedChanges|shortcut=r>>*<<move|shortcut=m>>';
// admin links
str += 'if(admin){<br><<unprotect|unprotectShort>>|<<protect|shortcut=p>>|<<protectlog|log>>*' +
'<<undelete|undeleteShort>>|<<delete|shortcut=d>>|<<deletelog|log>>}';
return str;
}
function navLinksHTML (article, hint, params) { //oldid, rcid) {
var str = '<span class="popupNavLinks">' + defaultNavlinkSpec() + '</span>';
// BAM
return navlinkStringToHTML(str, article, params);
}
function expandConditionalNavlinkString(s,article,z,recursionCount) {
var oldid=z.oldid, rcid=z.rcid, diff=z.diff;
// nested conditionals (up to 10 deep) are ok, hopefully! (work from the inside out)
if (typeof recursionCount!=typeof 0) { recursionCount=0; }
var conditionalSplitRegex=RegExp(
//(1 if \\( (2 2) \\) {(3 3)} (4 else {(5 5)} 4)1)
'(;?\\s*if\\s*\\(\\s*([\\w]*)\\s*\\)\\s*\\{([^{}]*)\\}(\\s*else\\s*\\{([^{}]*?)\\}|))', 'i');
var splitted=s.parenSplit(conditionalSplitRegex);
// $1: whole conditional
// $2: test condition
// $3: true expansion
// $4: else clause (possibly empty)
// $5: false expansion (possibly null)
var numParens=5;
var ret = splitted[0];
for (var i=1; i<splitted.length; i=i+numParens+1) {
var testString=splitted[i+2-1];
var trueString=splitted[i+3-1];
var falseString=splitted[i+5-1];
if (typeof falseString=='undefined' || !falseString) { falseString=''; }
var testResult=null;
switch (testString) {
case 'user':
testResult=(article.userName())?true:false;
break;
case 'talk':
testResult=(article.talkPage())?false:true; // talkPage converts _articles_ to talkPages
break;
case 'admin':
testResult=getValueOf('popupAdminLinks')?true:false;
break;
case 'oldid':
testResult=(typeof oldid != 'undefined' && oldid)?true:false;
break;
case 'rcid':
testResult=(typeof rcid != 'undefined' && rcid)?true:false;
break;
case 'ipuser':
testResult=(article.isIpUser())?true:false;
break;
case 'mainspace_en':
testResult=isInMainNamespace(article) &&
pg.wiki.hostname=='en.wikipedia.org';
break;
case 'wikimedia':
testResult=(pg.wiki.wikimedia) ? true : false;
break;
case 'diff':
testResult=(typeof diff != 'undefined' && diff)?true:false;
break;
}
switch(testResult) {
case null: ret+=splitted[i]; break;
case true: ret+=trueString; break;
case false: ret+=falseString; break;
}
// append non-conditional string
ret += splitted[i+numParens];
}
if (conditionalSplitRegex.test(ret) && recursionCount < 10) {
return expandConditionalNavlinkString(ret,article,z,recursionCount+1);
}
return ret;
}
function navlinkStringToArray(s, article, params) {
s=expandConditionalNavlinkString(s,article,params);
var splitted=s.parenSplit(RegExp('<<(.*?)>>'));
var ret=[];
for (var i=0; i<splitted.length; ++i) {
if (i%2) { // i odd, so s is a tag
var t=new navlinkTag();
var ss=splitted[i].split('|');
t.id=ss[0];
for (var j=1; j<ss.length; ++j) {
var sss=ss[j].split('=');
if (sss.length>1) {
t[sss[0]]=sss[1];
}
else { // no assignment (no "="), so treat this as a title (overwriting the last one)
t.text=popupString(sss[0]);
}
}
t.article=article;
var oldid=params.oldid, rcid=params.rcid, diff=params.diff;
if (typeof oldid != 'undefined' && oldid != null) { t.oldid=oldid; }
if (typeof rcid != 'undefined' && rcid != null) { t.rcid=rcid; }
if (typeof diff != 'undefined' && diff != null) { t.diff=diff; }
if (!t.text && t.id != 'mainlink') { t.text=popupString(t.id); }
ret.push(t);
}
else { // plain HTML
ret.push(splitted[i]);
}
}
return ret;
}
function navlinkSubstituteHTML(s) {
return s.split('*').join(getValueOf('popupNavLinkSeparator'))
.split('<menurow>').join('<li class="popup_menu_row">')
.split('</menurow>').join('</li>')
.split('<menu>').join('<ul class="popup_menu">')
.split('</menu>').join('</ul>');
}
function navlinkDepth(magic,s) {
return s.split('<' + magic + '>').length - s.split('</' + magic + '>').length;
}
// navlinkString: * becomes the separator
// <<foo|bar=baz|fubar>> becomes a foo-link with attribute bar='baz'
// and visible text 'fubar'
// if(test){...} and if(test){...}else{...} work too (nested ok)
function navlinkStringToHTML(s,article,params) {
//limitAlert(navlinkStringToHTML, 5, 'navlinkStringToHTML\n' + article + '\n' + (typeof article));
var p=navlinkStringToArray(s,article,params);
var html='';
var menudepth = 0; // nested menus not currently allowed, but doesn't do any harm to code for it
var menurowdepth = 0;
var wrapping = null;
for (var i=0; i<p.length; ++i) {
if (typeof p[i] == typeof '') {
html+=navlinkSubstituteHTML(p[i]);
menudepth += navlinkDepth('menu', p[i]);
menurowdepth += navlinkDepth('menurow', p[i]);
// if (menudepth === 0) {
// tagType='span';
// } else if (menurowdepth === 0) {
// tagType='li';
// } else {
// tagType = null;
// }
} else if (typeof p[i].type != 'undefined' && p[i].type=='navlinkTag') {
if (menudepth > 0 && menurowdepth === 0) {
html += '<li class="popup_menu_item">' + p[i].html() + '</li>';
} else {
html+=p[i].html();
}
}
}
return html;
}
function navlinkTag() {
this.type='navlinkTag';
}
navlinkTag.prototype.html=function () {
this.getNewWin();
this.getPrintFunction();
var html='';
var opening, closing;
var tagType='span';
if (!tagType) {
opening = ''; closing = '';
} else {
opening = '<' + tagType + ' class="popup_' + this.id + '">';
closing = '</' + tagType + '>';
}
if (typeof this.print!='function') {
errlog ('Oh dear - invalid print function for a navlinkTag, id='+this.id);
} else {
html=this.print(this);
if (typeof html != typeof '') {html='';}
else if (typeof this.shortcut!='undefined') html=addPopupShortcut(html, this.shortcut);
}
return opening + html + closing;
};
navlinkTag.prototype.getNewWin=function() {
getValueOf('popupLinksNewWindow');
if (typeof pg.option.popupLinksNewWindow[this.id] === 'undefined') { this.newWin=null; }
this.newWin=pg.option.popupLinksNewWindow[this.id];
}
navlinkTag.prototype.getPrintFunction=function() { //think about this some more
// this.id and this.article should already be defined
if (typeof this.id!=typeof '' || typeof this.article!=typeof {} ) { return; }
var html='';
var a,t;
this.noPopup=1;
switch (this.id) {
case 'contribs': case 'history': case 'whatLinksHere':
case 'userPage': case 'monobook': case 'userTalk':
case 'talk': case 'article': case 'lastEdit':
this.noPopup=null;
}
switch (this.id) {
case 'email': case 'contribs': case 'block': case 'unblock':
case 'userlog': case 'userSpace': case 'deletedContribs':
this.article=this.article.userName();
}
switch (this.id) {
case 'userTalk': case 'newUserTalk': case 'editUserTalk':
case 'userPage': case 'monobook': case 'editMonobook': case 'blocklog':
this.article=this.article.userName(true);
// fall through; no break
case 'pagelog': case 'deletelog': case 'protectlog':
delete this.oldid;
}
if (this.id=='editMonobook' || this.id=='monobook') { this.article.append('/monobook.js'); }
if (this.id != 'mainlink') {
// FIXME anchor handling should be done differently with Title object
this.article=this.article.removeAnchor();
// if (typeof this.text=='undefined') this.text=popupString(this.id);
}
switch (this.id) {
case 'undelete': this.print=specialLink; this.specialpage='Undelete'; this.sep='/'; break;
case 'whatLinksHere': this.print=specialLink; this.specialpage='Whatlinkshere'; break;
case 'relatedChanges': this.print=specialLink; this.specialpage='Recentchangeslinked'; break;
case 'move': this.print=specialLink; this.specialpage='Movepage'; break;
case 'contribs': this.print=specialLink; this.specialpage='Contributions'; break;
case 'deletedContribs':this.print=specialLink; this.specialpage='Deletedcontributions'; break;
case 'email': this.print=specialLink; this.specialpage='EmailUser'; this.sep='/'; break;
case 'block': this.print=specialLink; this.specialpage='Blockip'; this.sep='&ip='; break;
case 'unblock': this.print=specialLink; this.specialpage='Ipblocklist'; this.sep='&action=unblock&ip='; break;
case 'userlog': this.print=specialLink; this.specialpage='Log'; this.sep='&user='; break;
case 'blocklog': this.print=specialLink; this.specialpage='Log'; this.sep='&type=block&page='; break;
case 'pagelog': this.print=specialLink; this.specialpage='Log'; this.sep='&page='; break;
case 'protectlog': this.print=specialLink; this.specialpage='Log'; this.sep='&type=protect&page='; break;
case 'deletelog': this.print=specialLink; this.specialpage='Log'; this.sep='&type=delete&page='; break;
case 'userSpace': this.print=specialLink; this.specialpage='PrefixIndex'; this.sep='&namespace=2&prefix='; break;
case 'search': this.print=specialLink; this.specialpage='Search'; this.sep='&fulltext=Search&search='; break;
case 'unwatch': case 'watch':
this.print=magicWatchLink; this.action=this.id+'&autowatchlist=1&actoken='+autoClickToken(); break;
case 'history': case 'historyfeed':
case 'unprotect': case 'protect':
this.print=wikiLink; this.action=this.id; break;
case 'delete':
this.print=wikiLink; this.action='delete';
if (this.article.namespaceId()==pg.nsImageId) {
var img=this.article.stripNamespace();
this.action+='&image='+img;
}
break;
case 'markpatrolled':
case 'edit': // editOld should keep the oldid, but edit should not.
delete this.oldid; // fall through
case 'view': case 'purge': case 'render':
this.print=wikiLink;
this.action=this.id; break;
case 'raw':
this.print=wikiLink; this.action='raw&ctype=text/css'; break;
case 'new':
this.print=wikiLink; this.action='edit§ion=new'; break;
case 'mainlink':
if (typeof this.text=='undefined') { this.text=this.article.toString().entify(); }
if (getValueOf('popupSimplifyMainLink') && isInStrippableNamespace(this.article)) {
var s=this.text.split('/'); this.text=s[s.length-1];
if (this.text=='' && s.length > 1) { this.text=s[s.length-2]; }
}
this.print=titledWikiLink;
if (typeof this.title=='undefined' && pg.current.link && typeof pg.current.link.href != 'undefined') {
this.title=safeDecodeURI((pg.current.link.originalTitle)?pg.current.link.originalTitle:this.article);
if (typeof this.oldid != 'undefined' && this.oldid) {
this.title=tprintf('Revision %s of %s', [this.oldid, this.title]);
}
}
this.action='view'; break;
case 'userPage':
case 'article':
case 'monobook':
case 'editMonobook':
case 'editArticle':
delete this.oldid;
//alert(this.id+'\n'+this.article + '\n'+ typeof this.article);
this.article=this.article.articleFromTalkOrArticle();
//alert(this.id+'\n'+this.article + '\n'+ typeof this.article);
this.print=wikiLink;
if (this.id.indexOf('edit')==0) {
this.action='edit';
} else { this.action='view';}
break;
case 'userTalk':
case 'talk':
this.article=this.article.talkPage();
delete this.oldid;
this.print=wikiLink;
this.action='view'; break;
case 'arin':
this.print=arinLink; break;
case 'count':
this.print=editCounterLink; break;
case 'google':
this.print=googleLink; break;
case 'editors':
this.print=editorListLink; break;
case 'globalsearch':
this.print=globalSearchLink; break;
case 'lastEdit':
this.print=titledDiffLink;
this.title=popupString('Show the last edit');
this.from='prev'; this.to='cur'; break;
case 'oldEdit':
this.print=titledDiffLink;
this.title=popupString('Show the edit made to get revision') + ' ' + this.oldid;
this.from='prev'; this.to=this.oldid; break;
case 'editOld':
this.print=wikiLink; this.action='edit'; break;
case 'undo':
this.print=wikiLink; this.action='edit&undo='; break;
case 'markpatrolled':
this.print=wikiLink; this.action='markpatrolled';
case 'revert':
this.print=wikiLink; this.action='revert'; break;
case 'nullEdit':
this.print=wikiLink; this.action='nullEdit'; break;
case 'diffCur':
this.print=titledDiffLink;
this.title=tprintf('Show changes since revision %s', [this.oldid]);
this.from=this.oldid; this.to='cur'; break;
case 'editUserTalk':
case 'editTalk':
delete this.oldid;
this.article=this.article.talkPage();
this.action='edit'; this.print=wikiLink; break;
case 'newUserTalk':
case 'newTalk':
this.article=this.article.talkPage();
this.action='edit§ion=new'; this.print=wikiLink; break;
case 'lastContrib':
case 'sinceMe':
this.print=magicHistoryLink;
break;
case 'togglePreviews':
this.text=popupString(pg.option.simplePopups ? 'enable previews' : 'disable previews');
case 'disablePopups': case 'purgePopups':
this.print=popupMenuLink;
break;
default:
this.print=function () {return 'Unknown navlink type: '+this.id+''};
}
};
//
// end navlinks
//////////////////////////////////////////////////
//</NOLITE>
// ENDFILE: navlinks.js
// STARTFILE: shortcutkeys.js
//<NOLITE>
function popupHandleKeypress(evt) {
var keyCode = window.event ? window.event.keyCode : ( evt.keyCode ? evt.keyCode : evt.which);
if (!keyCode || !pg.current.link || !pg.current.link.navpopup) { return; }
if (keyCode==27) { // escape
killPopup();
return false; // swallow keypress
}
var letter=String.fromCharCode(keyCode);
var links=pg.current.link.navpopup.mainDiv.getElementsByTagName('A');
var startLink=0;
var i,j;
if (popupHandleKeypress.lastPopupLinkSelected) {
for (i=0; i<links.length; ++i) {
if (links[i]==popupHandleKeypress.lastPopupLinkSelected) { startLink=i; }
}
}
for (j=0; j<links.length; ++j) {
i=(startLink + j + 1) % links.length;
if (links[i].getAttribute('popupkey')==letter) {
if (evt && evt.preventDefault) evt.preventDefault();
links[i].focus();
popupHandleKeypress.lastPopupLinkSelected=links[i];
return false; // swallow keypress
}
}
// pass keypress on
if (document.oldPopupOnkeypress) { return document.oldPopupOnkeypress(evt); }
return true;
}
function addPopupShortcuts() {
if (document.onkeypress!=popupHandleKeypress) {
document.oldPopupOnkeypress=document.onkeypress;
}
document.onkeypress=popupHandleKeypress;
}
function rmPopupShortcuts() {
popupHandleKeypress.lastPopupLinkSelected=null;
try {
if (document.oldPopupOnkeypress && document.oldPopupOnkeypress==popupHandleKeypress) {
// panic
document.onkeypress=null; //function () {};
return;
}
document.onkeypress=document.oldPopupOnkeypress;
} catch (nasties) { /* IE goes here */ }
}
function addLinkProperty(html, property) {
// take "<a href=...>...</a> and add a property
// not sophisticated at all, easily broken
var i=html.indexOf('>');
if (i<0) { return html; }
return html.substring(0,i) + ' ' + property + html.substring(i);
}
function addPopupShortcut(html, key) {
if (!getValueOf('popupShortcutKeys')) { return html; }
var ret= addLinkProperty(html, 'popupkey="'+key+'"');
if (key==' ') { key=popupString('spacebar'); }
return ret.replace(RegExp('^(.*?)(title=")(.*?)(".*)$', 'i'),'$1$2$3 ['+key+']$4');
}
//</NOLITE>
// ENDFILE: shortcutkeys.js
// STARTFILE: diffpreview.js
//<NOLITE>
function loadDiff(article, oldid, diff, navpop) {
navpop.diffData={};
var oldRev, newRev;
switch (diff) {
case 'cur':
switch ( oldid ) {
case null:
case '':
case 'prev':
// eg newmessages diff link
oldRev='0&direction=prev';
newRev=0;
break;
default:
oldRev = oldid;
newRev = 0;
}
break;
case 'prev':
oldRev = ( oldid || 0 ) + '&direction=prev'; newRev = oldid; break;
case 'next':
oldRev = oldid; newRev = oldid + '&direction=next';
break;
default:
oldRev = oldid || 0; newRev = diff || 0; break;
}
oldRev = oldRev || 0;
newRev = newRev || 0;
var go = function() {
pendingNavpopTask(navpop);
getWiki(article, doneDiffNew, newRev, navpop);
pendingNavpopTask(navpop);
getWiki(article, doneDiffOld, oldRev, navpop);
var tz = Cookie.read('popTz');
if ( (window.wgEnableAPI || wgEnableAPI) && getValueOf('popupAdjustDiffDates') && tz===null) {
pendingNavpopTask(navpop);
getPageWithCaching(pg.wiki.apiwikibase + '?format=json&action=query&meta=userinfo&uiprop=options',
function(d) {
completedNavpopTask(navpop);
setTimecorrectionCookie(d);
if (diffDownloadsComplete(navpop)) { insertDiff(navpop); }
}, navpop);
}
return true; // remove hook once run
}
if (navpop.visible || !getValueOf('popupLazyDownloads')) { go(); }
else { navpop.addHook(go, 'unhide', 'before', 'DOWNLOAD_DIFFS'); }
}
function setTimecorrectionCookie(d) {
try {
var jsobj=getJsObj(d.data);
var tz=jsobj.query.userinfo.options.timecorrection;
} catch (someError) {
logerr( 'setTimecorretion failed' );
return;
}
Cookie.create( 'popTz', getTimeOffset(tz), 1);
}
function doneDiff(download, isOld) {
if (!download.owner || !download.owner.diffData) { return; }
var navpop=download.owner;
var label= (isOld) ? 'Old' : 'New';
var otherLabel=(isOld) ? 'New' : 'Old';
navpop.diffData[label]=download;
completedNavpopTask(download.owner);
if (diffDownloadsComplete(navpop)) { insertDiff(navpop); }
}
function diffDownloadsComplete(navpop) {
if ( Cookie.read('popTz')===null) { return false; }
return navpop.diffData.Old && navpop.diffData.New;
}
function doneDiffNew(download) { doneDiff(download, false); }
function doneDiffOld(download) { doneDiff(download, true); }
function rmBoringLines(a,b,context) {
if (typeof context == 'undefined') { context=2; }
// this is fairly slow... i think it's quicker than doing a word-based diff from the off, though
var aa=[], aaa=[];
var bb=[], bbb=[];
var i, j;
// first, gather all disconnected nodes in a and all crossing nodes in a and b
for (i=0; i<a.length; ++i ) {
if(!a[i].paired) { aa[i]=1; }
else if (countCrossings(b,a,i, true)) {
aa[i]=1;
bb[ a[i].row ] = 1;
}
}
// pick up remaining disconnected nodes in b
for (i=0; i<b.length; ++i ) {
if (bb[i]==1) { continue; }
if(!b[i].paired) { bb[i]=1; }
}
// another pass to gather context: we want the neighbours of included nodes which are not yet included
// we have to add in partners of these nodes, but we don't want to add context for *those* nodes in the next pass
for (i=0; i<b.length; ++i) {
if ( bb[i] == 1 ) {
for (j=max(0,i-context); j < min(b.length, i+context); ++j) {
if ( !bb[j] ) { bb[j] = 1; aa[ b[j].row ] = 0.5; }
}
}
}
for (i=0; i<a.length; ++i) {
if ( aa[i] == 1 ) {
for (j=max(0,i-context); j < min(a.length, i+context); ++j) {
if ( !aa[j] ) { aa[j] = 1; bb[ a[j].row ] = 0.5; }
}
}
}
for (i=0; i<bb.length; ++i) {
if (bb[i] > 0) { // it's a row we need
if (b[i].paired) { bbb.push(b[i].text); } // joined; partner should be in aa
else {
bbb.push(b[i]);
}
}
}
for (i=0; i<aa.length; ++i) {
if (aa[i] > 0) { // it's a row we need
if (a[i].paired) { aaa.push(a[i].text); } // joined; partner should be in aa
else {
aaa.push(a[i]);
}
}
}
return { a: aaa, b: bbb};
}
function stripOuterCommonLines(a,b,context) {
var i=0;
while (i<a.length && i < b.length && a[i]==b[i]) { ++i; }
var j=a.length-1; var k=b.length-1;
while ( j>=0 && k>=0 && a[j]==b[k] ) { --j; --k; }
return { a: a.slice(max(0,i - 1 - context), min(a.length+1, j + context+1)),
b: b.slice(max(0,i - 1 - context), min(b.length+1, k + context+1)) };
}
function insertDiff(navpop) {
// for speed reasons, we first do a line-based diff, discard stuff that seems boring, then do a word-based diff
// FIXME: sometimes this gives misleading diffs as distant chunks are squashed together
var oldlines=navpop.diffData.Old.data.split('\n');
var newlines=navpop.diffData.New.data.split('\n');
var inner=stripOuterCommonLines(oldlines,newlines,getValueOf('popupDiffContextLines'));
oldlines=inner.a; newlines=inner.b;
var truncated=false;
getValueOf('popupDiffMaxLines');
if (oldlines.length > pg.option.popupDiffMaxLines || newlines.length > pg.option.popupDiffMaxLines) {
// truncate
truncated=true;
inner=stripOuterCommonLines(oldlines.slice(0,pg.option.popupDiffMaxLines),
newlines.slice(0,pg.option.popupDiffMaxLines),
pg.option.popupDiffContextLines);
oldlines=inner.a; newlines=inner.b;
}
var lineDiff=diff(oldlines, newlines);
var lines2=rmBoringLines(lineDiff.o, lineDiff.n);
var oldlines2=lines2.a; var newlines2=lines2.b;
var simpleSplit = !String.prototype.parenSplit.isNative;
var html='<hr>';
if (getValueOf('popupDiffDates')) {
html += diffDatesTable(navpop.diffData.Old, navpop.diffData.New);
html += '<hr>';
}
html += shortenDiffString(
diffString(oldlines2.join('\n'), newlines2.join('\n'), simpleSplit),
getValueOf('popupDiffContextCharacters') ).join('<hr>');
setPopupTipsAndHTML(html.split('\n').join('<br>') +
(truncated ? '<hr><b>'+popupString('Diff truncated for performance reasons')+'</b>' : '') ,
'popupPreview', navpop.idNumber);
}
function diffDatesTable( oldDl, newDl ) {
var html='<table class="popup_diff_dates">';
html += diffDatesTableRow( newDl, tprintf('New revision'));
html += diffDatesTableRow( oldDl, tprintf('Old revision'));
html += '</table>';
return html;
}
function diffDatesTableRow( dl, label ) {
var txt='';
if (!dl) {
txt=popupString('Something went wrong :-(');
} else if (!dl.lastModified) {
txt= (/^\s*$/.test(dl.data)) ?
popupString('Empty revision, maybe non-existent') : popupString('Unknown date');
} else {
var datePrint=getValueOf('popupDiffDatePrinter');
if (typeof dl.lastModified[datePrint] == 'function') {
if (getValueOf('popupAdjustDiffDates')) {
var off;
if (off=Cookie.read('popTz')) {
var d2=adjustDate(dl.lastModified, off);
txt = dayFormat(d2, true) + ' ' + timeFormat(d2, true);
}
} else {
txt = dl.lastModified[datePrint]();
}
} else {
txt = tprintf('Invalid %s %s', ['popupDiffDatePrinter', datePrint]);
}
}
var revlink = generalLink({url: dl.url.replace(/&.*?(oldid=[0-9]+(?:&direction=[^&]*)?).*/, '&$1'),
text: label, title: label});
return simplePrintf('<tr><td>%s</td><td>%s</td></tr>', [ revlink, txt ]);
}
//</NOLITE>
// ENDFILE: diffpreview.js
// STARTFILE: links.js
//<NOLITE>
/////////////////////
// LINK GENERATION //
/////////////////////
// titledDiffLink --> titledWikiLink --> generalLink
// wikiLink --> titledWikiLink --> generalLink
// editCounterLink --> generalLink
function titledDiffLink(l) { // article, text, title, from, to) {
return titledWikiLink({article: l.article, action: l.to + '&oldid=' + l.from,
newWin: l.newWin,
noPopup: l.noPopup,
text: l.text, title: l.title,
/* hack: no oldid here */
actionName: 'diff'});
}
function wikiLink(l) {
//{article:article, action:action, text:text, oldid, newid}) {
if (! (typeof l.article == typeof {}
&& typeof l.action == typeof '' && typeof l.text==typeof '')) return null;
if (typeof l.oldid == 'undefined') { l.oldid=null; }
var savedOldid = l.oldid;
if (!/^(edit|view|revert|render)$|^raw/.test(l.action)) { l.oldid=null; }
var hint=popupString(l.action + 'Hint'); // revertHint etc etc etc
var oldidData=[l.oldid, safeDecodeURI(l.article)];
var revisionString = tprintf('revision %s of %s', oldidData);
log('revisionString='+revisionString);
switch (l.action) {
case 'edit§ion=new': hint = popupString('newSectionHint'); break;
case 'edit&undo=':
if (l.diff && l.diff != 'prev' && savedOldid ) {
l.action += l.diff + '&undoafter=' + savedOldid;
} else if (savedOldid) {
l.action += savedOldid;
}
hint = popupString('undoHint');
break;
case 'raw&ctype=text/css': hint=popupString('rawHint'); break;
case 'revert':
if (!window.wgEnableAPI || !wgEnableAPI) {
alert( 'This function of navigation popups now requires a MediaWiki ' +
'installation with the API enabled.');
break;
}
var p=parseParams(pg.current.link.href);
l.action='edit&autoclick=wpSave&actoken=' + autoClickToken() + '&autosummary=' + revertSummary(l.oldid, p.diff);
if (p.diff=='prev') {
l.action += '&direction=prev';
revisionString = tprintf('the revision prior to revision %s of %s', oldidData);
}
if (getValueOf('popupRevertSummaryPrompt')) { l.action += '&autosummaryprompt=true'; }
if (getValueOf('popupMinorReverts')) { l.action += '&autominor=true'; }
log('revisionString is now '+revisionString);
break;
case 'nullEdit':
l.action='edit&autoclick=wpSave&actoken=' + autoClickToken() + '&autosummary=null';
break;
case 'historyfeed':
l.action='history&feed=rss';
break;
case 'markpatrolled':
l.action='markpatrolled&rcid='+l.rcid;
}
if (hint) {
if (l.oldid) {
hint = simplePrintf(hint, [revisionString]);
}
else {
hint = simplePrintf(hint, [safeDecodeURI(l.article)]);
}
}
else {
hint = safeDecodeURI(l.article + '&action=' + l.action) + (l.oldid) ? '&oldid='+l.oldid : '';
}
return titledWikiLink({article: l.article, action: l.action, text: l.text, newWin:l.newWin,
title: hint, oldid: l.oldid, noPopup: l.noPopup, onclick: l.onclick});
}
function revertSummary(oldid, diff) {
var ret='';
if (diff == 'prev') {
ret=getValueOf('popupQueriedRevertToPreviousSummary');
} else { ret = getValueOf('popupQueriedRevertSummary'); }
return ret + '&autorv=' + oldid;
}
function titledWikiLink(l) {
// possible properties of argument:
// article, action, text, title, oldid, actionName, className, noPopup
// oldid = null is fine here
// article and action are mandatory args
if (typeof l.article == 'undefined' || typeof l.action=='undefined') {
errlog('got undefined article or action in titledWikiLink');
return null;
}
var base = pg.wiki.titlebase + l.article.urlString();
var url=base;
if (typeof l.actionName=='undefined' || !l.actionName) { l.actionName='action'; }
// no need to add &action=view, and this confuses anchors
if (l.action != 'view') { url = base + '&' + l.actionName + '=' + l.action; }
if (typeof l.oldid!='undefined' && l.oldid) { url+='&oldid='+l.oldid; }
var cssClass=pg.misc.defaultNavlinkClassname;
if (typeof l.className!='undefined' && l.className) { cssClass=l.className; }
return generalNavLink({url: url, newWin: l.newWin,
title: (typeof l.title != 'undefined') ? l.title : null,
text: (typeof l.text!='undefined')?l.text:null,
className: cssClass, noPopup:l.noPopup, onclick:l.onclick});
}
function getLastContrib(wikipage, newWin) {
getHistoryInfo(wikipage, function(x){processLastContribInfo(x,{page: wikipage, newWin: newWin})});
}
function processLastContribInfo(info, stuff) {
if(!info.edits || !info.edits.length) { alert('Popups: an odd thing happened. Please retry.'); return; }
if(!info.firstNewEditor) {
alert(tprintf('Only found one editor: %s made %s edits', [info.edits[0].editor,info.edits.length]));
return;
}
var newUrl=pg.wiki.titlebase + new Title(stuff.page).urlString() + '&diff=cur&oldid='+info.firstNewEditor.oldid;
displayUrl(newUrl, stuff.newWin);
}
function getDiffSinceMyEdit(wikipage, newWin) {
getHistoryInfo(wikipage, function(x){processDiffSinceMyEdit(x,{page: wikipage, newWin: newWin})});
}
function processDiffSinceMyEdit(info, stuff) {
if(!info.edits || !info.edits.length) { alert('Popups: something fishy happened. Please try again.'); return; }
var friendlyName=stuff.page.split('_').join(' ');
if(!info.myLastEdit) {
alert(tprintf('Couldn\'t find an edit by %s\nin the last %s edits to\n%s',
[info.userName, getValueOf('popupHistoryLimit'), friendlyName]));
return;
}
if(info.myLastEdit.index==0) {
alert(tprintf("%s seems to be the last editor to the page %s", [info.userName, friendlyName]));
return;
}
var newUrl=pg.wiki.titlebase + new Title(stuff.page).urlString() + '&diff=cur&oldid='+ info.myLastEdit.oldid;
displayUrl(newUrl, stuff.newWin);
}
function displayUrl(url, newWin){
if(newWin) { window.open(url); }
else { document.location=url; }
}
function purgePopups() {
processAllPopups(true);
setupCache(); // deletes all cached items (not browser cached, though...)
pg.option={};
abortAllDownloads();
}
function processAllPopups(nullify, banish) {
for (var i=0; i<pg.current.links.length; ++i) {
if (!pg.current.links[i].navpopup) { continue; }
(nullify || banish) && pg.current.links[i].navpopup.banish();
pg.current.links[i].simpleNoMore=false;
nullify && (pg.current.links[i].navpopup=null);
}
}
function disablePopups(){
processAllPopups(false, true);
setupTooltips(null, true);
}
function togglePreviews() {
processAllPopups(true, true);
pg.option.simplePopups=!pg.option.simplePopups;
abortAllDownloads();
}
function magicWatchLink(l) {
//Yuck!! Would require a thorough redesign to add this as a click event though ...
l.onclick = simplePrintf( 'modifyWatchlist(\'%s\',\'%s\');return false;', [l.article.toString(true).split("\\").join("\\\\").split("'").join("\\'"), this.id] );
return wikiLink(l);
}
function modifyWatchlist(title, action) {
var reqData = {
'action': 'watch',
'format': 'json',
'title': title,
'token': mw.user.tokens.get('watchToken'),
'uselang': mw.config.get('wgUserLanguage')
};
if (action==='unwatch') reqData.unwatch = '';
jQuery.ajax({
url: mw.util.wikiScript('api'),
dataType: 'json',
type: 'POST',
data: reqData,
success: function( data, textStatus, xhr ) {
mw.util.jsMessage( data.watch.message, 'watch' );
}
});
}
function magicHistoryLink(l) {
// FIXME use onclick change href trick to sort this out instead of window.open
var jsUrl='', title='';
switch(l.id) {
case 'lastContrib':
jsUrl=simplePrintf('javascript:getLastContrib(\'%s\',%s)',
[l.article.toString(true).split("\\").join("\\\\").split("'").join("\\'"), l.newWin]);
title=popupString('lastContribHint');
break;
case 'sinceMe':
jsUrl=simplePrintf('javascript:getDiffSinceMyEdit(\'%s\',%s)',
[l.article.toString(true).split("\\").join("\\\\").split("'").join("\\'"), l.newWin]);
title=popupString('sinceMeHint');
break;
}
return generalNavLink({url: jsUrl, newWin: false, // can't have new windows with JS links, I think
title: title, text: l.text, noPopup: l.noPopup});
}
function popupMenuLink(l) {
var jsUrl=simplePrintf('javascript:%s()', [l.id]);
var title=popupString(simplePrintf('%sHint', [l.id]));
return generalNavLink({url: jsUrl, newWin:false, title:title, text:l.text, noPopup:l.noPopup});
}
function specialLink(l) {
// properties: article, specialpage, text, sep
if (typeof l.specialpage=='undefined'||!l.specialpage) return null;
var base = pg.wiki.titlebase + mw.config.get('wgFormattedNamespaces')[pg.nsSpecialId]+':'+l.specialpage;
if (typeof l.sep == 'undefined' || l.sep===null) l.sep='&target=';
var article=l.article.urlString({keepSpaces: l.specialpage=='Search'});
var hint=popupString(l.specialpage+'Hint');
switch (l.specialpage) {
case 'Log':
switch (l.sep) {
case '&user=': hint=popupString('userLogHint'); break;
case '&type=block&page=': hint=popupString('blockLogHint'); break;
case '&page=': hint=popupString('pageLogHint'); break;
case '&type=protect&page=': hint=popupString('protectLogHint'); break;
case '&type=delete&page=': hint=popupString('deleteLogHint'); break;
default: log('Unknown log type, sep=' + l.sep); hint='Missing hint (FIXME)';
}
break;
case 'PrefixIndex': article += '/'; break;
}
if (hint) hint = simplePrintf(hint, [safeDecodeURI(l.article)]);
else hint = safeDecodeURI(l.specialpage+':'+l.article) ;
var url = base + l.sep + article;
return generalNavLink({url: url, title: hint, text: l.text, newWin:l.newWin, noPopup:l.noPopup});
}
function generalLink(l) {
// l.url, l.text, l.title, l.newWin, l.className, l.noPopup, l.onclick
if (typeof l.url=='undefined') return null;
// only quotation marks in the url can screw us up now... I think
var url=l.url.split('"').join('%22');
var ret='<a href="' + url + '"';
if (typeof l.title!='undefined' && l.title) { ret += ' title="' + pg.escapeQuotesHTML(l.title) + '"'; }
if (typeof l.onclick!='undefined' && l.onclick) { ret += ' onclick="' + pg.escapeQuotesHTML(l.onclick) + '"'; }
if (l.noPopup) { ret += ' noPopup=1'; }
var newWin;
if (typeof l.newWin=='undefined' || l.newWin===null) { newWin=getValueOf('popupNewWindows'); }
else { newWin=l.newWin; }
if (newWin) { ret += ' target="_blank"'; }
if (typeof l.className!='undefined'&&l.className) { ret+=' class="'+l.className+'"'; }
ret += '>';
if (typeof l.text==typeof '') { ret+= l.text; }
ret +='</a>';
return ret;
}
function appendParamsToLink(linkstr, params) {
var sp=linkstr.parenSplit(RegExp('(href="[^"]+?)"', 'i'));
if (sp.length<2) return null;
var ret=sp.shift() + sp.shift();
ret += '&' + params + '"';
ret += sp.join('');
return ret;
}
function changeLinkTargetLink(x) { // newTarget, text, hint, summary, clickButton, minor, title (optional) {
if (x.newTarget) {
log ('changeLinkTargetLink: newTarget=' + x.newTarget);
}
// optional: oldTarget (in wikitext)
// if x.newTarget omitted or null, remove the link
//x.text=encodeURI(x.text); // this buggers things up on zh.wikipedia.org and doesn't seem necessary
x.clickButton=encodeURI(x.clickButton);
// FIXME: first character of page title as well as namespace should be case insensitive
// eg [[category:foo]] and [[Category:Foo]] are equivalent
// this'll break if charAt(0) is nasty
var cA=literalizeRegex(x.oldTarget);
var chs=cA.charAt(0).toUpperCase();
chs='['+chs + chs.toLowerCase()+']';
var currentArticleRegexBit=encodeURIComponent(chs+cA.substring(1));
currentArticleRegexBit=currentArticleRegexBit
.split(RegExp('[_ ]+', 'g')).join('[_ ]+')
.split( "%20" ).join('[_ ]+')
.split('\\(').join('(?:%2528|\\()')
.split('\\)').join('(?:%2529|\\))');
// leading and trailing space should be ignored, and anchor bits optional:
currentArticleRegexBit = '\\s*(' + currentArticleRegexBit + '(?:#[^\\[\\|]*)?)\\s*';
// e.g. Computer (archaic) -> \s*([Cc]omputer[_ ](?:%2528|\()archaic(?:%2528|\)))\s*
// autoedit=s~\[\[([Cc]ad)\]\]~[[Computer-aided%20design|$1]]~g;s~\[\[([Cc]AD)[|]~[[Computer-aided%20design|~g
var title=x.title || wgPageName.split('_').join(' ');
var lk=titledWikiLink({article: new Title(title), newWin:x.newWin,
action: 'edit',
text: x.text,
title: x.hint,
className: 'popup_change_title_link'
});
var cmd='';
if (x.newTarget) {
// escape '&' and other nasties
var t=encodeURIComponent(x.newTarget);
var s=encodeURIComponent(literalizeRegex(x.newTarget));
cmd += 's~\\[\\['+currentArticleRegexBit+'\\]\\]~[['+t+'|$1]]~g;';
cmd += 's~\\[\\['+currentArticleRegexBit+'[|]~[['+t+'|~g;';
cmd += 's~\\[\\['+s + '\\|' + s + '\\]\\]~[[' + t + ']]~g';
} else {
cmd += 's~\\[\\['+currentArticleRegexBit+'\\]\\]~$1~g;';
cmd += 's~\\[\\['+currentArticleRegexBit+'[|](.*?)\\]\\]~$2~g';
}
cmd += '&autoclick='+x.clickButton + '&actoken=' + autoClickToken();
cmd += ( x.minor == null ) ? '' : '&autominor='+x.minor;
cmd += ( x.watch == null ) ? '' : '&autowatch='+x.watch;
cmd += '&autosummary='+encodeURIComponent(x.summary);
return appendParamsToLink(lk, 'autoedit='+cmd);
}
function redirLink(redirMatch, article) {
// NB redirMatch is in wikiText
var ret='';
if (getValueOf('popupAppendRedirNavLinks') && getValueOf('popupNavLinks')) {
ret += '<hr>';
if (getValueOf('popupFixRedirs') && typeof autoEdit != 'undefined' && autoEdit) {
log('redirLink: newTarget=' + redirMatch);
ret += addPopupShortcut(
changeLinkTargetLink(
{newTarget: redirMatch, text: popupString('Redirects'),
hint: popupString('Fix this redirect'),
summary: simplePrintf(getValueOf('popupFixRedirsSummary'),
[article.toString(), redirMatch ]),
oldTarget: article.toString(),
clickButton: getValueOf('popupRedirAutoClick'), minor: true,
watch: getValueOf('popupWatchRedirredPages')})
, 'R');
ret += popupString(' to ');
}
else ret += popupString('Redirects') + popupString(' to ');
return ret;
}
else return '<br> ' + popupString('Redirects') + popupString(' to ') +
titledWikiLink({article: new Title().fromWikiText(redirMatch), action: 'view', /* FIXME: newWin */
text: safeDecodeURI(redirMatch), title: popupString('Bypass redirect')});
}
function arinLink(l) {
if (!saneLinkCheck(l)) { return null; }
if ( ! l.article.isIpUser() || ! pg.wiki.wikimedia) return null;
var uN=l.article.userName();
return generalNavLink({url:'http://ws.arin.net/cgi-bin/whois.pl?queryinput=' + encodeURIComponent(uN), newWin:l.newWin,
title: tprintf('Look up %s in ARIN whois database', [uN]),
text: l.text, noPopup:1});
}
function toolDbName(cookieStyle) {
var ret = wgDBname;
if (!cookieStyle) { ret+= '_p'; }
return ret;
}
function saneLinkCheck(l) {
if (typeof l.article != typeof {} || typeof l.text != typeof '') { return false; }
return true;
}
function editCounterLink(l) {
if(!saneLinkCheck(l)) return null;
if (! pg.wiki.wikimedia) return null;
var uN=l.article.userName();
var tool=getValueOf('popupEditCounterTool');
var url;
var soxredToolUrl='//tools.wmflabs.org/xtools/pcount/index.php?name=$1&lang=$2&wiki=$3';
switch(tool) {
case 'custom':
url=simplePrintf(getValueOf('popupEditCounterUrl'), [ encodeURIComponent(uN), toolDbName() ]);
break;
case 'kate':
case 'interiot':
default:
var theWiki=pg.wiki.hostname.split('.');
url=simplePrintf(soxredToolUrl, [ encodeURIComponent(uN), theWiki[0], theWiki[1] ]);
}
return generalNavLink({url:url, title: tprintf('editCounterLinkHint', [uN]),
newWin:l.newWin, text: l.text, noPopup:1});
}
function globalSearchLink(l) {
if(!saneLinkCheck(l)) return null;
var base='http://vs.aka-online.de/cgi-bin/globalwpsearch.pl?timeout=120&search=';
var article=l.article.urlString({keepSpaces:true});
return generalNavLink({url:base + article, newWin:l.newWin,
title: tprintf('globalSearchHint', [safeDecodeURI(l.article)]),
text: l.text, noPopup:1});
}
function googleLink(l) {
if(!saneLinkCheck(l)) return null;
var base='http://www.google.com/search?q=';
var article=l.article.urlString({keepSpaces:true});
return generalNavLink({url:base + '%22' + article + '%22', newWin:l.newWin,
title: tprintf('googleSearchHint', [safeDecodeURI(l.article)]),
text: l.text, noPopup:1});
}
function editorListLink(l) {
if(!saneLinkCheck(l)) return null;
var article= l.article.articleFromTalkPage() || l.article;
var theWiki=pg.wiki.hostname.split('.');
var base='//toolserver.org/~tparis/articleinfo/index.php?&uselang=' + wgUserLanguage +
'lang=' + theWiki[0] + '&wiki=' + theWiki[1] + '&begin=&end=&article='
return generalNavLink({url:base+article.urlString(),
title: tprintf('editorListHint', [article]),
newWin:l.newWin, text: l.text, noPopup:1});
}
function generalNavLink(l) {
l.className = (l.className==null) ? 'popupNavLink' : l.className;
return generalLink(l);
}
//////////////////////////////////////////////////
// magic history links
//
function getHistoryInfo(wikipage, whatNext) {
log('getHistoryInfo');
getHistory(wikipage, whatNext ? function(d){whatNext(processHistory(d));} : processHistory);
}
// FIXME eliminate pg.idNumber ... how? :-(
function getHistory(wikipage, onComplete) {
log('getHistory');
if( !window.wgEnableAPI || !wgEnableAPI ) {
alert( 'This function of navigation popups now requires a MediaWiki ' +
'installation with the API enabled.');
return false;
}
var url = pg.wiki.apiwikibase + '?format=json&action=query&prop=revisions&titles=' +
new Title(wikipage).urlString() + '&rvlimit=' + getValueOf('popupHistoryLimit');
log('getHistory: url='+url);
if (pg.flag.isIE) {
url = url + '&*'; //to circumvent https://bugzilla.wikimedia.org/show_bug.cgi?id=28840
}
return startDownload(url, pg.idNumber+'history', onComplete);
}
function processHistory(download) {
var jsobj = getJsObj(download.data);
try {
window.x=jsobj;
var p=jsobj['query']['pages']
for (var pageid in p) {
var revisions=p[pageid]['revisions'];
// we only get the first one
break;
}
} catch (someError) {
log('Something went wrong with JSON business');
return finishProcessHistory([]);
}
var edits=[];
for (var i=0; i<revisions.length; ++i) {
edits.push({ oldid: revisions[i]['revid'], editor: revisions[i]['user'] });
}
log('processed ' + edits.length + ' edits');
return finishProcessHistory(edits, wgUserName);
}
function finishProcessHistory(edits, userName) {
var histInfo={};
histInfo.edits=edits;
histInfo.userName=userName;
for (var i=0; i<edits.length; ++i) {
if (typeof histInfo.myLastEdit == 'undefined' && userName && edits[i].editor==userName) {
histInfo.myLastEdit={index: i, oldid: edits[i].oldid, previd: (i==0 ? null : edits[i-1].oldid)};
}
if (typeof histInfo.firstNewEditor == 'undefined' && edits[i].editor != edits[0].editor) {
histInfo.firstNewEditor={index:i, oldid:edits[i].oldid, previd: (i==0 ? null : edits[i-1].oldid)};
}
}
//pg.misc.historyInfo=histInfo;
return histInfo;
}
//</NOLITE>
// ENDFILE: links.js
// STARTFILE: options.js
//////////////////////////////////////////////////
// options
// check for cookies and existing value, else use default
function defaultize(x) {
var val=null;
if (x!='popupCookies') {
defaultize('popupCookies');
if (pg.option.popupCookies && (val=Cookie.read(x))) {
pg.option[x]=val;
return;
}
}
if (pg.option[x]===null || typeof pg.option[x]=='undefined') {
if (typeof window[x] != 'undefined' ) pg.option[x]=window[x];
else pg.option[x]=pg.optionDefault[x];
}
}
function newOption(x, def) {
pg.optionDefault[x]=def;
}
function setDefault(x, def) {
return newOption(x, def);
}
function getValueOf(varName) {
defaultize(varName);
return pg.option[varName];
}
function useDefaultOptions() { // for testing
for (var p in pg.optionDefault) {
pg.option[p]=pg.optionDefault[p];
if (typeof window[p]!='undefined') { delete window[p]; }
}
}
function setOptions() {
// user-settable parameters and defaults
var userIsSysop = false;
if ( wgUserGroups ) {
for ( var g = 0; g < wgUserGroups.length; ++g ) {
if ( wgUserGroups[g] == "sysop" )
userIsSysop = true
}
}
// Basic options
newOption('popupDelay', 0.5);
newOption('popupHideDelay', 0.5);
newOption('simplePopups', false);
newOption('popupStructure', 'shortmenus'); // see later - default for popupStructure is 'original' if simplePopups is true
newOption('popupActionsMenu', true);
newOption('popupSetupMenu', true);
newOption('popupAdminLinks', userIsSysop);
newOption('popupShortcutKeys', false);
newOption('popupHistoricalLinks', true);
newOption('popupOnlyArticleLinks', true);
newOption('removeTitles', true);
newOption('popupMaxWidth', 350);
newOption('popupInitialWidth', false); // integer or false
newOption('popupSimplifyMainLink', true);
newOption('popupAppendRedirNavLinks', true);
newOption('popupTocLinks', false);
newOption('popupSubpopups', true);
newOption('popupDragHandle', false /* 'popupTopLinks'*/);
newOption('popupLazyPreviews', true);
newOption('popupLazyDownloads', true);
newOption('popupAllDabsStubs', false);
newOption('popupDebugging', false);
newOption('popupAdjustDiffDates', true);
newOption('popupActiveNavlinks', true);
newOption('popupModifier', false); // ctrl, shift, alt or meta
newOption('popupModifierAction', 'enable'); // or 'disable'
newOption('popupDraggable', true);
//<NOLITE>
// images
newOption('popupImages', true);
newOption('imagePopupsForImages', true);
newOption('popupNeverGetThumbs', false);
//newOption('popupImagesToggleSize', true);
newOption('popupThumbAction', 'imagepage'); //'sizetoggle');
newOption('popupImageSize', 60);
newOption('popupImageSizeLarge', 200);
// redirs, dabs, reversion
newOption('popupFixRedirs', false);
newOption('popupRedirAutoClick', 'wpDiff');
newOption('popupFixDabs', false);
newOption('popupRevertSummaryPrompt', false);
newOption('popupMinorReverts', false);
newOption('popupRedlinkRemoval', false);
newOption('popupWatchDisambiggedPages', null);
newOption('popupWatchRedirredPages', null);
newOption('popupDabWiktionary', 'last');
// navlinks
newOption('popupNavLinks', true);
newOption('popupNavLinkSeparator', ' ⋅ ');
newOption('popupLastEditLink', true);
newOption('popupEditCounterTool', 'soxred');
newOption('popupEditCounterUrl', '');
newOption('popupExtraUserMenu', '');
//</NOLITE>
// previews etc
newOption('popupPreviews', true);
newOption('popupSummaryData', true);
newOption('popupMaxPreviewSentences', 5);
newOption('popupMaxPreviewCharacters', 600);
newOption('popupLastModified', true);
newOption('popupPreviewKillTemplates', true);
newOption('popupPreviewRawTemplates', true);
newOption('popupPreviewFirstParOnly', true);
newOption('popupPreviewCutHeadings', true);
newOption('popupPreviewButton', false);
newOption('popupPreviewButtonEvent', 'click');
//<NOLITE>
// diffs
newOption('popupPreviewDiffs', true);
newOption('popupDiffMaxLines', 100);
newOption('popupDiffContextLines', 2);
newOption('popupDiffContextCharacters', 40);
newOption('popupDiffDates', true);
newOption('popupDiffDatePrinter', 'toLocaleString');
// edit summaries. God, these are ugly.
newOption('popupFixDabsSummary', popupString('defaultpopupFixDabsSummary') );
newOption('popupExtendedRevertSummary', popupString('defaultpopupExtendedRevertSummary') );
newOption('popupTimeOffset', null);
newOption('popupRevertSummary', popupString('defaultpopupRevertSummary') );
newOption('popupRevertToPreviousSummary', popupString('defaultpopupRevertToPreviousSummary') );
newOption('popupQueriedRevertSummary', popupString('defaultpopupQueriedRevertSummary') );
newOption('popupQueriedRevertToPreviousSummary', popupString('defaultpopupQueriedRevertToPreviousSummary') );
newOption('popupFixRedirsSummary', popupString('defaultpopupFixRedirsSummary') );
newOption('popupRedlinkSummary', popupString('defaultpopupRedlinkSummary') );
newOption('popupRmDabLinkSummary', popupString('defaultpopupRmDabLinkSummary') );
//</NOLITE>
// misc
newOption('popupCookies', false);
newOption('popupHistoryLimit', 50);
//<NOLITE>
newOption('popupFilters', [popupFilterStubDetect, popupFilterDisambigDetect,
popupFilterPageSize, popupFilterCountLinks,
popupFilterCountImages, popupFilterCountCategories,
popupFilterLastModified]);
newOption('extraPopupFilters', []);
newOption('popupOnEditSelection', 'cursor');
newOption('popupPreviewHistory', true);
newOption('popupImageLinks', true);
newOption('popupCategoryMembers', true);
newOption('popupUserInfo', true);
newOption('popupHistoryPreviewLimit', 25);
newOption('popupContribsPreviewLimit',25);
newOption('popupRevDelUrl', '//en.wikipedia.org/wiki/Wikipedia:Revision_deletion');
//</NOLITE>
// new windows
newOption('popupNewWindows', false);
newOption('popupLinksNewWindow', {'lastContrib': true, 'sinceMe': true});
// regexps
newOption('popupDabRegexp', '(\\{\\{\\s*disambig(?!uation needed)|disambig\\s*\\}\\}|disamb\\s*\\}\\}|dab\\s*\\}\\})|\\{\\{\\s*(((geo|hn|road?|school|number)dis)|[234][lc][acw]|(road|ship)index)(\\s*[|][^}]*)?\\s*[}][}]|is a .*disambiguation.*page');
newOption('popupAnchorRegexp', 'anchors?'); //how to identify an anchors template
newOption('popupStubRegexp', '(sect)?stub[}][}]|This .*-related article is a .*stub');
newOption('popupImageVarsRegexp', 'image|image_(?:file|skyline|name|flag|seal)|cover|badge|logo');
}
// ENDFILE: options.js
// STARTFILE: strings.js
//<NOLITE>
//////////////////////////////////////////////////
// Translatable strings
//////////////////////////////////////////////////
//
// See instructions at
// http://en.wikipedia.org/wiki/Wikipedia:Tools/Navigation_popups/Translation
pg.string = {
/////////////////////////////////////
// summary data, searching etc.
/////////////////////////////////////
'article': 'article',
'category': 'category',
'categories': 'categories',
'image': 'image',
'images': 'images',
'stub': 'stub',
'section stub': 'section stub',
'Empty page': 'Empty page',
'kB': 'kB',
'bytes': 'bytes',
'day': 'day',
'days': 'days',
'hour': 'hour',
'hours': 'hours',
'minute': 'minute',
'minutes': 'minutes',
'second': 'second',
'seconds': 'seconds',
'week': 'week',
'weeks': 'weeks',
'search': 'search',
'SearchHint': 'Find English Wikipedia articles containing %s',
'web': 'web',
'global': 'global',
'globalSearchHint': 'Search across Wikipedias in different languages for %s',
'googleSearchHint': 'Google for %s',
/////////////////////////////////////
// article-related actions and info
// (some actions also apply to user pages)
/////////////////////////////////////
'actions': 'actions', ///// view articles and view talk
'popupsMenu': 'popups',
'togglePreviewsHint': 'Toggle preview generation in popups on this page',
'enable previews': 'enable previews',
'disable previews': 'disable previews',
'toggle previews': 'toggle previews',
'show preview': 'show preview',
'reset': 'reset',
'more...': 'more...',
'disable': 'disable popups',
'disablePopupsHint': 'Disable popups on this page. Reload page to re-enable.',
'historyfeedHint': 'RSS feed of recent changes to this page',
'purgePopupsHint': 'Reset popups, clearing all cached popup data.',
'PopupsHint': 'Reset popups, clearing all cached popup data.',
'spacebar': 'space',
'view': 'view',
'view article': 'view article',
'viewHint': 'Go to %s',
'talk': 'talk',
'talk page': 'talk page',
'this revision': 'this revision',
'revision %s of %s': 'revision %s of %s',
'Revision %s of %s': 'Revision %s of %s',
'the revision prior to revision %s of %s': 'the revision prior to revision %s of %s',
'Toggle image size': 'Click to toggle image size',
'del': 'del', ///// delete, protect, move
'delete': 'delete',
'deleteHint': 'Delete %s',
'undeleteShort': 'un',
'UndeleteHint': 'Show the deletion history for %s',
'protect': 'protect',
'protectHint': 'Restrict editing rights to %s',
'unprotectShort': 'un',
'unprotectHint': 'Allow %s to be edited by anyone again',
'move': 'move',
'move page': 'move page',
'MovepageHint': 'Change the title of %s',
'edit': 'edit', ///// edit articles and talk
'edit article': 'edit article',
'editHint': 'Change the content of %s',
'edit talk': 'edit talk',
'new': 'new',
'new topic': 'new topic',
'newSectionHint': 'Start a new section on %s',
'null edit': 'null edit',
'nullEditHint': 'Submit an edit to %s, making no changes ',
'hist': 'hist', ///// history, diffs, editors, related
'history': 'history',
'historyHint': 'List the changes made to %s',
'last': 'last',
'lastEdit': 'lastEdit',
'mark patrolled': 'mark patrolled',
'markpatrolledHint': 'Mark this edit as patrolled',
'show last edit': 'most recent edit',
'Show the last edit': 'Show the effects of the most recent change',
'lastContrib': 'lastContrib',
'last set of edits': 'latest edits',
'lastContribHint': 'Show the net effect of changes made by the last editor',
'cur': 'cur',
'diffCur': 'diffCur',
'Show changes since revision %s': 'Show changes since revision %s',
'%s old': '%s old', // as in 4 weeks old
'oldEdit': 'oldEdit',
'purge': 'purge',
'purgeHint': 'Demand a fresh copy of %s',
'raw': 'source',
'rawHint': 'Download the source of %s',
'render': 'simple',
'renderHint': 'Show a plain HTML version of %s',
'Show the edit made to get revision': 'Show the edit made to get revision',
'sinceMe': 'sinceMe',
'changes since mine': 'diff my edit',
'sinceMeHint': 'Show changes since my last edit',
'Couldn\'t find an edit by %s\nin the last %s edits to\n%s': 'Couldn\'t find an edit by %s\nin the last %s edits to\n%s',
'eds': 'eds',
'editors': 'editors',
'editorListHint': 'List the users who have edited %s',
'related': 'related',
'relatedChanges': 'relatedChanges',
'related changes': 'related changes',
'RecentchangeslinkedHint': 'Show changes in articles related to %s',
'editOld': 'editOld', ///// edit old version, or revert
'rv': 'rv',
'revert': 'revert',
'revertHint': 'Revert to %s',
'defaultpopupRedlinkSummary': 'Removing link to empty page [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupFixDabsSummary': 'Disambiguate [[%s]] to [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupFixRedirsSummary': 'Redirect bypass from [[%s]] to [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupExtendedRevertSummary': 'Revert to revision dated %s by %s, oldid %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupRevertToPreviousSummary': 'Revert to the revision prior to revision %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupRevertSummary': 'Revert to revision %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupQueriedRevertToPreviousSummary': 'Revert to the revision prior to revision $1 dated $2 by $3 using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupQueriedRevertSummary': 'Revert to revision $1 dated $2 by $3 using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupRmDabLinkSummary': 'Remove link to dab page [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'Redirects': 'Redirects', // as in Redirects to ...
' to ': ' to ', // as in Redirects to ...
'Bypass redirect': 'Bypass redirect',
'Fix this redirect': 'Fix this redirect',
'disambig': 'disambig', ///// add or remove dab etc.
'disambigHint': 'Disambiguate this link to [[%s]]',
'Click to disambiguate this link to:': 'Click to disambiguate this link to:',
'remove this link': 'remove this link',
'remove all links to this page from this article': 'remove all links to this page from this article',
'remove all links to this disambig page from this article': 'remove all links to this disambig page from this article',
'mainlink': 'mainlink', ///// links, watch, unwatch
'wikiLink': 'wikiLink',
'wikiLinks': 'wikiLinks',
'links here': 'links here',
'whatLinksHere': 'whatLinksHere',
'what links here': 'what links here',
'WhatlinkshereHint': 'List the pages that are hyperlinked to %s',
'unwatchShort': 'un',
'watchThingy': 'watch', // called watchThingy because {}.watch is a function
'watchHint': 'Add %s to my watchlist',
'unwatchHint': 'Remove %s from my watchlist',
'Only found one editor: %s made %s edits': 'Only found one editor: %s made %s edits',
'%s seems to be the last editor to the page %s': '%s seems to be the last editor to the page %s',
'rss': 'rss',
/////////////////////////////////////
// diff previews
/////////////////////////////////////
'Diff truncated for performance reasons': 'Diff truncated for performance reasons',
'Old revision': 'Old revision',
'New revision': 'New revision',
'Something went wrong :-(': 'Something went wrong :-(',
'Empty revision, maybe non-existent': 'Empty revision, maybe non-existent',
'Unknown date': 'Unknown date',
/////////////////////////////////////
// other special previews
/////////////////////////////////////
'Empty category': 'Empty category',
'Category members (%s shown)': 'Category members (%s shown)',
'No image links found': 'No image links found',
'File links': 'File links',
'No image found': 'No image found',
'Image from Commons': 'Image from Commons',
'Description page': 'Description page',
'Alt text:': 'Alt text:',
'revdel':'Hidden revision',
/////////////////////////////////////
// user-related actions and info
/////////////////////////////////////
'user': 'user', ///// user page, talk, email, space
'user page': 'user page',
'user talk': 'user talk',
'edit user talk': 'edit user talk',
'leave comment': 'leave comment',
'email': 'email',
'email user': 'email user',
'EmailuserHint': 'Send an email to %s',
'space': 'space', // short form for userSpace link
'PrefixIndexHint': 'Show pages in the userspace of %s',
'count': 'count', ///// contributions, log
'edit counter': 'edit counter',
'editCounterLinkHint': 'Count the contributions made by %s',
'contribs': 'contribs',
'contributions': 'contributions',
'deletedContribs': 'deleted contributions',
'DeletedcontributionsHint': 'List deleted edits made by %s',
'ContributionsHint': 'List the contributions made by %s',
'log': 'log',
'user log': 'user log',
'userLogHint': 'Show %s\'s user log',
'arin': 'ARIN lookup', ///// ARIN lookup, block user or IP
'Look up %s in ARIN whois database': 'Look up %s in the ARIN whois database',
'unblockShort': 'un',
'block': 'block',
'block user': 'block user',
'IpblocklistHint': 'Unblock %s',
'BlockipHint': 'Prevent %s from editing',
'block log': 'block log',
'blockLogHint': 'Show the block log for %s',
'protectLogHint': 'Show the protection log for %s',
'pageLogHint': 'Show the page log for %s',
'deleteLogHint': 'Show the deletion log for %s',
'Invalid %s %s': 'The option %s is invalid: %s',
'No backlinks found': 'No backlinks found',
' and more': ' and more',
'undo': 'undo',
'undoHint': 'undo this edit',
'Download preview data': 'Download preview data',
'Invalid or IP user': 'Invalid or IP user',
'Not a registered username': 'Not a registered username',
'BLOCKED': 'BLOCKED',
' edits since: ': ' edits since: ',
/////////////////////////////////////
// Autoediting
/////////////////////////////////////
'Enter a non-empty edit summary or press cancel to abort': 'Enter a non-empty edit summary or press cancel to abort',
'Failed to get revision information, please edit manually.\n\n': 'Failed to get revision information, please edit manually.\n\n',
'The %s button has been automatically clicked. Please wait for the next page to load.': 'The %s button has been automatically clicked. Please wait for the next page to load.',
'Could not find button %s. Please check the settings in your javascript file.': 'Could not find button %s. Please check the settings in your javascript file.',
/////////////////////////////////////
// Popups setup
/////////////////////////////////////
'Open full-size image': 'Open full-size image',
'zxy': 'zxy'
};
function popupString(str) {
if (typeof popupStrings != 'undefined' && popupStrings && popupStrings[str]) { return popupStrings[str]; }
if (pg.string[str]) { return pg.string[str]; }
return str;
}
function tprintf(str,subs) {
if (typeof subs != typeof []) { subs = [subs]; }
return simplePrintf(popupString(str), subs);
}
//</NOLITE>
// ENDFILE: strings.js
////////////////////////////////////////////////////////////////////
// Run things
////////////////////////////////////////////////////////////////////
hookEvent('load', setupPopups);
addOnloadHook(autoEdit);
// Support for MediaWiki's live preview, VisualEditor's saves and Echo's flyout.
( function () {
var once = true;
function dynamicContentHandler( $content ) {
// Try to detect the hook fired on initial page load and disregard
// it, we already hook to onload (possibly to different parts of
// page - it's configurable) and running twice might be bad. Ugly…
if ( $content.attr( 'id' ) == 'mw-content-text' ) {
if ( once ) {
once = false;
return;
}
}
function doIt () {
$content.each( function () {
this.ranSetupTooltipsAlready = false;
setupTooltips( this );
} );
};
if ( !setupPopups.completed ) {
setupPopups( doIt );
} else {
doIt();
}
}
// This hook is also fired after page load.
mw.hook( 'wikipage.content' ).add( dynamicContentHandler );
mw.hook( 'ext.echo.overlay.beforeShowingOverlay' ).add( function($overlay){
dynamicContentHandler( $overlay.find(".mw-echo-state") );
});
} )();
430ab2c83a1ca35b92fcd29e05ff7f590898adef
179
2014-01-15T11:45:25Z
Ptjackyll
0
dr.
javascript
text/javascript
// STARTFILE: main.js
// **********************************************************************
// ** **
// ** changes to this file affect many users. **
// ** please discuss on the talk page before editing **
// ** **
// **********************************************************************
// ** **
// ** if you do edit this file, be sure that your editor recognizes it **
// ** as utf8, or the weird and wonderful characters in the namespaces **
// ** below will be completely broken. You can check with the show **
// ** changes button before submitting the edit. **
// ** test: مدیا מיוחד Мэдыя **
// ** **
// **********************************************************************
//////////////////////////////////////////////////
// Globals
//
// Trying to shove as many of these as possible into the pg (popup globals) object
function pg(){} // dummy to stop errors
window.pg = {
re: {}, // regexps
ns: {}, // namespaces
string: {}, // translatable strings
wiki: {}, // local site info
misc: {}, // YUCK PHOOEY
option: {}, // options, see newOption etc
optionDefault: {}, // default option values
flag: {}, // misc flags
cache: {}, // page and image cache
structures: {}, // navlink structures
timer: {}, // all sorts of timers (too damn many)
counter: {}, // .. and all sorts of counters
current: {}, // state info
endoflist: null
};
window.pop = { // wrap various functions in here
init: {},
util: {},
endoflist: null
};
function popupsReady() {
if (!window.pg) { return false; }
if (!pg.flag) { return false; }
if (!pg.flag.finishedLoading) { return false; }
return true;
}
/// Local Variables: ///
/// mode:c ///
/// End: ///
// ENDFILE: main.js
// STARTFILE: actions.js
function setupTooltips(container, remove, force, popData) {
log('setupTooltips, container='+container+', remove='+remove);
if (!container) {
//<NOLITE>
// the main initial call
if (getValueOf('popupOnEditSelection') && window.doSelectionPopup && document && document.editform && document.editform.wpTextbox1) {
document.editform.wpTextbox1.onmouseup=doSelectionPopup;
}
//</NOLITE>
// article/content is a structure-dependent thing
container = defaultPopupsContainer();
}
if (!remove && !force && container.ranSetupTooltipsAlready) { return; }
container.ranSetupTooltipsAlready = !remove;
var anchors;
anchors=container.getElementsByTagName('A');
setupTooltipsLoop(anchors, 0, 250, 100, remove, popData);
}
function defaultPopupsContainer() {
if (getValueOf('popupOnlyArticleLinks')) {
return document.getElementById('mw_content') ||
document.getElementById('content') ||
document.getElementById('article') || document;
}
return document;
}
function setupTooltipsLoop(anchors,begin,howmany,sleep, remove, popData) {
log(simplePrintf('setupTooltipsLoop(%s,%s,%s,%s,%s)', arguments));
var finish=begin+howmany;
var loopend = min(finish, anchors.length);
var j=loopend - begin;
log ('setupTooltips: anchors.length=' + anchors.length + ', begin=' + begin +
', howmany=' + howmany + ', loopend=' + loopend + ', remove=' + remove);
var doTooltip= remove ? removeTooltip : addTooltip;
// try a faster (?) loop construct
if (j > 0) {
do {
var a=anchors[loopend - j];
if (typeof a==='undefined' || !a || !a.href) {
log('got null anchor at index ' + loopend - j);
continue;
}
doTooltip(a, popData);
} while (--j);
}
if (finish < anchors.length) {
setTimeout(function() {
setupTooltipsLoop(anchors,finish,howmany,sleep,remove,popData);},
sleep);
} else {
if ( !remove && ! getValueOf('popupTocLinks')) { rmTocTooltips(); }
pg.flag.finishedLoading=true;
}
}
// eliminate popups from the TOC
// This also kills any onclick stuff that used to be going on in the toc
function rmTocTooltips() {
var toc=document.getElementById('toc');
if (toc) {
var tocLinks=toc.getElementsByTagName('A');
var tocLen = tocLinks.length;
for (j=0; j<tocLen; ++j) {
removeTooltip(tocLinks[j], true);
}
}
}
function addTooltip(a, popData) {
if ( !isPopupLink(a) ) { return; }
a.onmouseover=mouseOverWikiLink;
a.onmouseout= mouseOutWikiLink;
a.onmousedown = killPopup;
a.hasPopup = true;
a.popData = popData;
}
function removeTooltip(a) {
if ( !a.hasPopup ) { return; }
a.onmouseover = null;
a.onmouseout = null;
if (a.originalTitle) { a.title = a.originalTitle; }
a.hasPopup=false;
}
function removeTitle(a) {
if (!a.originalTitle) {
a.originalTitle=a.title;
}
a.title='';
}
function restoreTitle(a) {
if ( a.title || !a.originalTitle ) { return; }
a.title = a.originalTitle;
}
function registerHooks(np) {
var popupMaxWidth=getValueOf('popupMaxWidth');
if (typeof popupMaxWidth === 'number') {
var setMaxWidth = function () {
np.mainDiv.style.maxWidth = popupMaxWidth + 'px';
np.maxWidth = popupMaxWidth;
try {
// hack for IE
// see http://www.svendtofte.com/code/max_width_in_ie/
// use setExpression as documented here on msdn: http://tinyurl dot com/dqljn
if (np.mainDiv.style.setExpression) {
np.mainDiv.style.setExpression(
'width', 'document.body.clientWidth > ' +
popupMaxWidth + ' ? "' +popupMaxWidth + 'px": "auto"');
}
}
catch (errors) {
errlog( "Running on IE8 are we not?: " + errors );
}
};
np.addHook(setMaxWidth, 'unhide', 'before');
}
//<NOLITE>
if (window.addPopupShortcuts && window.rmPopupShortcuts) {
np.addHook(addPopupShortcuts, 'unhide', 'after');
np.addHook(rmPopupShortcuts, 'hide', 'before');
}
//</NOLITE>
}
function mouseOverWikiLink(evt) {
if (!window.popupsReady || !window.popupsReady()) { return; }
if (!evt && window.event) {evt=window.event;}
return mouseOverWikiLink2(this, evt);
}
function footnoteTarget(a) {
var aTitle=Title.fromAnchor(a);
// We want ".3A" rather than "%3A" or "?" here, so use the anchor property directly
var anch = aTitle.anchor;
if ( ! /^(cite_note-|_note-|endnote)/.test(anch) ) { return false; }
var lTitle=Title.fromURL(location.href);
if ( lTitle.toString(true) !== aTitle.toString(true) ) { return false; }
var el=document.getElementById(anch);
while ( el && typeof el.nodeName === 'string') {
var nt = el.nodeName.toLowerCase();
if ( nt === 'li' ) { return el; }
else if ( nt === 'body' ) { return false; }
else if ( el.parentNode ) { el=el.parentNode; }
else { return false; }
}
return false;
}
function footnotePreview(x, navpop) {
setPopupHTML('<hr>' + x.innerHTML, 'popupPreview', navpop.idNumber, getValueOf('popupSubpopups')
? function() { setupTooltips(document.getElementById('popupPreview' + navpop.idNumber)); }
: null);
}
// var modid=0;
// if(!window.opera) { window.opera={postError: console.log}; }
function modifierKeyHandler(a) {
return function(evt) {
// opera.postError('modifierKeyHandler called' + (++modid));
// opera.postError(''+evt + modid);
// for (var i in evt) {
// opera.postError('' + modid + ' ' + i + ' ' + evt[i]);
// }
// opera.postError(''+evt.ctrlKey + modid);
var mod=getValueOf('popupModifier');
if (!mod) { return true; }
if (!evt && window.event) {evt=window.event;}
// opera.postError('And now....'+modid);
// opera.postError(''+evt+modid);
// opera.postError(''+evt.ctrlKey+modid);
var modPressed = modifierPressed(evt);
var action = getValueOf('popupModifierAction');
// FIXME: probable bug - modifierPressed should be modPressed below?
if ( action === 'disable' && modifierPressed ) { return true; }
if ( action === 'enable' && !modifierPressed ) { return true; }
mouseOverWikiLink2(a, evt);
};
}
function modifierPressed(evt) {
var mod=getValueOf('popupModifier');
if (!mod) { return false; }
if (!evt && window.event) {evt=window.event;}
// opera.postError('And now....'+modid);
// opera.postError(''+evt+modid);
// opera.postError(''+evt.ctrlKey+modid);
return ( evt && mod && evt[mod.toLowerCase() + 'Key'] );
}
function dealWithModifier(a,evt) {
if (!getValueOf('popupModifier')) { return false; }
var action = getValueOf('popupModifierAction');
if ( action == 'enable' && !modifierPressed(evt) ||
action == 'disable' && modifierPressed(evt) ) {
// if the modifier is needed and not pressed, listen for it until
// we mouseout of this link.
restoreTitle(a);
var addHandler='addEventListener';
var rmHandler='removeEventListener';
var on='';
if (!document.addEventListener) {
addHandler='attachEvent';
rmHandler='detachEvent';
on='on';
}
if (!document[addHandler]) { // forget it
return;
}
a.modifierKeyHandler=modifierKeyHandler(a);
switch (action) {
case 'enable':
document[addHandler](on+'keydown', a.modifierKeyHandler, false);
a[addHandler](on+'mouseout', function() {
document[rmHandler](on+'keydown',
a.modifierKeyHandler, false);
}, true);
break;
case 'disable':
document[addHandler](on+'keyup', a.modifierKeyHandler, false);
}
return true;
}
return false;
}
function mouseOverWikiLink2(a, evt) {
if (dealWithModifier(a,evt)) { return; }
if ( getValueOf('removeTitles') ) { removeTitle(a); }
if ( a==pg.current.link && a.navpopup && a.navpopup.isVisible() ) { return; }
pg.current.link=a;
if (getValueOf('simplePopups') && pg.option.popupStructure===null) {
// reset *default value* of popupStructure
setDefault('popupStructure', 'original');
}
var article=(new Title()).fromAnchor(a);
// set global variable (ugh) to hold article (wikipage)
pg.current.article = article;
if (!a.navpopup) {
// FIXME: this doesn't behave well if you mouse out of a popup
// directly into a link with the same href
if (pg.current.linksHash[a.href] && false) {
a.navpopup = pg.current.linksHash[a.href];
}
else {
a.navpopup=newNavpopup(a, article);
pg.current.linksHash[a.href] = a.navpopup;
pg.current.links.push(a);
}
}
if (a.navpopup.pending===null || a.navpopup.pending!==0) {
// either fresh popups or those with unfinshed business are redone from scratch
simplePopupContent(a, article);
}
a.navpopup.showSoonIfStable(a.navpopup.delay);
getValueOf('popupInitialWidth');
clearInterval(pg.timer.checkPopupPosition);
pg.timer.checkPopupPosition=setInterval(checkPopupPosition, 600);
if(getValueOf('simplePopups')) {
if (getValueOf('popupPreviewButton') && !a.simpleNoMore) {
var d=document.createElement('div');
d.className='popupPreviewButtonDiv';
var s=document.createElement('span');
d.appendChild(s);
s.className='popupPreviewButton';
s['on' + getValueOf('popupPreviewButtonEvent')] = function() {
a.simpleNoMore=true;
nonsimplePopupContent(a,article);
};
s.innerHTML=popupString('show preview');
setPopupHTML(d, 'popupPreview', a.navpopup.idNumber);
}
return;
}
if (a.navpopup.pending!==0 ) {
nonsimplePopupContent(a, article);
}
}
// simplePopupContent: the content that is shown even when simplePopups is true
function simplePopupContent(a, article) {
/* FIXME hack */ a.navpopup.hasPopupMenu=false;
a.navpopup.setInnerHTML(popupHTML(a));
fillEmptySpans({navpopup:a.navpopup});
if (getValueOf('popupDraggable'))
{
var dragHandle = getValueOf('popupDragHandle') || null;
if (dragHandle && dragHandle != 'all') {
dragHandle += a.navpopup.idNumber;
}
setTimeout(function(){a.navpopup.makeDraggable(dragHandle);}, 150);
}
//<NOLITE>
if (getValueOf('popupRedlinkRemoval') && a.className=='new') {
setPopupHTML('<br>'+popupRedlinkHTML(article), 'popupRedlink', a.navpopup.idNumber);
}
//</NOLITE>
}
function debugData(navpopup) {
if(getValueOf('popupDebugging') && navpopup.idNumber) {
setPopupHTML('idNumber='+navpopup.idNumber + ', pending=' + navpopup.pending,
'popupError', navpopup.idNumber);
}
}
function newNavpopup(a, article) {
var navpopup = new Navpopup();
navpopup.fuzz=5;
navpopup.delay=getValueOf('popupDelay')*1000;
// increment global counter now
navpopup.idNumber = ++pg.idNumber;
navpopup.parentAnchor = a;
navpopup.parentPopup = (a.popData && a.popData.owner);
navpopup.article = article;
registerHooks(navpopup);
return navpopup;
}
function nonsimplePopupContent(a, article) {
var diff=null, history=null;
var params=parseParams(a.href);
var oldid=(typeof params.oldid=='undefined' ? null : params.oldid);
//<NOLITE>
if(getValueOf('popupPreviewDiffs') && window.loadDiff) {
diff=params.diff;
}
if(getValueOf('popupPreviewHistory')) {
history=(params.action=='history');
}
//</NOLITE>
a.navpopup.pending=0;
var x;
if (x=footnoteTarget(a)) {
footnotePreview(x, a.navpopup);
//<NOLITE>
} else if ( diff || diff === 0 ) {
loadDiff(article, oldid, diff, a.navpopup);
} else if ( history ) {
loadAPIPreview('history', article, a.navpopup);
} else if ( pg.re.contribs.test(a.href) ) {
loadAPIPreview('contribs', article, a.navpopup);
} else if ( pg.re.backlinks.test(a.href) ) {
loadAPIPreview('backlinks', article, a.navpopup);
} else if ( // FIXME should be able to get all preview combinations with options
article.namespaceId()==pg.nsImageId &&
( getValueOf('imagePopupsForImages') || ! anchorContainsImage(a) )
) {
loadAPIPreview('imagepagepreview', article, a.navpopup);
loadImage(article, a.navpopup);
//</NOLITE>
} else {
if (article.namespaceId() == pg.nsCategoryId &&
getValueOf('popupCategoryMembers')) {
loadAPIPreview('category', article, a.navpopup);
} else if ((article.namespaceId() == pg.nsUserId || article.namespaceId() == pg.nsUsertalkId) &&
getValueOf('popupUserInfo')) {
loadAPIPreview('userinfo', article, a.navpopup);
}
startArticlePreview(article, oldid, a.navpopup);
}
}
function pendingNavpopTask(navpop) {
if (navpop && navpop.pending===null) { navpop.pending=0; }
++navpop.pending;
debugData(navpop);
}
function completedNavpopTask(navpop) {
if (navpop && navpop.pending) { --navpop.pending; }
debugData(navpop);
}
function startArticlePreview(article, oldid, navpop) {
navpop.redir=0;
loadPreview(article, oldid, navpop);
}
function loadPreview(article, oldid, navpop) {
pendingNavpopTask(navpop);
if (!navpop.redir) { navpop.originalArticle=article; }
if (!navpop.visible && getValueOf('popupLazyDownloads')) {
var id=(navpop.redir) ? 'DOWNLOAD_PREVIEW_REDIR_HOOK' : 'DOWNLOAD_PREVIEW_HOOK';
navpop.addHook(function() {
getWiki(article, insertPreview, oldid, navpop);
return true; }, 'unhide', 'before', id);
} else {
getWiki(article, insertPreview, oldid, navpop);
}
}
function loadPreviewFromRedir(redirMatch, navpop) {
// redirMatch is a regex match
var target = new Title().fromWikiText(redirMatch[2]);
// overwrite (or add) anchor from original target
// mediawiki does overwrite; eg [[User:Lupin/foo3#Done]]
if ( navpop.article.anchor ) { target.anchor = navpop.article.anchor; }
var trailingRubbish=redirMatch[4];
navpop.redir++;
navpop.redirTarget=target;
//<NOLITE>
if (window.redirLink) {
var warnRedir = redirLink(target, navpop.article);
setPopupHTML(warnRedir, 'popupWarnRedir', navpop.idNumber);
}
//</NOLITE>
navpop.article=target;
fillEmptySpans({redir: true, redirTarget: target, navpopup:navpop});
return loadPreview(target, null, navpop);
}
function insertPreview(download) {
if (!download.owner) { return; }
var redirMatch = pg.re.redirect.exec(download.data);
if (download.owner.redir===0 && redirMatch) {
completedNavpopTask(download.owner);
loadPreviewFromRedir(redirMatch, download.owner);
return;
}
if (download.owner.visible || !getValueOf('popupLazyPreviews')) {
insertPreviewNow(download);
} else {
var id=(download.owner.redir) ? 'PREVIEW_REDIR_HOOK' : 'PREVIEW_HOOK';
download.owner.addHook( function(){insertPreviewNow(download); return true;},
'unhide', 'after', id );
}
}
function insertPreviewNow(download) {
if (!download.owner) { return; }
var wikiText=download.data;
var navpop=download.owner;
completedNavpopTask(navpop);
var art=navpop.redirTarget || navpop.originalArticle;
//<NOLITE>
makeFixDabs(wikiText, navpop);
if (getValueOf('popupSummaryData') && window.getPageInfo) {
var info=getPageInfo(wikiText, download);
setPopupTrailer(getPageInfo(wikiText, download), navpop.idNumber);
}
var imagePage='';
if (art.namespaceId()==pg.nsImageId) { imagePage=art.toString(); }
else { imagePage=getValidImageFromWikiText(wikiText); }
if(imagePage) { loadImage(Title.fromWikiText(imagePage), navpop); }
//</NOLITE>
if (getValueOf('popupPreviews')) { insertArticlePreview(download, art, navpop); }
}
function insertArticlePreview(download, art, navpop) {
if (download && typeof download.data == typeof ''){
if (art.namespaceId()==pg.nsTemplateId && getValueOf('popupPreviewRawTemplates')) {
// FIXME compare/consolidate with diff escaping code for wikitext
var h='<hr><tt>' + download.data.entify().split('\\n').join('<br>\\n') + '</tt>';
setPopupHTML(h, 'popupPreview', navpop.idNumber);
}
else {
var p=prepPreviewmaker(download.data, art, navpop);
p.showPreview();
}
}
}
function prepPreviewmaker(data, article, navpop) {
// deal with tricksy anchors
var d=anchorize(data, article.anchorString());
var urlBase=joinPath([pg.wiki.articlebase, article.urlString()]);
var p=new Previewmaker(d, urlBase, navpop);
return p;
}
// Try to imitate the way mediawiki generates HTML anchors from section titles
function anchorize(d, anch) {
if (!anch) { return d; }
var anchRe=RegExp('(?:=+\\s*' + literalizeRegex(anch).replace(/[_ ]/g, '[_ ]') + '\\s*=+|\\{\\{\\s*'+getValueOf('popupAnchorRegexp')+'\\s*(?:\\|[^|}]*)*?\\s*'+literalizeRegex(anch)+'\\s*(?:\\|[^}]*)?\}\})');
var match=d.match(anchRe);
if(match && match.length > 0 && match[0]) { return d.substring(d.indexOf(match[0])); }
// now try to deal with == foo [[bar|baz]] boom == -> #foo_baz_boom
var lines=d.split('\n');
for (var i=0; i<lines.length; ++i) {
lines[i]=lines[i].replace(RegExp('[[]{2}([^|\\]]*?[|])?(.*?)[\\]]{2}', 'g'), '$2')
.replace(/'''([^'])/g, '$1').replace(RegExp("''([^'])", 'g'), '$1');
if (lines[i].match(anchRe)) {
return d.split('\n').slice(i).join('\n').replace(RegExp('^[^=]*'), '');
}
}
return d;
}
function killPopup() {
if (getValueOf('popupShortcutKeys') && window.rmPopupShortcuts) { rmPopupShortcuts(); }
if (!pg) { return; }
pg.current.link && pg.current.link.navpopup && pg.current.link.navpopup.banish();
pg.current.link=null;
abortAllDownloads();
if (pg.timer.checkPopupPosition !== null) {
clearInterval(pg.timer.checkPopupPosition);
pg.timer.checkPopupPosition=null;
}
return true; // preserve default action
}
// ENDFILE: actions.js
// STARTFILE: domdrag.js
/**
@fileoverview
The {@link Drag} object, which enables objects to be dragged around.
<pre>
*************************************************
dom-drag.js
09.25.2001
www.youngpup.net
**************************************************
10.28.2001 - fixed minor bug where events
sometimes fired off the handle, not the root.
*************************************************
Pared down, some hooks added by [[User:Lupin]]
Copyright Aaron Boodman.
Saying stupid things daily since March 2001.
</pre>
*/
/**
Creates a new Drag object. This is used to make various DOM elements draggable.
@constructor
*/
function Drag () {
/**
Condition to determine whether or not to drag. This function should take one parameter, an Event.
To disable this, set it to <code>null</code>.
@type Function
*/
this.startCondition = null;
/**
Hook to be run when the drag finishes. This is passed the final coordinates of
the dragged object (two integers, x and y). To disables this, set it to <code>null</code>.
@type Function
*/
this.endHook = null;
}
/**
Gets an event in a cross-browser manner.
@param {Event} e
@private
*/
Drag.prototype.fixE = function(e) {
if (typeof e == 'undefined') { e = window.event; }
if (typeof e.layerX == 'undefined') { e.layerX = e.offsetX; }
if (typeof e.layerY == 'undefined') { e.layerY = e.offsetY; }
return e;
};
/**
Initialises the Drag instance by telling it which object you want to be draggable, and what you want to drag it by.
@param {DOMElement} o The "handle" by which <code>oRoot</code> is dragged.
@param {DOMElement} oRoot The object which moves when <code>o</code> is dragged, or <code>o</code> if omitted.
*/
Drag.prototype.init = function(o, oRoot) {
var dragObj = this;
this.obj = o;
o.onmousedown = function(e) { dragObj.start.apply( dragObj, [e]); };
o.dragging = false;
o.popups_draggable = true;
o.hmode = true;
o.vmode = true;
o.root = oRoot && oRoot !== null ? oRoot : o ;
if (isNaN(parseInt(o.root.style.left, 10))) { o.root.style.left = "0px"; }
if (isNaN(parseInt(o.root.style.top, 10))) { o.root.style.top = "0px"; }
o.root.onthisStart = function(){};
o.root.onthisEnd = function(){};
o.root.onthis = function(){};
};
/**
Starts the drag.
@private
@param {Event} e
*/
Drag.prototype.start = function(e) {
var o = this.obj; // = this;
e = this.fixE(e);
if (this.startCondition && !this.startCondition(e)) { return; }
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom, 10);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right, 10);
o.root.onthisStart(x, y);
o.lastMouseX = e.clientX;
o.lastMouseY = e.clientY;
var dragObj = this;
o.onmousemoveDefault = document.onmousemove;
o.dragging = true;
document.onmousemove = function(e) { dragObj.drag.apply( dragObj, [e] ); };
document.onmouseup = function(e) { dragObj.end.apply( dragObj, [e] ); };
return false;
};
/**
Does the drag.
@param {Event} e
@private
*/
Drag.prototype.drag = function(e) {
e = this.fixE(e);
var o = this.obj;
var ey = e.clientY;
var ex = e.clientX;
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom, 10);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right, 10 );
var nx, ny;
nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
this.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
this.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
this.obj.lastMouseX = ex;
this.obj.lastMouseY = ey;
this.obj.root.onthis(nx, ny);
return false;
};
/**
Ends the drag.
@private
*/
Drag.prototype.end = function() {
document.onmousemove=this.obj.onmousemoveDefault;
document.onmouseup = null;
this.obj.dragging = false;
if (this.endHook) {
this.endHook( parseInt(this.obj.root.style[this.obj.hmode ? "left" : "right"], 10),
parseInt(this.obj.root.style[this.obj.vmode ? "top" : "bottom"], 10));
}
};
// ENDFILE: domdrag.js
// STARTFILE: structures.js
//<NOLITE>
pg.structures.original={};
pg.structures.original.popupLayout=function () {
return ['popupError', 'popupImage', 'popupTopLinks', 'popupTitle',
'popupData', 'popupOtherLinks',
'popupRedir', ['popupWarnRedir', 'popupRedirTopLinks',
'popupRedirTitle', 'popupRedirData', 'popupRedirOtherLinks'],
'popupMiscTools', ['popupRedlink'],
'popupPrePreviewSep', 'popupPreview', 'popupSecondPreview', 'popupPreviewMore', 'popupPostPreview', 'popupFixDab'];
};
pg.structures.original.popupRedirSpans=function () {
return ['popupRedir', 'popupWarnRedir', 'popupRedirTopLinks',
'popupRedirTitle', 'popupRedirData', 'popupRedirOtherLinks'];
};
pg.structures.original.popupTitle=function (x) {
log ('defaultstructure.popupTitle');
if (!getValueOf('popupNavLinks')) {
return navlinkStringToHTML('<b><<mainlink>></b>',x.article,x.params);
}
return '';
};
pg.structures.original.popupTopLinks=function (x) {
log ('defaultstructure.popupTopLinks');
if (getValueOf('popupNavLinks')) { return navLinksHTML(x.article, x.hint, x.params); }
return '';
};
pg.structures.original.popupImage=function(x) {
log ('original.popupImage, x.article='+x.article+', x.navpop.idNumber='+x.navpop.idNumber);
return imageHTML(x.article, x.navpop.idNumber);
};
pg.structures.original.popupRedirTitle=pg.structures.original.popupTitle;
pg.structures.original.popupRedirTopLinks=pg.structures.original.popupTopLinks;
function copyStructure(oldStructure, newStructure) {
pg.structures[newStructure]={};
for (var prop in pg.structures[oldStructure]) {
pg.structures[newStructure][prop]=pg.structures[oldStructure][prop];
}
}
copyStructure('original', 'nostalgia');
pg.structures.nostalgia.popupTopLinks=function(x) {
var str='';
str += '<b><<mainlink|shortcut= >></b>';
// user links
// contribs - log - count - email - block
// count only if applicable; block only if popupAdminLinks
str += 'if(user){<br><<contribs|shortcut=c>>';
str+='if(wikimedia){*<<count|shortcut=#>>}';
str+='if(ipuser){}else{*<<email|shortcut=E>>}if(admin){*<<block|shortcut=b>>}}';
// editing links
// talkpage -> edit|new - history - un|watch - article|edit
// other page -> edit - history - un|watch - talk|edit|new
var editstr='<<edit|shortcut=e>>';
var editOldidStr='if(oldid){<<editOld|shortcut=e>>|<<revert|shortcut=v|rv>>|<<edit|cur>>}else{'
+ editstr + '}';
var historystr='<<history|shortcut=h>>';
var watchstr='<<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>>';
str+='<br>if(talk){' +
editOldidStr+'|<<new|shortcut=+>>' + '*' + historystr+'*'+watchstr + '*' +
'<b><<article|shortcut=a>></b>|<<editArticle|edit>>' +
'}else{' + // not a talk page
editOldidStr + '*' + historystr + '*' + watchstr + '*' +
'<b><<talk|shortcut=t>></b>|<<editTalk|edit>>|<<newTalk|shortcut=+|new>>'
+ '}';
// misc links
str += '<br><<whatLinksHere|shortcut=l>>*<<relatedChanges|shortcut=r>>';
str += 'if(admin){<br>}else{*}<<move|shortcut=m>>';
// admin links
str += 'if(admin){*<<unprotect|unprotectShort>>|<<protect|shortcut=p>>*' +
'<<undelete|undeleteShort>>|<<delete|shortcut=d>>}';
return navlinkStringToHTML(str, x.article, x.params);
};
pg.structures.nostalgia.popupRedirTopLinks=pg.structures.nostalgia.popupTopLinks;
/** -- fancy -- **/
copyStructure('original', 'fancy');
pg.structures.fancy.popupTitle=function (x) {
return navlinkStringToHTML('<font size=+0><<mainlink>></font>',x.article,x.params);
};
pg.structures.fancy.popupTopLinks=function(x) {
var hist='<<history|shortcut=h|hist>>|<<lastEdit|shortcut=/|last>>if(mainspace_en){|<<editors|shortcut=E|eds>>}';
var watch='<<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>>';
var move='<<move|shortcut=m|move>>';
return navlinkStringToHTML('if(talk){' +
'<<edit|shortcut=e>>|<<new|shortcut=+|+>>*' + hist + '*' +
'<<article|shortcut=a>>|<<editArticle|edit>>' + '*' + watch + '*' + move +
'}else{<<edit|shortcut=e>>*' + hist +
'*<<talk|shortcut=t|>>|<<editTalk|edit>>|<<newTalk|shortcut=+|new>>' +
'*' + watch + '*' + move+'}<br>', x.article, x.params);
};
pg.structures.fancy.popupOtherLinks=function(x) {
var admin='<<unprotect|unprotectShort>>|<<protect|shortcut=p>>*<<undelete|undeleteShort>>|<<delete|shortcut=d|del>>';
var user='<<contribs|shortcut=c>>if(wikimedia){|<<count|shortcut=#|#>>}';
user+='if(ipuser){|<<arin>>}else{*<<email|shortcut=E|'+
popupString('email')+'>>}if(admin){*<<block|shortcut=b>>}';
var normal='<<whatLinksHere|shortcut=l|links here>>*<<relatedChanges|shortcut=r|related>>';
return navlinkStringToHTML('<br>if(user){' + user + '*}if(admin){'+admin+'if(user){<br>}else{*}}' + normal,
x.article, x.params);
};
pg.structures.fancy.popupRedirTitle=pg.structures.fancy.popupTitle;
pg.structures.fancy.popupRedirTopLinks=pg.structures.fancy.popupTopLinks;
pg.structures.fancy.popupRedirOtherLinks=pg.structures.fancy.popupOtherLinks;
/** -- fancy2 -- **/
// hack for [[User:MacGyverMagic]]
copyStructure('fancy', 'fancy2');
pg.structures.fancy2.popupTopLinks=function(x) { // hack out the <br> at the end and put one at the beginning
return '<br>'+pg.structures.fancy.popupTopLinks(x).replace(RegExp('<br>$','i'),'');
};
pg.structures.fancy2.popupLayout=function () { // move toplinks to after the title
return ['popupError', 'popupImage', 'popupTitle', 'popupData', 'popupTopLinks', 'popupOtherLinks',
'popupRedir', ['popupWarnRedir', 'popupRedirTopLinks', 'popupRedirTitle', 'popupRedirData', 'popupRedirOtherLinks'],
'popupMiscTools', ['popupRedlink'],
'popupPrePreviewSep', 'popupPreview', 'popupSecondPreview', 'popupPreviewMore', 'popupPostPreview', 'popupFixDab'];
};
/** -- menus -- **/
copyStructure('original', 'menus');
pg.structures.menus.popupLayout=function () {
return ['popupError', 'popupImage', 'popupTopLinks', 'popupTitle', 'popupOtherLinks',
'popupRedir', ['popupWarnRedir', 'popupRedirTopLinks', 'popupRedirTitle', 'popupRedirData', 'popupRedirOtherLinks'],
'popupData', 'popupMiscTools', ['popupRedlink'],
'popupPrePreviewSep', 'popupPreview', 'popupSecondPreview', 'popupPreviewMore', 'popupPostPreview', 'popupFixDab'];
};
function toggleSticky(uid) {
var popDiv=document.getElementById('navpopup_maindiv'+uid);
if (!popDiv) { return; }
if (!popDiv.navpopup.sticky) { popDiv.navpopup.stick(); }
else {
popDiv.navpopup.unstick();
popDiv.navpopup.hide();
}
}
pg.structures.menus.popupTopLinks = function (x, shorter) {
// FIXME maybe this stuff should be cached
var s=[];
var dropdiv='<div class="popup_drop">';
var enddiv='</div>';
var endspan='</span>';
var hist='<<history|shortcut=h>>';
if (!shorter) { hist = '<menurow>' + hist +
'|<<historyfeed|rss>>if(mainspace_en){|<<editors|shortcut=E>>}</menurow>'; }
var lastedit='<<lastEdit|shortcut=/|show last edit>>';
var jsHistory='<<lastContrib|last set of edits>><<sinceMe|changes since mine>>';
var linkshere='<<whatLinksHere|shortcut=l|what links here>>';
var related='<<relatedChanges|shortcut=r|related changes>>';
var search='<menurow><<search|shortcut=s>>if(wikimedia){|<<globalsearch|shortcut=g|global>>}' +
'|<<google|shortcut=G|web>></menurow>';
var watch='<menurow><<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>></menurow>';
var protect='<menurow><<unprotect|unprotectShort>>|' +
'<<protect|shortcut=p>>|<<protectlog|log>></menurow>';
var del='<menurow><<undelete|undeleteShort>>|<<delete|shortcut=d>>|' +
'<<deletelog|log>></menurow>';
var move='<<move|shortcut=m|move page>>';
var nullPurge='<menurow><<nullEdit|shortcut=n|null edit>>|<<purge|shortcut=P>></menurow>';
var viewOptions='<menurow><<view|shortcut=v>>|<<render|shortcut=S>>|<<raw>></menurow>';
var editRow='if(oldid){' +
'<menurow><<edit|shortcut=e>>|<<editOld|shortcut=e|this revision>></menurow>' +
'<menurow><<revert|shortcut=v>>|<<undo>></menurow>' + '}else{<<edit|shortcut=e>>}';
var markPatrolled='if(rcid){<<markpatrolled|mark patrolled>>}';
var newTopic='if(talk){<<new|shortcut=+|new topic>>}';
var protectDelete='if(admin){' + protect + del + '}';
if (getValueOf('popupActionsMenu')) {
s.push( '<<mainlink>>*' + dropdiv + menuTitle('actions'));
} else {
s.push( dropdiv + '<<mainlink>>');
}
s.push( '<menu>');
s.push( editRow + markPatrolled + newTopic + hist + lastedit );
if (!shorter) { s.push(jsHistory); }
s.push( move + linkshere + related);
if (!shorter) { s.push(nullPurge + search); }
if (!shorter) { s.push(viewOptions); }
s.push('<hr>' + watch + protectDelete);
s.push('<hr>' +
'if(talk){<<article|shortcut=a|view article>><<editArticle|edit article>>}' +
'else{<<talk|shortcut=t|talk page>><<editTalk|edit talk>>' +
'<<newTalk|shortcut=+|new topic>>}</menu>' + enddiv);
// user menu starts here
var email='<<email|shortcut=E|email user>>';
var contribs= 'if(wikimedia){<menurow>}<<contribs|shortcut=c|contributions>>if(wikimedia){</menurow>}' +
'if(admin){<menurow><<deletedContribs>></menurow>}';
s.push('if(user){*' + dropdiv + menuTitle('user'));
s.push('<menu>'); +
s.push('<menurow><<userPage|shortcut=u|user page>>|<<userSpace|space>></menurow>');
s.push('<<userTalk|shortcut=t|user talk>><<editUserTalk|edit user talk>>' +
'<<newUserTalk|shortcut=+|leave comment>>');
if(!shorter) { s.push( 'if(ipuser){<<arin>>}else{' + email + '}' ); }
else { s.push( 'if(ipuser){}else{' + email + '}' ); }
s.push('<hr>' + contribs + '<<userlog|shortcut=L|user log>>');
s.push('if(wikimedia){<<count|shortcut=#|edit counter>>}');
s.push('if(admin){<menurow><<unblock|unblockShort>>|<<block|shortcut=b|block user>></menurow>}');
s.push('<<blocklog|shortcut=B|block log>>' + getValueOf('popupExtraUserMenu'));
s.push('</menu>' + enddiv + '}');
// popups menu starts here
if (getValueOf('popupSetupMenu') && !x.navpop.hasPopupMenu /* FIXME: hack */) {
x.navpop.hasPopupMenu=true;
s.push('*' + dropdiv + menuTitle('popupsMenu') + '<menu>');
s.push('<<togglePreviews|toggle previews>>');
s.push('<<purgePopups|reset>>');
s.push('<<disablePopups|disable>>');
s.push('</menu>'+enddiv);
}
return navlinkStringToHTML(s.join(''), x.article, x.params);
};
function menuTitle(s) {
return '<a href="#" noPopup=1>' + popupString(s) + '</a>';
}
pg.structures.menus.popupRedirTitle=pg.structures.menus.popupTitle;
pg.structures.menus.popupRedirTopLinks=pg.structures.menus.popupTopLinks;
copyStructure('menus', 'shortmenus');
pg.structures.shortmenus.popupTopLinks=function(x) {
return pg.structures.menus.popupTopLinks(x,true);
};
pg.structures.shortmenus.popupRedirTopLinks=pg.structures.shortmenus.popupTopLinks;
copyStructure('shortmenus', 'dabshortmenus');
pg.structures.dabshortmenus.popupLayout=function () {
return ['popupError', 'popupImage', 'popupTopLinks', 'popupTitle', 'popupOtherLinks',
'popupRedir', ['popupWarnRedir', 'popupRedirTopLinks', 'popupRedirTitle', 'popupRedirData', 'popupRedirOtherLinks'],
'popupData', 'popupMiscTools', ['popupRedlink'], 'popupFixDab',
'popupPrePreviewSep', 'popupPreview', 'popupSecondPreview', 'popupPreviewMore', 'popupPostPreview'];
};
copyStructure('menus', 'dabmenus');
pg.structures.dabmenus.popupLayout=pg.structures.dabshortmenus.popupLayout;
//</NOLITE>
pg.structures.lite={};
pg.structures.lite.popupLayout=function () {
return ['popupTitle', 'popupPreview' ];
};
pg.structures.lite.popupTitle=function (x) {
log (x.article + ': structures.lite.popupTitle');
//return navlinkStringToHTML('<b><<mainlink>></b>',x.article,x.params);
return '<div><span class="popup_mainlink"><b>' + x.article.toString() + '</b></span></div>';
};
// ENDFILE: structures.js
// STARTFILE: autoedit.js
//<NOLITE>
function getParamValue(paramName, h) {
if (typeof h == 'undefined' ) { h = document.location.href; }
var cmdRe=RegExp('[&?]'+paramName+'=([^&]*)');
var m=cmdRe.exec(h);
if (m) {
try {
return decodeURIComponent(m[1]);
} catch (someError) {}
}
return null;
}
function substitute(data,cmdBody) {
// alert('sub\nfrom: '+cmdBody.from+'\nto: '+cmdBody.to+'\nflags: '+cmdBody.flags);
var fromRe=RegExp(cmdBody.from, cmdBody.flags);
return data.replace(fromRe, cmdBody.to);
}
function execCmds(data, cmdList) {
for (var i=0; i<cmdList.length; ++i) {
data=cmdList[i].action(data, cmdList[i]);
}
return data;
}
function parseCmd(str) {
// returns a list of commands
if (!str.length) { return []; }
var p=false;
switch (str.charAt(0)) {
case 's':
p=parseSubstitute(str);
break;
default:
return false;
}
if (p) { return [p].concat(parseCmd(p.remainder)); }
return false;
}
function unEscape(str, sep) {
return str.split('\\\\').join('\\').split('\\'+sep).join(sep).split('\\n').join('\n');
}
function parseSubstitute(str) {
// takes a string like s/a/b/flags;othercmds and parses it
var from,to,flags,tmp;
if (str.length<4) { return false; }
var sep=str.charAt(1);
str=str.substring(2);
tmp=skipOver(str,sep);
if (tmp) { from=tmp.segment; str=tmp.remainder; }
else { return false; }
tmp=skipOver(str,sep);
if (tmp) { to=tmp.segment; str=tmp.remainder; }
else { return false; }
flags='';
if (str.length) {
tmp=skipOver(str,';') || skipToEnd(str, ';');
if (tmp) {flags=tmp.segment; str=tmp.remainder; }
}
return {action: substitute, from: from, to: to, flags: flags, remainder: str};
}
function skipOver(str,sep) {
var endSegment=findNext(str,sep);
if (endSegment<0) { return false; }
var segment=unEscape(str.substring(0,endSegment), sep);
return {segment: segment, remainder: str.substring(endSegment+1)};
}
function skipToEnd(str,sep) {
return {segment: str, remainder: ''};
}
function findNext(str, ch) {
for (var i=0; i<str.length; ++i) {
if (str.charAt(i)=='\\') { i+=2; }
if (str.charAt(i)==ch) { return i; }
}
return -1;
}
function setCheckbox(param, box) {
var val=getParamValue(param);
if (val!==null) {
switch (val) {
case '1': case 'yes': case 'true':
box.checked=true;
break;
case '0': case 'no': case 'false':
box.checked=false;
}
}
}
function autoEdit() {
if (!setupPopups.completed) { setupPopups(); }
if (!window.wgEnableAPI || !wgEnableAPI ) { return false; }
if (getParamValue('autowatchlist') && getParamValue('actoken')===autoClickToken()) {
modifyWatchlist(getParamValue('title'), getParamValue('action'));
}
if (!document.editform) { return false; }
if (window.autoEdit.alreadyRan) { return false; }
window.autoEdit.alreadyRan=true;
var cmdString=getParamValue('autoedit');
if (cmdString) {
try {
var editbox=document.editform.wpTextbox1;
} catch (dang) { return; }
var cmdList=parseCmd(cmdString);
var input=editbox.value;
var output=execCmds(input, cmdList);
editbox.value=output;
// wikEd user script compatibility
if (typeof(wikEdUseWikEd) != 'undefined') {
if (wikEdUseWikEd === true) {
WikEdUpdateFrame();
}
}
}
setCheckbox('autominor', document.editform.wpMinoredit);
setCheckbox('autowatch', document.editform.wpWatchthis);
var rvid = getParamValue('autorv');
if (rvid) {
var url=pg.wiki.apiwikibase + '?action=query&format=json&prop=revisions&revids='+rvid;
startDownload(url, null, autoEdit2);
} else { autoEdit2(); }
}
function autoEdit2(d) {
var summary=getParamValue('autosummary');
var summaryprompt=getParamValue('autosummaryprompt');
var summarynotice='';
if (d && d.data && getParamValue('autorv')) {
var s = getRvSummary(summary, d.data);
if (s===false) {
summaryprompt=true;
summarynotice=popupString('Failed to get revision information, please edit manually.\n\n');
summary = simplePrintf(summary, [getParamValue('autorv'), '(unknown)', '(unknown)']);
} else { summary = s; }
}
if (summaryprompt) {
var txt= summarynotice +
popupString('Enter a non-empty edit summary or press cancel to abort');
var response=prompt(txt, summary);
if (response) { summary=response; }
else { return; }
}
if (summary) { document.editform.wpSummary.value=summary; }
// Attempt to avoid possible premature clicking of the save button
// (maybe delays in updates to the DOM are to blame?? or a red herring)
setTimeout(autoEdit3, 100);
}
function autoClickToken() {
return mw.user.sessionId();
}
function autoEdit3() {
if( getParamValue('actoken') != autoClickToken()) { return; }
var btn=getParamValue('autoclick');
if (btn) {
if (document.editform && document.editform[btn]) {
var button=document.editform[btn];
var msg=tprintf('The %s button has been automatically clicked. Please wait for the next page to load.',
[ button.value ]);
bannerMessage(msg);
document.title='('+document.title+')';
button.click();
} else {
alert(tprintf('Could not find button %s. Please check the settings in your javascript file.',
[ btn ]));
}
}
}
function bannerMessage(s) {
var headings=document.getElementsByTagName('h1');
if (headings) {
var div=document.createElement('div');
div.innerHTML='<font size=+1><b>' + s + '</b></font>';
headings[0].parentNode.insertBefore(div, headings[0]);
}
}
function getRvSummary(template, json) {
try {
var o=getJsObj(json);
var edit = anyChild(o.query.pages).revisions[0];
} catch (badness) {return false;}
var timestamp = edit.timestamp.split(/[A-Z]/g).join(' ').replace(/^ *| *$/g, '');
return simplePrintf(template, [edit.revid, timestamp, edit.user]);
}
//</NOLITE>
// ENDFILE: autoedit.js
// STARTFILE: downloader.js
/**
@fileoverview
{@link Downloader}, a xmlhttprequest wrapper, and helper functions.
*/
/**
Creates a new Downloader
@constructor
@class The Downloader class. Create a new instance of this class to download stuff.
@param {String} url The url to download. This can be omitted and supplied later.
*/
function Downloader(url) {
// Source: http://jibbering.com/2002/4/httprequest.html
/** xmlhttprequest object which we're wrapping */
this.http = false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation,
// we can cope with old IE versions.
// and security blocked creation of the objects.
try {
this.http = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
this.http = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
// this.http = false;
}
}
@end @*/
if (! this.http && typeof XMLHttpRequest!='undefined') { this.http = new XMLHttpRequest(); }
/**
The url to download
@type String
*/
this.url = url;
/**
A universally unique ID number
@type integer
*/
this.id=null;
/**
Modification date, to be culled from the incoming headers
@type Date
@private
*/
this.lastModified = null;
/**
What to do when the download completes successfully
@type Function
@private
*/
this.callbackFunction = null;
/**
What to do on failure
@type Function
@private
*/
this.onFailure = null;
/**
Flag set on <code>abort</code>
@type boolean
*/
this.aborted = false;
/**
HTTP method. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html for possibilities.
@type String
*/
this.method='GET';
/**
Async flag.
@type boolean
*/
this.async=true;
}
new Downloader();
/** Submits the http request. */
Downloader.prototype.send = function (x) {
if (!this.http) { return null; }
return this.http.send(x);
};
/** Aborts the download, setting the <code>aborted</code> field to true. */
Downloader.prototype.abort = function () {
if (!this.http) { return null; }
this.aborted=true;
return this.http.abort();
};
/** Returns the downloaded data. */
Downloader.prototype.getData = function () {if (!this.http) { return null; } return this.http.responseText;};
/** Prepares the download. */
Downloader.prototype.setTarget = function () {
if (!this.http) { return null; }
this.http.open(this.method, this.url, this.async);
};
/** Gets the state of the download. */
Downloader.prototype.getReadyState=function () {if (!this.http) { return null; } return this.http.readyState;};
pg.misc.downloadsInProgress = { };
/** Starts the download.
Note that setTarget {@link Downloader#setTarget} must be run first
*/
Downloader.prototype.start=function () {
if (!this.http) { return; }
pg.misc.downloadsInProgress[this.id] = this;
this.http.send(null);
};
/** Gets the 'Last-Modified' date from the download headers.
Should be run after the download completes.
Returns <code>null</code> on failure.
@return {Date}
*/
Downloader.prototype.getLastModifiedDate=function () {
if(!this.http) { return null; }
var lastmod=null;
try {
lastmod=this.http.getResponseHeader('Last-Modified');
} catch (err) {}
if (lastmod) { return new Date(lastmod); }
return null;
};
/** Sets the callback function.
@param {Function} f callback function, called as <code>f(this)</code> on success
*/
Downloader.prototype.setCallback = function (f) {
if(!this.http) { return; }
this.http.onreadystatechange = f;
};
Downloader.prototype.getStatus = function() { if (!this.http) { return null; } return this.http.status; };
//////////////////////////////////////////////////
// helper functions
/** Creates a new {@link Downloader} and prepares it for action.
@param {String} url The url to download
@param {integer} id The ID of the {@link Downloader} object
@param {Function} callback The callback function invoked on success
@return {String/Downloader} the {@link Downloader} object created, or 'ohdear' if an unsupported browser
*/
function newDownload(url, id, callback, onfailure) {
var d=new Downloader(url);
if (!d.http) { return 'ohdear'; }
d.id=id;
d.setTarget();
if (!onfailure) {
onfailure=2;
}
var f = function () {
if (d.getReadyState() == 4) {
delete pg.misc.downloadsInProgress[this.id];
try {
if ( d.getStatus() == 200 ) {
d.data=d.getData();
d.lastModified=d.getLastModifiedDate();
callback(d);
} else if (typeof onfailure == typeof 1) {
if (onfailure > 0) {
// retry
newDownload(url, id, callback, onfailure - 1);
}
} else if (typeof onfailure == 'function') {
onfailure(d,url,id,callback);
}
} catch (somerr) { /* ignore it */ }
}
};
d.setCallback(f);
return d;
}
/** Simulates a download from cached data.
The supplied data is put into a {@link Downloader} as if it had downloaded it.
@param {String} url The url.
@param {integer} id The ID.
@param {Function} callback The callback, which is invoked immediately as <code>callback(d)</code>,
where <code>d</code> is the new {@link Downloader}.
@param {String} data The (cached) data.
@param {Date} lastModified The (cached) last modified date.
*/
function fakeDownload(url, id, callback, data, lastModified, owner) {
var d=newDownload(url,callback);
d.owner=owner;
d.id=id; d.data=data;
d.lastModified=lastModified;
return callback(d);
}
/**
Starts a download.
@param {String} url The url to download
@param {integer} id The ID of the {@link Downloader} object
@param {Function} callback The callback function invoked on success
@return {String/Downloader} the {@link Downloader} object created, or 'ohdear' if an unsupported browser
*/
function startDownload(url, id, callback) {
var d=newDownload(url, id, callback);
if (typeof d == typeof '' ) { return d; }
d.start();
return d;
}
/**
Aborts all downloads which have been started.
*/
function abortAllDownloads() {
for ( var x in pg.misc.downloadsInProgress ) {
try {
pg.misc.downloadsInProgress[x].aborted=true;
pg.misc.downloadsInProgress[x].abort();
delete pg.misc.downloadsInProgress[x];
} catch (e) { }
}
}
// ENDFILE: downloader.js
// STARTFILE: livepreview.js
// TODO: location is often not correct (eg relative links in previews)
/**
* InstaView - a Mediawiki to HTML converter in JavaScript
* Version 0.6.1
* Copyright (C) Pedro Fayolle 2005-2006
* http://en.wikipedia.org/wiki/User:Pilaf
* Distributed under the BSD license
*
* Changelog:
*
* 0.6.1
* - Fixed problem caused by \r characters
* - Improved inline formatting parser
*
* 0.6
* - Changed name to InstaView
* - Some major code reorganizations and factored out some common functions
* - Handled conversion of relative links (i.e. [[/foo]])
* - Fixed misrendering of adjacent definition list items
* - Fixed bug in table headings handling
* - Changed date format in signatures to reflect Mediawiki's
* - Fixed handling of [[:Image:...]]
* - Updated MD5 function (hopefully it will work with UTF-8)
* - Fixed bug in handling of links inside images
*
* To do:
* - Better support for <math>
* - Full support for <nowiki>
* - Parser-based (as opposed to RegExp-based) inline wikicode handling (make it one-pass and bullet-proof)
* - Support for templates (through AJAX)
* - Support for coloured links (AJAX)
*/
var Insta = {};
function setupLivePreview() {
// options
Insta.conf =
{
baseUrl: '',
user: {},
wiki: {
lang: pg.wiki.lang,
interwiki: pg.wiki.interwiki,
default_thumb_width: 180
},
paths: {
articles: pg.wiki.articlePath + '/',
// Only used for Insta previews with images. (not in popups)
math: '/math/',
images: '//upload.wikimedia.org/wikipedia/en/', // FIXME ( window.getImageUrlStart ? getImageUrlStart(pg.wiki.hostname) : ''),
images_fallback: '//upload.wikimedia.org/wikipedia/commons/',
magnify_icon: 'skins/common/images/magnify-clip.png'
},
locale: {
user: mw.config.get('wgFormattedNamespaces')[pg.nsUserId],
image: mw.config.get('wgFormattedNamespaces')[pg.nsImageId],
category: mw.config.get('wgFormattedNamespaces')[pg.nsCategoryId],
// shouldn't be used in popup previews, i think
months: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
}
};
// options with default values or backreferences
with (Insta.conf) {
user.name = user.name || 'Wikipedian';
user.signature = '[['+locale.user+':'+user.name+'|'+user.name+']]';
//paths.images = '//upload.wikimedia.org/wikipedia/' + wiki.lang + '/';
}
// define constants
Insta.BLOCK_IMAGE = new RegExp('^\\[\\[(?:File|Image|'+Insta.conf.locale.image+
'):.*?\\|.*?(?:frame|thumbnail|thumb|none|right|left|center)', 'i');
}
Insta.dump = function(from, to)
{
if (typeof from == 'string') { from = document.getElementById(from); }
if (typeof to == 'string') { to = document.getElementById(to); }
to.innerHTML = this.convert(from.value);
};
Insta.convert = function(wiki)
{
var ll = (typeof wiki == 'string')? wiki.replace(/\r/g,'').split(/\n/): wiki, // lines of wikicode
o = '', // output
p = 0, // para flag
$r; // result of passing a regexp to $()
// some shorthands
function remain() { return ll.length; }
function sh() { return ll.shift(); } // shift
function ps(s) { o += s; } // push
// similar to C's printf, uses ? as placeholders, ?? to escape question marks
function f()
{
var i=1, a=arguments, f=a[0], o='', c, p;
for (; i<a.length; i++) {
if ((p=f.indexOf('?'))+1) {
// allow character escaping
i -= c = f.charAt(p+1)=='?' ? 1 : 0;
o += f.substring(0,p) + (c ? '?' : a[i]);
f = f.substr(p+1+c);
} else { break; }
}
return o+f;
}
function html_entities(s) {
return s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
}
// Wiki text parsing to html is a nightmare.
// The below functions deliberately don't escape the ampersand since this would make it more difficult,
// and we don't absolutely need to for how we need it.
// This means that any unescaped ampersands in wikitext will remain unescaped and can cause invalid HTML.
// Browsers should all be able to handle it though.
// We also escape significant wikimarkup characters to prevent further matching on the processed text
function htmlescape_text(s) {
return s.replace(/</g,"<").replace(/>/g,">").replace(/:/g,":").replace(/\[/g,"[").replace(/]/g,"]");
}
function htmlescape_attr(s) {
return htmlescape_text(s).replace(/'/g,"'").replace(/"/g,""");
}
function max(a,b) { return (a>b)?a:b; }
function min(a,b) { return (a<b)?a:b; }
// return the first non matching character position between two strings
function str_imatch(a, b)
{
for (var i=0, l=min(a.length, b.length); i<l; i++) {
if (a.charAt(i)!=b.charAt(i)) { break; }
}
return i;
}
// compare current line against a string or regexp
// if passed a string it will compare only the first string.length characters
// if passed a regexp the result is stored in $r
function $(c) { return (typeof c == 'string') ? (ll[0].substr(0,c.length)==c) : ($r = ll[0].match(c)); }
function $$(c) { return ll[0]==c; } // compare current line against a string
function _(p) { return ll[0].charAt(p); } // return char at pos p
function endl(s) { ps(s); sh(); }
function parse_list()
{
var prev='';
while (remain() && $(/^([*#:;]+)(.*)$/)) {
var l_match = $r;
sh();
var ipos = str_imatch(prev, l_match[1]);
// close uncontinued lists
for (var i=prev.length-1; i >= ipos; i--) {
var pi = prev.charAt(i);
if (pi=='*') { ps('</ul>'); }
else if (pi=='#') { ps('</ol>'); }
// close a dl only if the new item is not a dl item (:, ; or empty)
else switch (l_match[1].charAt(i)) { case'':case'*':case'#': ps('</dl>') }
}
// open new lists
for (var i=ipos; i<l_match[1].length; i++) {
var li = l_match[1].charAt(i);
if (li=='*') { ps('<ul>'); }
else if (li=='#') { ps('<ol>'); }
// open a new dl only if the prev item is not a dl item (:, ; or empty)
else { switch(prev.charAt(i)) { case'':case'*':case'#': ps('<dl>') } }
}
switch (l_match[1].charAt(l_match[1].length-1)) {
case '*': case '#':
ps('<li>' + parse_inline_nowiki(l_match[2])); break
case ';':
ps('<dt>');
var dt_match;
// handle ;dt :dd format
if (dt_match = l_match[2].match(/(.*?)(:.*?)$/)) {
ps(parse_inline_nowiki(dt_match[1]))
ll.unshift(dt_match[2])
} else ps(parse_inline_nowiki(l_match[2]))
break;
case ':':
ps('<dd>' + parse_inline_nowiki(l_match[2]))
}
prev=l_match[1]
}
// close remaining lists
for (var i=prev.length-1; i>=0; i--)
ps(f('</?>', (prev.charAt(i)=='*')? 'ul': ((prev.charAt(i)=='#')? 'ol': 'dl')))
}
function parse_table()
{
endl(f('<table>', $(/^\{\|( .*)$/)? $r[1]: ''))
for (;remain();) if ($('|')) switch (_(1)) {
case '}': endl('</table>'); return
case '-': endl(f('<tr>', $(/\|-*(.*)/)[1])); break
default: parse_table_data()
}
else if ($('!')) parse_table_data()
else sh()
}
function parse_table_data()
{
var td_line, match_i
// 1: "|+", '|' or '+'
// 2: ??
// 3: attributes ??
// TODO: finish commenting this regexp
var td_match = sh().match(/^(\|\+|\||!)((?:([^[|]*?)\|(?!\|))?(.*))$/)
if (td_match[1] == '|+') ps('<caption');
else ps('<t' + ((td_match[1]=='|')?'d':'h'))
if (typeof td_match[3] != 'undefined') {
//ps(' ' + td_match[3])
match_i = 4
} else match_i = 2
ps('>')
if (td_match[1] != '|+') {
// use || or !! as a cell separator depending on context
// NOTE: when split() is passed a regexp make sure to use non-capturing brackets
td_line = td_match[match_i].split((td_match[1] == '|')? '||': /(?:\|\||!!)/)
ps(parse_inline_nowiki(td_line.shift()))
while (td_line.length) ll.unshift(td_match[1] + td_line.pop())
} else ps(td_match[match_i])
var tc = 0, td = []
for (;remain(); td.push(sh()))
if ($('|')) {
if (!tc) break // we're at the outer-most level (no nested tables), skip to td parse
else if (_(1)=='}') tc--
}
else if (!tc && $('!')) break
else if ($('{|')) tc++
if (td.length) ps(Insta.convert(td))
}
function parse_pre()
{
ps('<pre>')
do endl(parse_inline_nowiki(ll[0].substring(1)) + "\n"); while (remain() && $(' '))
ps('</pre>')
}
function parse_block_image()
{
ps(parse_image(sh()))
}
function parse_image(str)
{
//<NOLITE>
// get what's in between "[[Image:" and "]]"
var tag = str.substring(str.indexOf(':') + 1, str.length - 2);
var width;
var attr = [], filename, caption = '';
var thumb=0, frame=0, center=0;
var align='';
if (tag.match(/\|/)) {
// manage nested links
var nesting = 0;
var last_attr;
for (var i = tag.length-1; i > 0; i--) {
if (tag.charAt(i) == '|' && !nesting) {
last_attr = tag.substr(i+1);
tag = tag.substring(0, i);
break;
} else switch (tag.substr(i-1, 2)) {
case ']]':
nesting++;
i--;
break;
case '[[':
nesting--;
i--;
}
}
attr = tag.split(/\s*\|\s*/);
attr.push(last_attr);
filename = attr.shift();
var w_match;
for (;attr.length; attr.shift())
if (w_match = attr[0].match(/^(\d*)(?:[px]*\d*)?px$/)) width = w_match[1]
else switch(attr[0]) {
case 'thumb':
case 'thumbnail':
thumb=true;
case 'frame':
frame=true;
break;
case 'none':
case 'right':
case 'left':
center=false;
align=attr[0];
break;
case 'center':
center=true;
align='none';
break;
default:
if (attr.length == 1) caption = attr[0];
}
} else filename = tag;
var o='';
if (frame) {
if (align=='') align = 'right';
o += f("<div class='thumb t?'>", align);
if (thumb) {
if (!width) width = Insta.conf.wiki.default_thumb_width;
o += f("<div style='width:?px;'>?", 2+width*1, make_image(filename, caption, width)) +
f("<div class='thumbcaption'><div class='magnify' style='float:right'><a href='?' class='internal' title='Enlarge'><img src='?'></a></div>?</div>",
htmlescape_attr(Insta.conf.paths.articles + Insta.conf.locale.image + ':' + filename),
Insta.conf.paths.magnify_icon,
parse_inline_nowiki(caption)
)
} else {
o += '<div>' + make_image(filename, caption) + f("<div class='thumbcaption'>?</div>", parse_inline_nowiki(caption))
}
o += '</div></div>';
} else if (align != '') {
o += f("<div class='float?'><span>?</span></div>", align, make_image(filename, caption, width));
} else {
return make_image(filename, caption, width);
}
return center? f("<div class='center'>?</div>", o): o;
//</NOLITE>
}
function parse_inline_nowiki(str)
{
var start, lastend=0
var substart=0, nestlev=0, open, close, subloop;
var html='';
while (-1 != (start = str.indexOf('<nowiki>', substart))) {
html += parse_inline_wiki(str.substring(lastend, start));
start += 8;
substart = start;
subloop = true;
do {
open = str.indexOf('<nowiki>', substart);
close = str.indexOf('</nowiki>', substart);
if (close<=open || open==-1) {
if (close==-1) {
return html + html_entities(str.substr(start));
}
substart = close+9;
if (nestlev) {
nestlev--;
} else {
lastend = substart;
html += html_entities(str.substring(start, lastend-9));
subloop = false;
}
} else {
substart = open+8;
nestlev++;
}
} while (subloop)
}
return html + parse_inline_wiki(str.substr(lastend));
}
function make_image(filename, caption, width)
{
//<NOLITE>
// uppercase first letter in file name
filename = filename.charAt(0).toUpperCase() + filename.substr(1);
// replace spaces with underscores
filename = filename.replace(/ /g, '_');
caption = strip_inline_wiki(caption);
var md5 = hex_md5(filename);
var source = md5.charAt(0) + '/' + md5.substr(0,2) + '/' + filename;
if (width) width = "width='" + width + "px'";
var img = "<img onerror=\""+pg.escapeQuotesHTML("this.onerror=null;this.src='"+pg.jsescape(Insta.conf.paths.images_fallback + source)+"'")+"\" src=\""+pg.escapeQuotesHTML(Insta.conf.paths.images + source)+"\" "+(caption!='' ? "alt=\"" + pg.escapeQuotesHTML(caption) + "\"" : '')+" "+width+">";
return f("<a class='image' ? href=\"?\">?</a>", (caption!='')? "title=\"" + pg.escapeQuotesHTML(caption) + "\"" : '', pg.escapeQuotesHTML(Insta.conf.paths.articles + Insta.conf.locale.image + ':' + filename), img);
//</NOLITE>
}
function parse_inline_images(str)
{
//<NOLITE>
var start, substart=0, nestlev=0;
var loop, close, open, wiki, html;
while (-1 != (start=str.indexOf('[[', substart))) {
if(str.substr(start+2).match(RegExp('^(Image|File|' + Insta.conf.locale.image + '):','i'))) {
loop=true;
substart=start;
do {
substart+=2;
close=str.indexOf(']]',substart);
open=str.indexOf('[[',substart);
if (close<=open||open==-1) {
if (close==-1) return str;
substart=close;
if (nestlev) {
nestlev--;
} else {
wiki=str.substring(start,close+2);
html=parse_image(wiki);
str=str.replace(wiki,html);
substart=start+html.length;
loop=false;
}
} else {
substart=open;
nestlev++;
}
} while (loop)
} else break;
}
//</NOLITE>
return str;
}
// the output of this function doesn't respect the FILO structure of HTML
// but since most browsers can handle it I'll save myself the hassle
function parse_inline_formatting(str)
{
var em,st,i,li,o='';
while ((i=str.indexOf("''",li))+1) {
o += str.substring(li,i);
li=i+2;
if (str.charAt(i+2)=="'") {
li++;
st=!st;
o+=st?'<strong>':'</strong>';
} else {
em=!em;
o+=em?'<em>':'</em>';
}
}
return o+str.substr(li);
}
function parse_inline_wiki(str)
{
var aux_match;
str = parse_inline_images(str);
str = parse_inline_formatting(str);
// math
while (aux_match = str.match(/<(?:)math>(.*?)<\/math>/i)) {
var math_md5 = hex_md5(aux_match[1]);
str = str.replace(aux_match[0], f("<img src='?.png'>", Insta.conf.paths.math+math_md5));
}
// Build a Mediawiki-formatted date string
var date = new Date;
var minutes = date.getUTCMinutes();
if (minutes < 10) minutes = '0' + minutes;
var date = f("?:?, ? ? ? (UTC)", date.getUTCHours(), minutes, date.getUTCDate(), Insta.conf.locale.months[date.getUTCMonth()], date.getUTCFullYear());
// text formatting
return str.
// signatures
replace(/~{5}(?!~)/g, date).
replace(/~{4}(?!~)/g, Insta.conf.user.name+' '+date).
replace(/~{3}(?!~)/g, Insta.conf.user.name).
// [[:Category:...]], [[:Image:...]], etc...
replace(RegExp('\\[\\[:((?:'+Insta.conf.locale.category+'|Image|File|'+Insta.conf.locale.image+'|'+Insta.conf.wiki.interwiki+'):[^|]*?)\\]\\](\w*)','gi'), function($0,$1,$2){return f("<a href='?'>?</a>", Insta.conf.paths.articles + htmlescape_attr($1), htmlescape_text($1) + htmlescape_text($2));}).
// remove straight category and interwiki tags
replace(RegExp('\\[\\[(?:'+Insta.conf.locale.category+'|'+Insta.conf.wiki.interwiki+'):.*?\\]\\]','gi'),'').
// [[:Category:...|Links]], [[:Image:...|Links]], etc...
replace(RegExp('\\[\\[:((?:'+Insta.conf.locale.category+'|Image|File|'+Insta.conf.locale.image+'|'+Insta.conf.wiki.interwiki+'):.*?)\\|([^\\]]+?)\\]\\](\\w*)','gi'), function($0,$1,$2,$3){return f("<a href='?'>?</a>", Insta.conf.paths.articles + htmlescape_attr($1), htmlescape_text($2) + htmlescape_text($3));}).
// [[/Relative links]]
replace(/\[\[(\/[^|]*?)\]\]/g, function($0,$1){return f("<a href='?'>?</a>", Insta.conf.baseUrl + htmlescape_attr($1), htmlescape_text($1)); }).
// [[/Replaced|Relative links]]
replace(/\[\[(\/.*?)\|(.+?)\]\]/g, function($0,$1,$2){return f("<a href='?'>?</a>", Insta.conf.baseUrl + htmlescape_attr($1), htmlescape_text($2)); }).
// [[Common links]]
replace(/\[\[([^|]*?)\]\](\w*)/g, function($0,$1,$2){return f("<a href='?'>?</a>", Insta.conf.paths.articles + htmlescape_attr($1), htmlescape_text($1) + htmlescape_text($2)); }).
// [[Replaced|Links]]
replace(/\[\[(.*?)\|([^\]]+?)\]\](\w*)/g, function($0,$1,$2,$3){return f("<a href='?'>?</a>", Insta.conf.paths.articles + htmlescape_attr($1), htmlescape_text($2) + htmlescape_text($3)); }).
// [[Stripped:Namespace|Namespace]]
replace(/\[\[([^\]]*?:)?(.*?)( *\(.*?\))?\|\]\]/g, function($0,$1,$2,$3){return f("<a href='?'>?</a>", Insta.conf.paths.articles + htmlescape_attr($1) + htmlescape_attr($2) + htmlescape_attr($3), htmlescape_text($2)); }).
// External links
replace(/\[(https?|news|ftp|mailto|gopher|irc):(\/*)([^\]]*?) (.*?)\]/g, function($0,$1,$2,$3,$4){return f("<a class='external' href='?:?'>?</a>", htmlescape_attr($1), htmlescape_attr($2) + htmlescape_attr($3), htmlescape_text($4)); }).
replace(/\[http:\/\/(.*?)\]/g, function($0,$1){return f("<a class='external' href='http://?'>[#]</a>", htmlescape_attr($1)); }).
replace(/\[(news|ftp|mailto|gopher|irc):(\/*)(.*?)\]/g, function($0,$1,$2,$3,$4){return f("<a class='external' href='?:?'>?:?</a>", htmlescape_attr($1), htmlescape_attr($2) + htmlescape_attr($3), htmlescape_text($1), htmlescape_text($2) + htmlescape_text($3)); }).
replace(/(^| )(https?|news|ftp|mailto|gopher|irc):(\/*)([^ $]*[^.,!?;: $])/g, function($0,$1,$2,$3,$4){return f("?<a class='external' href='?:?'>?:?</a>", htmlescape_text($1), htmlescape_attr($2), htmlescape_attr($3) + htmlescape_attr($4), htmlescape_text($2), htmlescape_text($3) + htmlescape_text($4)); }).
replace('__NOTOC__','').
replace('__NOEDITSECTION__','');
}
/*
*/
function strip_inline_wiki(str)
{
return str
.replace(/\[\[[^\]]*\|(.*?)\]\]/g,'$1')
.replace(/\[\[(.*?)\]\]/g,'$1')
.replace(/''(.*?)''/g,'$1');
}
// begin parsing
for (;remain();) if ($(/^(={1,6})(.*)\1(.*)$/)) {
p=0
endl(f('<h?>?</h?>?', $r[1].length, parse_inline_nowiki($r[2]), $r[1].length, $r[3]))
} else if ($(/^[*#:;]/)) {
p=0
parse_list()
} else if ($(' ')) {
p=0
parse_pre()
} else if ($('{|')) {
p=0
parse_table()
} else if ($(/^----+$/)) {
p=0
endl('<hr>')
} else if ($(Insta.BLOCK_IMAGE)) {
p=0
parse_block_image()
} else {
// handle paragraphs
if ($$('')) {
if (p = (remain()>1 && ll[1]==(''))) endl('<p><br>')
} else {
if(!p) {
ps('<p>')
p=1
}
ps(parse_inline_nowiki(ll[0]) + ' ')
}
sh();
}
return o
};
window.wiki2html=function(txt,baseurl) {
Insta.conf.baseUrl=baseurl;
return Insta.convert(txt);
};
// ENDFILE: livepreview.js
// STARTFILE: pageinfo.js
//<NOLITE>
function popupFilterPageSize(data) {
return formatBytes(data.length);
}
function popupFilterCountLinks(data) {
var num=countLinks(data);
return String(num) + ' ' + ((num!=1)?popupString('wikiLinks'):popupString('wikiLink'));
}
function popupFilterCountImages(data) {
var num=countImages(data);
return String(num) + ' ' + ((num!=1)?popupString('images'):popupString('image'));
}
function popupFilterCountCategories(data) {
var num=countCategories(data);
return String(num) + ' ' + ((num!=1)?popupString('categories'):popupString('category'));
}
function popupFilterLastModified(data,download) {
var lastmod=download.lastModified;
var now=new Date();
var age=now-lastmod;
if (lastmod && getValueOf('popupLastModified')) {
return (tprintf('%s old', [formatAge(age)])).replace(RegExp(' ','g'), ' ');
}
return '';
}
function formatAge(age) {
// coerce into a number
var a=0+age, aa=a;
var seclen = 1000;
var minlen = 60*seclen;
var hourlen = 60*minlen;
var daylen = 24*hourlen;
var weeklen = 7*daylen;
var numweeks = (a-a%weeklen)/weeklen; a = a-numweeks*weeklen; var sweeks = addunit(numweeks, 'week');
var numdays = (a-a%daylen)/daylen; a = a-numdays*daylen; var sdays = addunit(numdays, 'day');
var numhours = (a-a%hourlen)/hourlen; a = a-numhours*hourlen; var shours = addunit(numhours,'hour');
var nummins = (a-a%minlen)/minlen; a = a-nummins*minlen; var smins = addunit(nummins, 'minute');
var numsecs = (a-a%seclen)/seclen; a = a-numsecs*seclen; var ssecs = addunit(numsecs, 'second');
if (aa > 4*weeklen) { return sweeks; }
if (aa > weeklen) { return sweeks + ' ' + sdays; }
if (aa > daylen) { return sdays + ' ' + shours; }
if (aa > 6*hourlen) { return shours; }
if (aa > hourlen) { return shours + ' ' + smins; }
if (aa > 10*minlen) { return smins; }
if (aa > minlen) { return smins + ' ' + ssecs; }
return ssecs;
}
function addunit(num,str) { return '' + num + ' ' + ((num!=1) ? popupString(str+'s') : popupString(str)) ;}
function runPopupFilters(list, data, download) {
var ret=[];
for (var i=0; i<list.length; ++i) {
if (list[i] && typeof list[i] == 'function') {
var s=list[i](data, download, download.owner.article);
if (s) { ret.push(s); }
}
}
return ret;
}
function getPageInfo(data, download) {
if (!data || data.length === 0) { return popupString('Empty page'); }
var popupFilters=getValueOf('popupFilters') || [];
var extraPopupFilters = getValueOf('extraPopupFilters') || [];
var pageInfoArray = runPopupFilters(popupFilters.concat(extraPopupFilters), data, download);
var pageInfo=pageInfoArray.join(', ');
if (pageInfo !== '' ) { pageInfo = upcaseFirst(pageInfo); }
return pageInfo;
}
// this could be improved!
function countLinks(wikiText) { return wikiText.split('[[').length - 1; }
// if N = # matches, n = # brackets, then
// String.parenSplit(regex) intersperses the N+1 split elements
// with Nn other elements. So total length is
// L= N+1 + Nn = N(n+1)+1. So N=(L-1)/(n+1).
function countImages(wikiText) {
return (wikiText.parenSplit(pg.re.image).length - 1) / (pg.re.imageBracketCount + 1);
}
function countCategories(wikiText) {
return (wikiText.parenSplit(pg.re.category).length - 1) / (pg.re.categoryBracketCount + 1);
}
function popupFilterStubDetect(data, download, article) {
var counts=stubCount(data, article);
if (counts.real) { return popupString('stub'); }
if (counts.sect) { return popupString('section stub'); }
return '';
}
function popupFilterDisambigDetect(data, download, article) {
if (getValueOf('popupOnlyArticleDabStub') && article.namespace()) { return ''; }
return (isDisambig(data, article)) ? popupString('disambig') : '';
}
function formatBytes(num) {
return (num > 949) ? (Math.round(num/100)/10+popupString('kB')) : (num +' ' + popupString('bytes')) ;
}
//</NOLITE>
// ENDFILE: pageinfo.js
// STARTFILE: titles.js
/**
@fileoverview Defines the {@link Title} class, and associated crufty functions.
<code>Title</code> deals with article titles and their various
forms. {@link Stringwrapper} is the parent class of
<code>Title</code>, which exists simply to make things a little
neater.
*/
/**
Creates a new Stringwrapper.
@constructor
@class the Stringwrapper class. This base class is not really
useful on its own; it just wraps various common string operations.
*/
function Stringwrapper() {
/**
Wrapper for this.toString().indexOf()
@param {String} x
@type integer
*/
this.indexOf=function(x){return this.toString().indexOf(x);};
/**
Returns this.value.
@type String
*/
this.toString=function(){return this.value;};
/**
Wrapper for {@link String#parenSplit} applied to this.toString()
@param {RegExp} x
@type Array
*/
this.parenSplit=function(x){return this.toString().parenSplit(x);};
/**
Wrapper for this.toString().substring()
@param {String} x
@param {String} y (optional)
@type String
*/
this.substring=function(x,y){
if (typeof y=='undefined') { return this.toString().substring(x); }
return this.toString().substring(x,y);
};
/**
Wrapper for this.toString().split()
@param {String} x
@type Array
*/
this.split=function(x){return this.toString().split(x);};
/**
Wrapper for this.toString().replace()
@param {String} x
@param {String} y
@type String
*/
this.replace=function(x,y){ return this.toString().replace(x,y); };
}
/**
Creates a new <code>Title</code>.
@constructor
@class The Title class. Holds article titles and converts them into
various forms. Also deals with anchors, by which we mean the bits
of the article URL after a # character, representing locations
within an article.
@param {String} value The initial value to assign to the
article. This must be the canonical title (see {@link
Title#value}. Omit this in the constructor and use another function
to set the title if this is unavailable.
*/
function Title(val) {
/**
The canonical article title. This must be in UTF-8 with no
entities, escaping or nasties. Also, underscores should be
replaced with spaces.
@type String
@private
*/
this.value=null;
/**
The canonical form of the anchor. This should be exactly as
it appears in the URL, i.e. with the .C3.0A bits in.
@type String
*/
this.anchor='';
this.setUtf(val);
}
Title.prototype=new Stringwrapper();
/**
Returns the canonical representation of the article title, optionally without anchor.
@param {boolean} omitAnchor
@fixme Decide specs for anchor
@return String The article title and the anchor.
*/
Title.prototype.toString=function(omitAnchor) {
return this.value + ( (!omitAnchor && this.anchor) ? '#' + this.anchorString() : '' );
};
Title.prototype.anchorString=function() {
if (!this.anchor) { return ''; }
var split=this.anchor.parenSplit(/((?:[.][0-9A-F]{2})+)/);
var len=split.length;
for (var j=1; j<len; j+=2) {
// FIXME s/decodeURI/decodeURIComponent/g ?
split[j]=decodeURIComponent(split[j].split('.').join('%')).split('_').join(' ');
}
return split.join('');
};
Title.prototype.urlAnchor=function() {
var split=this.anchor.parenSplit('/((?:[%][0-9A-F]{2})+)/');
var len=split.length;
for (var j=1; j<len; j+=2) {
split[j]=split[j].split('%').join('.');
}
return split.join('');
};
Title.prototype.anchorFromUtf=function(str) {
this.anchor=encodeURIComponent(str.split(' ').join('_'))
.split('%3A').join(':').split("'").join('%27').split('%').join('.');
};
Title.fromURL=function(h) {
return new Title().fromURL(h);
};
Title.prototype.fromURL=function(h) {
if (typeof h != 'string') {
this.value=null;
return this;
}
// NOTE : playing with decodeURI, encodeURI, escape, unescape,
// we seem to be able to replicate the IE borked encoding
// IE doesn't do this new-fangled utf-8 thing.
// and it's worse than that.
// IE seems to treat the query string differently to the rest of the url
// the query is treated as bona-fide utf8, but the first bit of the url is pissed around with
// we fix up & for all browsers, just in case.
var splitted=h.split('?');
splitted[0]=splitted[0].split('&').join('%26');
if (pg.flag.linksLikeIE6) {
splitted[0]=encodeURI(decode_utf8(splitted[0]));
}
h=splitted.join('?');
var contribs=pg.re.contribs.exec(h);
if (contribs !== null) {
if (contribs[1]=='title=') { contribs[3]=contribs[3].split('+').join(' '); }
var u=new Title(contribs[3]);
this.setUtf(this.decodeNasties(mw.config.get('wgFormattedNamespaces')[pg.nsUserId] + ':' + u.stripNamespace()));
return this;
}
var email=pg.re.email.exec(h);
if (email !== null) {
this.setUtf(this.decodeNasties(mw.config.get('wgFormattedNamespaces')[pg.nsUserId] + ':' + new Title(email[3]).stripNamespace()));
return this;
}
var backlinks=pg.re.backlinks.exec(h);
if (backlinks) {
this.setUtf(this.decodeNasties(new Title(backlinks[3])));
return this;
}
// no more special cases to check --
// hopefully it's not a disguised user-related or specially treated special page
var m=pg.re.main.exec(h);
if(m===null) { this.value=null; }
else {
var fromBotInterface = /[?](.+[&])?title=/.test(h);
if (fromBotInterface) {
m[2]=m[2].split('+').join('_');
}
var extracted = m[2] + (m[3] ? '#' + m[3] : '');
if (pg.flag.isSafari && /%25[0-9A-Fa-f]{2}/.test(extracted)) {
// Fix Safari issue
// Safari sometimes encodes % as %25 in UTF-8 encoded strings like %E5%A3 -> %25E5%25A3.
this.setUtf(decodeURIComponent(unescape(extracted)));
} else {
this.setUtf(this.decodeNasties(extracted));
}
}
return this;
};
Title.prototype.decodeNasties=function(txt) {
var ret= this.decodeEscapes(decodeURI(txt));
ret = ret.replace(/[_ ]*$/, '');
return ret;
};
Title.prototype.decodeEscapes=function(txt) {
var split=txt.parenSplit(/((?:[%][0-9A-Fa-f]{2})+)/);
var len=split.length;
for (var i=1; i<len; i=i+2) {
// FIXME is decodeURIComponent better?
split[i]=unescape(split[i]);
}
return split.join('');
};
Title.fromAnchor=function(a) {
return new Title().fromAnchor(a);
};
Title.prototype.fromAnchor=function(a) {
if (!a) { this.value=null; return this; }
return this.fromURL(a.href);
};
Title.fromWikiText=function(txt) {
return new Title().fromWikiText(txt);
};
Title.prototype.fromWikiText=function(txt) {
// FIXME - testing needed
if (!pg.flag.linksLikeIE6) { txt=myDecodeURI(txt); }
this.setUtf(txt);
return this;
};
Title.prototype.hintValue=function(){
if(!this.value) { return ''; }
return safeDecodeURI(this.value);
};
//<NOLITE>
Title.prototype.toUserName=function(withNs) {
if (this.namespaceId() != pg.nsUserId && this.namespaceId() != pg.nsUsertalkId) {
this.value=null;
return;
}
this.value = (withNs ? mw.config.get('wgFormattedNamespaces')[pg.nsUserId] + ':' : '') + this.stripNamespace().split('/')[0];
};
Title.prototype.userName=function(withNs) {
var t=(new Title(this.value));
t.toUserName(withNs);
if (t.value) { return t; }
return null;
};
Title.prototype.toTalkPage=function() {
// convert article to a talk page, or if we can't, return null
// In other words: return null if this ALREADY IS a talk page
// and return the corresponding talk page otherwise
//
// Per http://www.mediawiki.org/wiki/Manual:Namespace#Subject_and_talk_namespaces
// * All discussion namespaces have odd-integer indices
// * The discussion namespace index for a specific namespace with index n is n + 1
if (this.value===null) { return null; }
var namespaceId = this.namespaceId();
if (namespaceId>=0 && namespaceId % 2 == 0) //non-special and subject namespace
{
var localizedNamespace = mw.config.get('wgFormattedNamespaces')[namespaceId+1];
if (typeof localizedNamespace!=='undefined')
{
if (localizedNamespace==='') return this.value = this.stripNamespace();
this.value = localizedNamespace.split(' ').join('_') + ':' + this.stripNamespace();
return this.value;
}
}
this.value=null;
return null;
};
//</NOLITE>
// Return canonical, localized namespace
Title.prototype.namespace=function() {
return mw.config.get('wgFormattedNamespaces')[this.namespaceId()];
};
Title.prototype.namespaceId=function() {
var n=this.value.indexOf(':');
if (n<0) { return 0; } //mainspace
var namespaceId = mw.config.get('wgNamespaceIds')[this.value.substring(0,n).split(' ').join('_').toLowerCase()];
if (typeof namespaceId=='undefined') return 0; //mainspace
return namespaceId;
};
//<NOLITE>
Title.prototype.talkPage=function() {
var t=new Title(this.value);
t.toTalkPage();
if (t.value) { return t; }
return null;
};
Title.prototype.isTalkPage=function() {
if (this.talkPage()===null) { return true; }
return false;
};
Title.prototype.toArticleFromTalkPage=function() {
//largely copy/paste from toTalkPage above.
if (this.value===null) { return null; }
var namespaceId = this.namespaceId();
if (namespaceId>=0 && namespaceId % 2 == 1) //non-special and talk namespace
{
var localizedNamespace = mw.config.get('wgFormattedNamespaces')[namespaceId-1];
if (typeof localizedNamespace!=='undefined')
{
if (localizedNamespace==='') return this.value = this.stripNamespace();
this.value = localizedNamespace.split(' ').join('_') + ':' + this.stripNamespace();
return this.value;
}
}
this.value=null;
return null;
};
Title.prototype.articleFromTalkPage=function() {
var t=new Title(this.value);
t.toArticleFromTalkPage();
if (t.value) { return t; }
return null;
};
Title.prototype.articleFromTalkOrArticle=function() {
var t=new Title(this.value);
if ( t.toArticleFromTalkPage() ) { return t; }
return this;
};
Title.prototype.isIpUser=function() {
return pg.re.ipUser.test(this.userName());
};
//</NOLITE>
Title.prototype.stripNamespace=function(){ // returns a string, not a Title
var n=this.value.indexOf(':');
if (n<0) { return this.value; }
var namespaceId = this.namespaceId();
if (namespaceId===pg.nsMainspaceId) return this.value;
return this.value.substring(n+1);
};
Title.prototype.setUtf=function(value){
if (!value) { this.value=''; return; }
var anch=value.indexOf('#');
if(anch < 0) { this.value=value.split('_').join(' '); this.anchor=''; return; }
this.value=value.substring(0,anch).split('_').join(' ');
this.anchor=value.substring(anch+1);
this.ns=null; // wait until namespace() is called
};
Title.prototype.setUrl=function(urlfrag) {
var anch=urlfrag.indexOf('#');
this.value=safeDecodeURI(urlfrag.substring(0,anch));
this.anchor=value.substring(anch+1);
};
Title.prototype.append=function(x){
this.setUtf(this.value + x);
};
Title.prototype.urlString=function(x) {
x || ( x={} );
var v=this.toString(true);
if (!x.omitAnchor && this.anchor) { v+= '#' + this.urlAnchor(); }
if (!x.keepSpaces) { v=v.split(' ').join('_'); }
return encodeURI(v).split('&').join('%26').split('?').join('%3F').split('+').join('%2B');
};
Title.prototype.removeAnchor=function() {
return new Title(this.toString(true));
};
Title.prototype.toUrl=function() {
return pg.wiki.titlebase + this.urlString();
};
function paramValue(param, url) {
var s=url.parenSplit(RegExp('[?&]' + literalizeRegex(param) + '=([^?&]*)'));
if (!url) { return null; }
return s[1] || null;
}
function parseParams(url) {
var ret={};
if (url.indexOf('?')==-1) { return ret; }
var s=url.split('?').slice(1).join();
var t=s.split('&');
for (var i=0; i<t.length; ++i) {
var z=t[i].split('=');
z.push(null);
ret[z[0]]=z[1];
}
return ret;
}
// all sorts of stuff here
// FIXME almost everything needs to be rewritten
function oldidFromAnchor(a) { return paramValue('oldid', a.href); }
//function diffFromAnchor(a) { return paramValue('diff', a.href); }
function wikiMarkupToAddressFragment (str) { // for images
var ret = safeDecodeURI(str);
ret = ret.split(' ').join('_');
ret = encodeURI(ret);
return ret;
}
// (a) myDecodeURI (first standard decodeURI, then pg.re.urlNoPopup)
// (b) change spaces to underscores
// (c) encodeURI (just the straight one, no pg.re.urlNoPopup)
function myDecodeURI (str) {
var ret;
// FIXME decodeURIComponent??
try { ret=decodeURI(str.toString()); }
catch (summat) { return str; }
for (var i=0; i<pg.misc.decodeExtras.length; ++i) {
var from=pg.misc.decodeExtras[i].from;
var to=pg.misc.decodeExtras[i].to;
ret=ret.split(from).join(to);
}
return ret;
}
function safeDecodeURI(str) { var ret=myDecodeURI(str); return ret || str; }
///////////
// TESTS //
///////////
//<NOLITE>
function isIpUser(user) {return pg.re.ipUser.test(user);}
function isDisambig(data, article) {
if (!getValueOf('popupAllDabsStubs') && article.namespace()) { return false; }
return ! article.isTalkPage() && pg.re.disambig.test(data);
}
function stubCount(data, article) {
if (!getValueOf('popupAllDabsStubs') && article.namespace()) { return false; }
var sectStub=0;
var realStub=0;
if (pg.re.stub.test(data)) {
var s=data.parenSplit(pg.re.stub);
for (var i=1; i<s.length; i=i+2) {
if (s[i]) { ++sectStub; }
else { ++realStub; }
}
}
return { real: realStub, sect: sectStub };
}
function isValidImageName(str){ // extend as needed...
return ( str.indexOf('{') == -1 );
}
function isInStrippableNamespace(article) {
//I believe that this method means to return whether the given article is in a namspace without subpages. Meaning, it's broken.
return ( article.namespace() !== '' );
}
function isInMainNamespace(article) { return !isInStrippableNamespace(article); }
function anchorContainsImage(a) {
// iterate over children of anchor a
// see if any are images
if (a===null) { return false; }
kids=a.childNodes;
for (var i=0; i<kids.length; ++i) { if (kids[i].nodeName=='IMG') { return true; } }
return false;
}
//</NOLITE>
function isPopupLink(a) {
// NB for performance reasons, TOC links generally return true
// they should be stripped out later
if (!markNopopupSpanLinks.done) { markNopopupSpanLinks(); }
if (a.inNopopupSpan) { return false; }
// FIXME is this faster inline?
if (a.onmousedown || a.getAttribute('nopopup')) { return false; }
var h=a.href;
if (h===document.location.href+'#') { return false; }
if (!pg.re.basenames.test(h)) { return false; }
if (!pg.re.urlNoPopup.test(h)) { return true; }
return (
(pg.re.email.test(h) || pg.re.contribs.test(h) || pg.re.backlinks.test(h)) &&
h.indexOf('&limit=') == -1 );
}
function markNopopupSpanLinks() {
if( !getValueOf('popupOnlyArticleLinks'))
fixVectorMenuPopups();
var s=getElementsByClassName(document, '*', "nopopups")
for (var i=0; i<s.length; ++i) {
var as=s[i].getElementsByTagName('a');
for (var j=0; j<as.length; ++j) {
as[j].inNopopupSpan=true;
}
}
markNopopupSpanLinks.done=true;
}
function fixVectorMenuPopups() {
var vmenus = getElementsByClassName( document, 'div', 'vectorMenu');
for( i= 0; vmenus && i< vmenus.length; i++ ) {
var h5 = vmenus[i].getElementsByTagName('h5')[0];
if( h5) var a = h5.getElementsByTagName('a')[0];
if( a ) a.inNopopupSpan=true;
}
}
// ENDFILE: titles.js
// STARTFILE: cookies.js
//<NOLITE>
//////////////////////////////////////////////////
// Cookie handling
// from http://www.quirksmode.org/js/cookies.html
var Cookie= {
create: function(name,value,days)
{
var expires;
if (days)
{
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
expires = "; expires="+date.toGMTString();
}
else { expires = ""; }
document.cookie = name+"="+value+expires+"; path=/";
},
read: function(name)
{
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++)
{
var c = ca[i];
while (c.charAt(0)==' ') { c = c.substring(1,c.length); }
if (c.indexOf(nameEQ) === 0) { return c.substring(nameEQ.length,c.length); }
}
return null;
},
erase: function(name)
{
Cookie.create(name,"",-1);
}
};
//</NOLITE>
// ENDFILE: cookies.js
// STARTFILE: getpage.js
//////////////////////////////////////////////////
// Wiki-specific downloading
//
// Schematic for a getWiki call
//
// getWiki->-getPageWithCaching
// |
// false | true
// getPage<-[findPictureInCache]->-onComplete(a fake download)
// \.
// (async)->addPageToCache(download)->-onComplete(download)
/** @todo {document}
@param {Title} article
@param {Function} onComplete
@param {integer} oldid
@param {Navapopup} owner
*/
function getWiki(article, onComplete, oldid, owner) {
// set ctype=text/css to get around opera gzip bug
var url = pg.wiki.titlebase + article.removeAnchor().urlString() +
'&action=raw&ctype=text/css';
if (oldid || oldid===0 || oldid==='0') { url += '&oldid='+oldid; }
url += '&maxage=0&smaxage=0';
getPageWithCaching(url, onComplete, owner);
}
// check cache to see if page exists
function getPageWithCaching(url, onComplete, owner) {
log('getPageWithCaching, url='+url);
var i=findInPageCache(url);
if (i > -1) {
var d=fakeDownload(url, owner.idNumber, onComplete,
pg.cache.pages[i].data, pg.cache.pages[i].lastModified,
owner);
} else {
var d=getPage(url, onComplete, owner);
if (d && owner && owner.addDownload) {
owner.addDownload(d);
d.owner=owner;
}
}
}
function getPage(url, onComplete, owner) {
log('getPage');
var callback= function (d) { if (!d.aborted) {addPageToCache(d); onComplete(d);} };
return startDownload(url, owner.idNumber, callback);
}
function findInPageCache(url) {
for (var i=0; i<pg.cache.pages.length; ++i) {
if (url==pg.cache.pages[i].url) { return i; }
}
return -1;
}
function addPageToCache(download) {
log('addPageToCache '+download.url);
var page = {url: download.url, data: download.data, lastModified: download.lastModified};
return pg.cache.pages.push(page);
}
// ENDFILE: getpage.js
// STARTFILE: md5-2.2alpha.js
//<NOLITE>
/*
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 2.2-alpha Copyright (C) Paul Johnston 1999 - 2005
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for more info.
*/
/*
* Configurable variables. You may need to tweak these to be compatible with
* the server-side, but the defaults work in most cases.
*/
var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
/*
* These are the functions you'll usually want to call
* They take string arguments and return either hex or base-64 encoded strings
*/
function hex_md5(s) { return rstr2hex(rstr_md5(str2rstr_utf8(s))); }
function b64_md5(s) { return rstr2b64(rstr_md5(str2rstr_utf8(s))); }
function any_md5(s, e) { return rstr2any(rstr_md5(str2rstr_utf8(s)), e); }
function hex_hmac_md5(k, d)
{ return rstr2hex(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d))); }
function b64_hmac_md5(k, d)
{ return rstr2b64(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d))); }
function any_hmac_md5(k, d, e)
{ return rstr2any(rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d)), e); }
/*
* Perform a simple self-test to see if the VM is working
*/
function md5_vm_test()
{
return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
}
/*
* Calculate the MD5 of a raw string
*/
function rstr_md5(s)
{
return binl2rstr(binl_md5(rstr2binl(s), s.length * 8));
}
/*
* Calculate the HMAC-MD5, of a key and some data (raw strings)
*/
function rstr_hmac_md5(key, data)
{
var bkey = rstr2binl(key);
if(bkey.length > 16) bkey = binl_md5(bkey, key.length * 8);
var ipad = Array(16), opad = Array(16);
for(var i = 0; i < 16; i++)
{
ipad[i] = bkey[i] ^ 0x36363636;
opad[i] = bkey[i] ^ 0x5C5C5C5C;
}
var hash = binl_md5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
return binl2rstr(binl_md5(opad.concat(hash), 512 + 128));
}
/*
* Convert a raw string to a hex string
*/
function rstr2hex(input)
{
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
var output = "";
var x;
for(var i = 0; i < input.length; i++)
{
x = input.charCodeAt(i);
output += hex_tab.charAt((x >>> 4) & 0x0F)
+ hex_tab.charAt( x & 0x0F);
}
return output;
}
/*
* Convert a raw string to a base-64 string
*/
function rstr2b64(input)
{
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var output = "";
var len = input.length;
for(var i = 0; i < len; i += 3)
{
var triplet = (input.charCodeAt(i) << 16)
| (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)
| (i + 2 < len ? input.charCodeAt(i+2) : 0);
for(var j = 0; j < 4; j++)
{
if(i * 8 + j * 6 > input.length * 8) output += b64pad;
else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F);
}
}
return output;
}
/*
* Convert a raw string to an arbitrary string encoding
*/
function rstr2any(input, encoding)
{
var divisor = encoding.length;
var remainders = Array();
var i, q, x, quotient;
/* Convert to an array of 16-bit big-endian values, forming the dividend */
var dividend = Array(input.length / 2);
for(i = 0; i < dividend.length; i++)
{
dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1);
}
/*
* Repeatedly perform a long division. The binary array forms the dividend,
* the length of the encoding is the divisor. Once computed, the quotient
* forms the dividend for the next step. We stop when the dividend is zero.
* All remainders are stored for later use.
*/
while(dividend.length > 0)
{
quotient = Array();
x = 0;
for(i = 0; i < dividend.length; i++)
{
x = (x << 16) + dividend[i];
q = Math.floor(x / divisor);
x -= q * divisor;
if(quotient.length > 0 || q > 0)
quotient[quotient.length] = q;
}
remainders[remainders.length] = x;
dividend = quotient;
}
/* Convert the remainders to the output string */
var output = "";
for(i = remainders.length - 1; i >= 0; i--)
output += encoding.charAt(remainders[i]);
return output;
}
/*
* Encode a string as utf-8.
* For efficiency, this assumes the input is valid utf-16.
*/
function str2rstr_utf8(input)
{
var output = "";
var i = -1;
var x, y;
while(++i < input.length)
{
/* Decode utf-16 surrogate pairs */
x = input.charCodeAt(i);
y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0;
if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF)
{
x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF);
i++;
}
/* Encode output as utf-8 */
if(x <= 0x7F)
output += String.fromCharCode(x);
else if(x <= 0x7FF)
output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),
0x80 | ( x & 0x3F));
else if(x <= 0xFFFF)
output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),
0x80 | ((x >>> 6 ) & 0x3F),
0x80 | ( x & 0x3F));
else if(x <= 0x1FFFFF)
output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),
0x80 | ((x >>> 12) & 0x3F),
0x80 | ((x >>> 6 ) & 0x3F),
0x80 | ( x & 0x3F));
}
return output;
}
/*
* Encode a string as utf-16
*/
function str2rstr_utf16le(input)
{
var output = "";
for(var i = 0; i < input.length; i++)
output += String.fromCharCode( input.charCodeAt(i) & 0xFF,
(input.charCodeAt(i) >>> 8) & 0xFF);
return output;
}
function str2rstr_utf16be(input)
{
var output = "";
for(var i = 0; i < input.length; i++)
output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF,
input.charCodeAt(i) & 0xFF);
return output;
}
/*
* Convert a raw string to an array of little-endian words
* Characters >255 have their high-byte silently ignored.
*/
function rstr2binl(input)
{
var output = Array(input.length >> 2);
for(var i = 0; i < output.length; i++)
output[i] = 0;
for(var i = 0; i < input.length * 8; i += 8)
output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (i%32);
return output;
}
/*
* Convert an array of little-endian words to a string
*/
function binl2rstr(input)
{
var output = "";
for(var i = 0; i < input.length * 32; i += 8)
output += String.fromCharCode((input[i>>5] >>> (i % 32)) & 0xFF);
return output;
}
/*
* Calculate the MD5 of an array of little-endian words, and a bit length.
*/
function binl_md5(x, len)
{
/* append padding */
x[len >> 5] |= 0x80 << ((len) % 32);
x[(((len + 64) >>> 9) << 4) + 14] = len;
var a = 1732584193;
var b = -271733879;
var c = -1732584194;
var d = 271733878;
for(var i = 0; i < x.length; i += 16)
{
var olda = a;
var oldb = b;
var oldc = c;
var oldd = d;
a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
a = safe_add(a, olda);
b = safe_add(b, oldb);
c = safe_add(c, oldc);
d = safe_add(d, oldd);
}
return Array(a, b, c, d);
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function md5_cmn(q, a, b, x, s, t)
{
return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
}
function md5_ff(a, b, c, d, x, s, t)
{
return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
}
function md5_gg(a, b, c, d, x, s, t)
{
return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
}
function md5_hh(a, b, c, d, x, s, t)
{
return md5_cmn(b ^ c ^ d, a, b, x, s, t);
}
function md5_ii(a, b, c, d, x, s, t)
{
return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
}
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safe_add(x, y)
{
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
return (msw << 16) | (lsw & 0xFFFF);
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function bit_rol(num, cnt)
{
return (num << cnt) | (num >>> (32 - cnt));
}
//</NOLITE>
// ENDFILE: md5-2.2alpha.js
// STARTFILE: parensplit.js
//////////////////////////////////////////////////
// parenSplit
// String.prototype.parenSplit should do what ECMAscript says String.prototype.split does,
// interspersing paren matches (regex capturing groups) between the split elements.
// i.e. 'abc'.split(/(b)/)) should return ['a','b','c'], not ['a','c']
if (String('abc'.split(/(b)/))!='a,b,c') {
// broken String.split, e.g. konq, IE
String.prototype.parenSplit=function (re) {
re=nonGlobalRegex(re);
var s=this;
var m=re.exec(s);
var ret=[];
while (m && s) {
// without the following loop, we have
// 'ab'.parenSplit(/a|(b)/) != 'ab'.split(/a|(b)/)
for(var i=0; i<m.length; ++i) {
if (typeof m[i]=='undefined') m[i]='';
}
ret.push(s.substring(0,m.index));
ret = ret.concat(m.slice(1));
s=s.substring(m.index + m[0].length);
m=re.exec(s);
}
ret.push(s);
return ret;
};
} else {
String.prototype.parenSplit=function (re) { return this.split(re); };
String.prototype.parenSplit.isNative=true;
}
function nonGlobalRegex(re) {
var s=re.toString();
flags='';
for (var j=s.length; s.charAt(j) != '/'; --j) {
if (s.charAt(j) != 'g') { flags += s.charAt(j); }
}
var t=s.substring(1,j);
return RegExp(t,flags);
}
// ENDFILE: parensplit.js
// STARTFILE: tools.js
// IE madness with encoding
// ========================
//
// suppose throughout that the page is in utf8, like wikipedia
//
// if a is an anchor DOM element and a.href should consist of
//
// http://host.name.here/wiki/foo?bar=baz
//
// then IE gives foo as "latin1-encoded" utf8; we have foo = decode_utf8(decodeURI(foo_ie))
// but IE gives bar=baz correctly as plain utf8
//
// ---------------------------------
//
// IE's xmlhttp doesn't understand utf8 urls. Have to use encodeURI here.
//
// ---------------------------------
//
// summat else
// Source: http://aktuell.de.selfhtml.org/artikel/javascript/utf8b64/utf8.htm
//<NOLITE>
function encode_utf8(rohtext) {
// dient der Normalisierung des Zeilenumbruchs
rohtext = rohtext.replace(/\r\n/g,"\n");
var utftext = "";
for(var n=0; n<rohtext.length; n++)
{
// ermitteln des Unicodes des aktuellen Zeichens
var c=rohtext.charCodeAt(n);
// alle Zeichen von 0-127 => 1byte
if (c<128)
utftext += String.fromCharCode(c);
// alle Zeichen von 127 bis 2047 => 2byte
else if((c>127) && (c<2048)) {
utftext += String.fromCharCode((c>>6)|192);
utftext += String.fromCharCode((c&63)|128);}
// alle Zeichen von 2048 bis 66536 => 3byte
else {
utftext += String.fromCharCode((c>>12)|224);
utftext += String.fromCharCode(((c>>6)&63)|128);
utftext += String.fromCharCode((c&63)|128);}
}
return utftext;
}
function getJsObj(json) {
try {
var json_ret = eval('(' + json + ')');
} catch (someError) {
errlog('Something went wrong with getJsobj, json='+json);
return 1;
}
if( json_ret['warnings'] ) {
for( var w=0; w < json_ret['warnings'].length; w++ ) {
log( json_ret['warnings'][w]['*'] );
}
} else if ( json_ret['error'] ) {
errlog( json_ret['error'].code + ': ' + json_ret['error'].info );
}
return json_ret;
}
function anyChild(obj) {
for (var p in obj) {
return obj[p];
}
return null;
}
//</NOLITE>
function decode_utf8(utftext) {
var plaintext = ""; var i=0, c=0, c1=0, c2=0;
// while-Schleife, weil einige Zeichen uebersprungen werden
while(i<utftext.length)
{
c = utftext.charCodeAt(i);
if (c<128) {
plaintext += String.fromCharCode(c);
i++;}
else if((c>191) && (c<224)) {
c2 = utftext.charCodeAt(i+1);
plaintext += String.fromCharCode(((c&31)<<6) | (c2&63));
i+=2;}
else {
c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2);
plaintext += String.fromCharCode(((c&15)<<12) | ((c2&63)<<6) | (c3&63));
i+=3;}
}
return plaintext;
}
function upcaseFirst(str) {
if (typeof str != typeof '' || str=='') return '';
return str.charAt(0).toUpperCase() + str.substring(1);
}
function findInArray(arr, foo) {
if (!arr || !arr.length) { return -1; }
var len=arr.length;
for (var i=0; i<len; ++i) { if (arr[i]==foo) { return i; } }
return -1;
}
function nextOne (array, value) {
// NB if the array has two consecutive entries equal
// then this will loop on successive calls
var i=findInArray(array, value);
if (i<0) { return null; }
return array[i+1];
}
function literalizeRegex(str){
return str.replace(RegExp('([-.|()\\\\+?*^${}\\[\\]])', 'g'), '\\$1');
}
String.prototype.entify=function() {
//var shy='­';
return this.split('&').join('&').split('<').join('<').split('>').join('>'/*+shy*/).split('"').join('"');
};
function findThis(array, value) {
if (typeof array.length == 'undefined') { return null; }
for (var i=0; i<array.length; ++i) {
if (array[i]==value) { return i; }
}
return null;
}
function removeNulls(list) {
var ret=[];
for (var i=0; i<list.length; ++i) {
if (list[i]) {
ret.push(list[i]);
}
}
return ret;
}
function joinPath(list) {
return removeNulls(list).join('/');
}
function simplePrintf(str, subs) {
if (!str || !subs) { return str; }
var ret=[];
var s=str.parenSplit(/(%s|\$[0-9]+)/);
var i=0;
do {
ret.push(s.shift());
if ( !s.length ) { break; }
var cmd=s.shift();
if (cmd == '%s') {
if ( i < subs.length ) { ret.push(subs[i]); } else { ret.push(cmd); }
++i;
} else {
var j=parseInt( cmd.replace('$', ''), 10 ) - 1;
if ( j > -1 && j < subs.length ) { ret.push(subs[j]); } else { ret.push(cmd); }
}
} while (s.length > 0);
return ret.join('');
}
function max(a,b){return a<b ? b : a;}
function min(a,b){return a>b ? b : a;}
function isString(x) { return (typeof x === 'string' || x instanceof String); }
//function isNumber(x) { return (typeof x === 'number' || x instanceof Number); }
function isRegExp(x) { return x instanceof RegExp; }
function isArray (x) { return x instanceof Array; }
function isObject(x) { return x instanceof Object; }
function isFunction(x) {
return !isRegExp(x) && (typeof x === 'function' || x instanceof Function);
}
function repeatString(s,mult) {
var ret='';
for (var i=0; i<mult; ++i) { ret += s; }
return ret;
}
function zeroFill(s, min) {
min = min || 2;
var t=s.toString();
return repeatString('0', min - t.length) + t;
}
function map(f, o) {
if (isArray(o)) { return map_array(f,o); }
return map_object(f,o);
}
function map_array(f,o) {
var ret=[];
for (var i=0; i<o.length; ++i) {
ret.push(f(o[i]));
}
return ret;
}
function map_object(f,o) {
var ret={};
for (var i in o) { ret[o]=f(o[i]); }
return ret;
}
pg.escapeQuotesHTML = function ( text ) { var re = new RegExp( '&', "g" ); text = text.replace( re, "&" ); re = new RegExp( '"', "g" ); text = text.replace( re, """ ); re = new RegExp( '<', "g" ); text = text.replace( re, "<" ); re = new RegExp( '>', "g" ); text = text.replace( re, ">" ); return text;}
pg.jsescape = function(s)
{
if (typeof s !== "string") throw "Invalid type in pg.jsescape";
var res = "";
//this can be optimized by copying substrings instead of char by char!
for (var i=0; i<s.length; i++)
{
var c = s[i];
switch (c)
{
case '\b': res += '\\b'; continue;
case '\f': res += '\\f'; continue;
case '\n': res += '\\n'; continue;
case '\0': res += '\\0'; continue;
case '\r': res += '\\r'; continue;
case '\t': res += '\\t'; continue;
case '\v': res += '\\v'; continue;
case '\\': res += '\\\\'; continue;
case '\"': res += '\\\"'; continue;
case '\'': res += '\\\''; continue;
continue;
default:
if (c < ' ' || c==='<' || c==='>' || c==="'")
{
var unicodeChar = c.charCodeAt(0).toString(16).toUpperCase();
res += "\\u" + (unicodeChar.length>1?"00":"000") + unicodeChar;
}
else
{
res += c;
}
}
}
return res;
}
// ENDFILE: tools.js
// STARTFILE: dab.js
//<NOLITE>
//////////////////////////////////////////////////
// Dab-fixing code
//
function retargetDab(newTarget, oldTarget, friendlyCurrentArticleName, titleToEdit) {
log('retargetDab: newTarget='+newTarget + ' oldTarget=' + oldTarget);
return changeLinkTargetLink(
{newTarget: newTarget,
text: newTarget.split(' ').join(' '),
hint: tprintf('disambigHint', [newTarget]),
summary: simplePrintf(
getValueOf('popupFixDabsSummary'), [friendlyCurrentArticleName, newTarget ]),
clickButton: 'wpDiff', minor: true, oldTarget: oldTarget,
watch: getValueOf('popupWatchDisambiggedPages'),
title: titleToEdit});
}
function listLinks(wikitext, oldTarget, titleToEdit) {
// mediawiki strips trailing spaces, so we do the same
// testcase: http://en.wikipedia.org/w/index.php?title=Radial&oldid=97365633
var reg=RegExp('\\[\\[([^|]*?) *(\\||\\]\\])', 'gi');
var ret=[];
var splitted=wikitext.parenSplit(reg);
// ^[a-z]+ should match interwiki links, hopefully (case-insensitive)
// and ^[a-z]* should match those and [[:Category...]] style links too
var omitRegex=RegExp('^[a-z]*:|^[Ss]pecial:|^[Ii]mage|^[Cc]ategory');
var friendlyCurrentArticleName= oldTarget.toString();
var wikPos = getValueOf('popupDabWiktionary');
for (var i=1; i<splitted.length; i=i+3) {
if (typeof splitted[i] == typeof 'string' && splitted[i].length>0 && !omitRegex.test(splitted[i])) {
ret.push( retargetDab(splitted[i], oldTarget, friendlyCurrentArticleName, titleToEdit) );
} /* if */
} /* for loop */
ret = rmDupesFromSortedList(ret.sort());
if (wikPos) {
var wikTarget='wiktionary:' +
friendlyCurrentArticleName.replace( RegExp('^(.+)\\s+[(][^)]+[)]\\s*$'), '$1' );
var meth;
if (wikPos.toLowerCase() == 'first') { meth = 'unshift'; }
else { meth = 'push'; }
ret[meth]( retargetDab(wikTarget, oldTarget, friendlyCurrentArticleName, titleToEdit) );
}
ret.push(changeLinkTargetLink(
{ newTarget: null,
text: popupString('remove this link').split(' ').join(' '),
hint: popupString("remove all links to this disambig page from this article"),
clickButton: "wpDiff", oldTarget: oldTarget,
summary: simplePrintf(getValueOf('popupRmDabLinkSummary'), [friendlyCurrentArticleName]),
watch: getValueOf('popupWatchDisambiggedPages'),
title: titleToEdit
}));
return ret;
}
function rmDupesFromSortedList(list) {
var ret=[];
for (var i=0; i<list.length; ++i) {
if (ret.length===0 || list[i]!=ret[ret.length-1]) { ret.push(list[i]); }
}
return ret;
}
function makeFixDab(data, navpop) {
// grab title from parent popup if there is one; default exists in changeLinkTargetLink
var titleToEdit=(navpop.parentPopup && navpop.parentPopup.article.toString());
var list=listLinks(data, navpop.originalArticle, titleToEdit);
if (list.length===0) { log('listLinks returned empty list'); return null; }
var html='<hr>' + popupString('Click to disambiguate this link to:') + '<br>';
html+=list.join(', ');
return html;
}
function makeFixDabs(wikiText, navpop) {
if (getValueOf('popupFixDabs') && isDisambig(wikiText, navpop.article) &&
Title.fromURL(location.href).namespaceId() != pg.nsSpecialId &&
navpop.article.talkPage() ) {
setPopupHTML(makeFixDab(wikiText, navpop), 'popupFixDab', navpop.idNumber);
}
}
function popupRedlinkHTML(article) {
return changeLinkTargetLink(
{ newTarget: null, text: popupString('remove this link').split(' ').join(' '),
hint: popupString("remove all links to this page from this article"),
clickButton: "wpDiff",
oldTarget: article.toString(),
summary: simplePrintf(getValueOf('popupRedlinkSummary'), [article.toString()])});
}
//</NOLITE>
// ENDFILE: dab.js
// STARTFILE: htmloutput.js
function appendPopupContent(obj, elementId, popupId, onSuccess) {
return setPopupHTML(obj, elementId, popupId, onSuccess, true);
}
// this has to use a timer loop as we don't know if the DOM element exists when we want to set the text
function setPopupHTML (str, elementId, popupId, onSuccess, append) {
if (elementId=='popupPreview') {
}
if (typeof popupId === 'undefined') {
//console.error('popupId is not defined in setPopupHTML, html='+str.substring(0,100));
popupId = pg.idNumber;
}
var popupElement=document.getElementById(elementId+popupId);
if (popupElement) {
if (!append) { popupElement.innerHTML=''; }
if (isString(str)) {
popupElement.innerHTML+=str;
} else {
popupElement.appendChild(str);
}
if (onSuccess) { onSuccess(); }
setTimeout(checkPopupPosition, 100);
return true;
} else {
// call this function again in a little while...
setTimeout(function(){
setPopupHTML(str,elementId,popupId,onSuccess);
}, 600);
}
return null;
}
//<NOLITE>
function setPopupTrailer(str,id) {return setPopupHTML(str, 'popupData', id);}
//</NOLITE>
function fillEmptySpans(args) { return fillEmptySpans2(args); }
// args.navpopup is mandatory
// optional: args.redir, args.redirTarget
// FIXME: ye gods, this is ugly stuff
function fillEmptySpans2(args) { // if redir is present and true then redirTarget is mandatory
var redir=true;
if (typeof args != 'object' || typeof args.redir == 'undefined' || !args.redir) { redir=false; }
var a=args.navpopup.parentAnchor;
var article, hint=null, oldid=null, params={};
if (redir && typeof args.redirTarget == typeof {}) {
article=args.redirTarget;
//hint=article.hintValue();
} else {
article=(new Title()).fromAnchor(a);
hint=a.originalTitle || article.hintValue();
params=parseParams(a.href);
oldid=(getValueOf('popupHistoricalLinks')) ? params.oldid : null;
rcid=params.rcid;
}
var x={ article:article, hint: hint, oldid: oldid, rcid: rcid, navpop:args.navpopup, params:params };
var structure=pg.structures[getValueOf('popupStructure')];
if (typeof structure != 'object') {
setPopupHTML('popupError', 'Unknown structure (this should never happen): '+
pg.option.popupStructure, args.navpopup.idNumber);
return;
}
var spans=flatten(pg.misc.layout);
var numspans = spans.length;
var redirs=pg.misc.redirSpans;
for (var i=0; i<numspans; ++i) {
var f=findThis(redirs, spans[i]);
//log('redir='+redir+', f='+f+', spans[i]='+spans[i]);
if ( (f!==null && !redir) || (f===null && redir) ) {
//log('skipping this set of the loop');
continue;
}
var structurefn=structure[spans[i]];
var setfn = setPopupHTML;
if (getValueOf('popupActiveNavlinks') &&
(spans[i].indexOf('popupTopLinks')==0 || spans[i].indexOf('popupRedirTopLinks')==0)
) {
setfn = setPopupTipsAndHTML;
}
switch (typeof structurefn) {
case 'function':
//log('running '+spans[i]+'({article:'+x.article+', hint:'+x.hint+', oldid: '+x.oldid+'})');
setfn(structurefn(x), spans[i], args.navpopup.idNumber);
break;
case 'string':
setfn(structurefn, spans[i], args.navpopup.idNumber);
break;
default:
errlog('unknown thing with label '+spans[i]);
break;
}
}
}
// flatten an array
function flatten(list, start) {
var ret=[];
if (typeof start == 'undefined') { start=0; }
for (var i=start; i<list.length; ++i) {
if (typeof list[i] == typeof []) {
return ret.concat(flatten(list[i])).concat(flatten(list, i+1));
}
else { ret.push(list[i]); }
}
return ret;
}
// Generate html for whole popup
function popupHTML (a) {
getValueOf('popupStructure');
var structure=pg.structures[pg.option.popupStructure];
if (typeof structure != 'object') {
//return 'Unknown structure: '+pg.option.popupStructure;
// override user choice
pg.option.popupStructure=pg.optionDefault.popupStructure;
return popupHTML(a);
}
if (typeof structure.popupLayout != 'function') { return 'Bad layout'; }
pg.misc.layout=structure.popupLayout();
if (typeof structure.popupRedirSpans == 'function') { pg.misc.redirSpans=structure.popupRedirSpans(); }
else { pg.misc.redirSpans=[]; }
return makeEmptySpans(pg.misc.layout, a.navpopup);
}
function makeEmptySpans (list, navpop) {
var ret='';
for (var i=0; i<list.length; ++i) {
if (typeof list[i] == typeof '') {
ret += emptySpanHTML(list[i], navpop.idNumber, 'div');
} else if (typeof list[i] == typeof [] && list[i].length > 0 ) {
ret = ret.parenSplit(RegExp('(</[^>]*?>$)')).join(makeEmptySpans(list[i], navpop));
} else if (typeof list[i] == typeof {} && list[i].nodeType ) {
ret += emptySpanHTML(list[i].name, navpop.idNumber, list[i].nodeType);
}
}
return ret;
}
function emptySpanHTML(name, id, tag, classname) {
tag = tag || 'span';
if (!classname) { classname = emptySpanHTML.classAliases[name]; }
classname = classname || name;
if (name == getValueOf('popupDragHandle')) { classname += ' popupDragHandle'; }
return simplePrintf('<%s id="%s" class="%s"></%s>', [tag, name + id, classname, tag]);
}
emptySpanHTML.classAliases={ 'popupSecondPreview': 'popupPreview' };
// generate html for popup image
// <a id="popupImageLinkn"><img id="popupImagen">
// where n=idNumber
function imageHTML(article, idNumber) {
return simplePrintf('<a id="popupImageLink$1">' +
'<img align="right" valign="top" id="popupImg$1" style="display: none;"></img>' +
'</a>', [ idNumber ]);
}
function popTipsSoonFn(id, when, popData) {
when || ( when=250 );
var popTips=function(){ setupTooltips(document.getElementById(id), false, true, popData); };
return function() { setTimeout( popTips, when, popData ); };
}
function setPopupTipsAndHTML(html, divname, idnumber, popData) {
setPopupHTML(html, divname, idnumber,
getValueOf('popupSubpopups') ?
popTipsSoonFn(divname + idnumber, null, popData) :
null);
}
// ENDFILE: htmloutput.js
// STARTFILE: mouseout.js
//////////////////////////////////////////////////
// fuzzy checks
function fuzzyCursorOffMenus(x,y, fuzz, parent) {
if (!parent) { return null; }
var uls=parent.getElementsByTagName('ul');
for (var i=0; i<uls.length; ++i) {
if (uls[i].className=='popup_menu') {
if (uls[i].offsetWidth > 0) return false;
} // else {document.title+='.';}
}
return true;
}
function checkPopupPosition () { // stop the popup running off the right of the screen
// FIXME avoid pg.current.link
pg.current.link && pg.current.link.navpopup &&
pg.current.link.navpopup.limitHorizontalPosition();
}
function mouseOutWikiLink () {
if (!window.popupsReady || !window.popupsReady()) { return; }
//console ('mouseOutWikiLink');
var a=this;
if (a.navpopup==null) return;
if ( ! a.navpopup.isVisible() ) {
a.navpopup.banish();
return;
}
restoreTitle(a);
Navpopup.tracker.addHook(posCheckerHook(a.navpopup));
}
function posCheckerHook(navpop) {
return function() {
if (!navpop.isVisible()) { return true; /* remove this hook */ }
if (Navpopup.tracker.dirty) {
return false;
}
var x=Navpopup.tracker.x, y=Navpopup.tracker.y;
var mouseOverNavpop = navpop.isWithin(x,y,navpop.fuzz, navpop.mainDiv) ||
!fuzzyCursorOffMenus(x,y,navpop.fuzz, navpop.mainDiv);
// FIXME it'd be prettier to do this internal to the Navpopup objects
var t=getValueOf('popupHideDelay');
if (t) { t = t * 1000; }
if (!t) {
if(!mouseOverNavpop) {
if(navpop.parentAnchor) {
restoreTitle( navpop.parentAnchor );
}
navpop.banish();
return true; /* remove this hook */
}
return false;
}
// we have a hide delay set
var d=+(new Date());
if ( !navpop.mouseLeavingTime ) {
navpop.mouseLeavingTime = d;
return false;
}
if ( mouseOverNavpop ) {
navpop.mouseLeavingTime=null;
return false;
}
if (d - navpop.mouseLeavingTime > t) {
navpop.mouseLeavingTime=null;
navpop.banish(); return true; /* remove this hook */
}
return false;
};
}
function runStopPopupTimer(navpop) {
// at this point, we should have left the link but remain within the popup
// so we call this function again until we leave the popup.
if (!navpop.stopPopupTimer) {
navpop.stopPopupTimer=setInterval(posCheckerHook(navpop), 500);
navpop.addHook(function(){clearInterval(navpop.stopPopupTimer);},
'hide', 'before');
}
}
// ENDFILE: mouseout.js
// STARTFILE: previewmaker.js
/**
@fileoverview
Defines the {@link Previewmaker} object, which generates short previews from wiki markup.
*/
/**
Creates a new Previewmaker
@constructor
@class The Previewmaker class. Use an instance of this to generate short previews from Wikitext.
@param {String} wikiText The Wikitext source of the page we wish to preview.
@param {String} baseUrl The url we should prepend when creating relative urls.
@param {Navpopup} owner The navpop associated to this preview generator
*/
function Previewmaker(wikiText, baseUrl, owner) {
/** The wikitext which is manipulated to generate the preview. */
this.originalData=wikiText;
this.setData();
this.baseUrl=baseUrl;
this.owner=owner;
this.maxCharacters=getValueOf('popupMaxPreviewCharacters');
this.maxSentences=getValueOf('popupMaxPreviewSentences');
}
Previewmaker.prototype.setData=function() {
var maxSize=max(10000, 2*this.maxCharacters);
this.data=this.originalData.substring(0,maxSize);
};
/** Remove HTML comments
@private
*/
Previewmaker.prototype.killComments = function () {
// this also kills one trailing newline, eg [[diamyo]]
this.data=this.data.replace(RegExp('<!--[\\s\\S]*?-->\\n?', 'g'), '');
};
/**
@private
*/
Previewmaker.prototype.killDivs = function () {
// say goodbye, divs (can be nested, so use * not *?)
this.data=this.data.replace(RegExp('< *div[^>]* *>[\\s\\S]*?< */ *div *>',
'gi'), '');
};
/**
@private
*/
Previewmaker.prototype.killGalleries = function () {
this.data=this.data.replace(RegExp('< *gallery[^>]* *>[\\s\\S]*?< */ *gallery *>',
'gi'), '');
};
/**
@private
*/
Previewmaker.prototype.kill = function(opening, closing, subopening, subclosing, repl) {
var oldk=this.data;
var k=this.killStuff(this.data, opening, closing, subopening, subclosing, repl);
while (k.length < oldk.length) {
oldk=k;
k=this.killStuff(k, opening, closing, subopening, subclosing, repl);
}
this.data=k;
};
/**
@private
*/
Previewmaker.prototype.killStuff = function (txt, opening, closing, subopening, subclosing, repl) {
var op=this.makeRegexp(opening);
var cl=this.makeRegexp(closing, '^');
var sb=subopening ? this.makeRegexp(subopening, '^') : null;
var sc=subclosing ? this.makeRegexp(subclosing, '^') : cl;
if (!op || !cl) {
alert('Navigation Popups error: op or cl is null! something is wrong.');
return;
}
if (!op.test(txt)) { return txt; }
var ret='';
var opResult = op.exec(txt);
ret = txt.substring(0,opResult.index);
txt=txt.substring(opResult.index+opResult[0].length);
var depth = 1;
while (txt.length > 0) {
var removal=0;
if (depth==1 && cl.test(txt)) {
depth--;
removal=cl.exec(txt)[0].length;
} else if (depth > 1 && sc.test(txt)) {
depth--;
removal=sc.exec(txt)[0].length;
}else if (sb && sb.test(txt)) {
depth++;
removal=sb.exec(txt)[0].length;
}
if ( !removal ) { removal = 1; }
txt=txt.substring(removal);
if (depth==0) { break; }
}
return ret + (repl || '') + txt;
};
/**
@private
*/
Previewmaker.prototype.makeRegexp = function (x, prefix, suffix) {
prefix = prefix || '';
suffix = suffix || '';
var reStr='';
var flags='';
if (isString(x)) {
reStr=prefix + literalizeRegex(x) + suffix;
} else if (isRegExp(x)) {
var s=x.toString().substring(1);
var sp=s.split('/');
flags=sp[sp.length-1];
sp[sp.length-1]='';
s=sp.join('/');
s=s.substring(0,s.length-1);
reStr= prefix + s + suffix;
} else {
log ('makeRegexp failed');
}
log ('makeRegexp: got reStr=' + reStr + ', flags=' + flags);
return RegExp(reStr, flags);
};
/**
@private
*/
Previewmaker.prototype.killBoxTemplates = function () {
// taxobox removal... in fact, there's a saudiprincebox_begin, so let's be more general
// also, have float_begin, ... float_end
this.kill(RegExp('[{][{][^{}\\s|]*?(float|box)[_ ](begin|start)', 'i'), /[}][}]\s*/, '{{');
// infoboxes etc
// from [[User:Zyxw/popups.js]]: kill frames too
this.kill(RegExp('[{][{][^{}\\s|]*?(infobox|elementbox|frame)[_ ]', 'i'), /[}][}]\s*/, '{{');
};
/**
@private
*/
Previewmaker.prototype.killTemplates = function () {
this.kill('{{', '}}', '{', '}', ' ');
};
/**
@private
*/
Previewmaker.prototype.killTables = function () {
// tables are bad, too
// this can be slow, but it's an inprovement over a browser hang
// torture test: [[Comparison_of_Intel_Central_Processing_Units]]
this.kill('{|', /[|]}\s*/, '{|');
this.kill(/<table.*?>/i, /<\/table.*?>/i, /<table.*?>/i);
// remove lines starting with a pipe for the hell of it (?)
this.data=this.data.replace(RegExp('^[|].*$', 'mg'), '');
};
/**
@private
*/
Previewmaker.prototype.killImages = function () {
var forbiddenNamespaceAliases = [];
jQuery.each(mw.config.get('wgNamespaceIds'), function(_localizedNamespaceLc, _namespaceId) {
if (_namespaceId!=pg.nsImageId && _namespaceId!=pg.nsCategoryId) return;
forbiddenNamespaceAliases.push(_localizedNamespaceLc.split(' ').join('[ _]')); //todo: escape regexp fragments!
});
// images and categories are a nono
this.kill(RegExp('[[][[]\\s*(' + forbiddenNamespaceAliases.join('|') + ')\\s*:', 'i'),
/\]\]\s*/, '[', ']');
};
/**
@private
*/
Previewmaker.prototype.killHTML = function () {
// kill <ref ...>...</ref>
this.kill(/<ref\b[^/>]*?>/i, /<\/ref>/i);
// let's also delete entire lines starting with <. it's worth a try.
this.data=this.data.replace(RegExp('(^|\\n) *<.*', 'g'), '\n');
// and those pesky html tags, but not <nowiki> or <blockquote>
var splitted=this.data.parenSplit(/(<[\w\W]*?(?:>|$|(?=<)))/);
var len=splitted.length;
for (var i=1; i<len; i=i+2) {
switch (splitted[i]) {
case '<nowiki>':
case '</nowiki>':
case '<blockquote>':
case '</blockquote>':
break;
default:
splitted[i]='';
}
}
this.data=splitted.join('');
};
/**
@private
*/
Previewmaker.prototype.killChunks = function() { // heuristics alert
// chunks of italic text? you crazy, man?
var italicChunkRegex=new RegExp
("((^|\\n)\\s*:*\\s*''[^']([^']|'''|'[^']){20}(.|\\n[^\\n])*''[.!?\\s]*\\n)+", 'g');
// keep stuff separated, though, so stick in \n (fixes [[Union Jack]]?
this.data=this.data.replace(italicChunkRegex, '\n');
};
/**
@private
*/
Previewmaker.prototype.mopup = function () {
// we simply *can't* be doing with horizontal rules right now
this.data=this.data.replace(RegExp('^-{4,}','mg'),'');
// no indented lines
this.data=this.data.replace(RegExp('(^|\\n) *:[^\\n]*','g'), '');
// replace __TOC__, __NOTOC__ and whatever else there is
// this'll probably do
this.data=this.data.replace(RegExp('^__[A-Z_]*__ *$', 'gmi'),'');
};
/**
@private
*/
Previewmaker.prototype.firstBit = function () {
// dont't be givin' me no subsequent paragraphs, you hear me?
/// first we "normalize" section headings, removing whitespace after, adding before
var d=this.data;
if (getValueOf('popupPreviewCutHeadings')) {
this.data=this.data.replace(RegExp('\\s*(==+[^=]*==+)\\s*', 'g'), '\n\n$1 ');
/// then we want to get rid of paragraph breaks whose text ends badly
this.data=this.data.replace(RegExp('([:;]) *\\n{2,}', 'g'), '$1\n');
this.data=this.data.replace(RegExp('^[\\s\\n]*'), '');
stuff=(RegExp('^([^\\n]|\\n[^\\n\\s])*')).exec(this.data);
if (stuff) { d = stuff[0]; }
if (!getValueOf('popupPreviewFirstParOnly')) { d = this.data; }
/// now put \n\n after sections so that bullets and numbered lists work
d=d.replace(RegExp('(==+[^=]*==+)\\s*', 'g'), '$1\n\n');
}
// Split sentences. Superfluous sentences are RIGHT OUT.
// note: exactly 1 set of parens here needed to make the slice work
d = d.parenSplit(RegExp('([!?.]+["'+"'"+']*\\s)','g'));
// leading space is bad, mmkay?
d[0]=d[0].replace(RegExp('^\\s*'), '');
var notSentenceEnds=RegExp('([^.][a-z][.] *[a-z]|etc|sic|Dr|Mr|Mrs|Ms|St|no|op|cit|\\[[^\\]]*|\\s[A-Zvclm])$', 'i');
d = this.fixSentenceEnds(d, notSentenceEnds);
this.fullLength=d.join('').length;
var maxChars=getValueOf('popupMaxPreviewCharacters') + this.extraCharacters;
var n=this.maxSentences;
var dd=this.firstSentences(d,n);
do {
dd=this.firstSentences(d,n); --n;
} while ( dd.length > this.maxCharacters && n != 0 );
this.data = dd;
};
/**
@private
*/
Previewmaker.prototype.fixSentenceEnds = function(strs, reg) {
// take an array of strings, strs
// join strs[i] to strs[i+1] & strs[i+2] if strs[i] matches regex reg
var abbrevRe=/\b[a-z][^a-z]*$/i;
for (var i=0; i<strs.length-2; ++i) {
if (reg.test(strs[i])) {
a=[];
for (var j=0; j<strs.length; ++j) {
if (j<i) a[j]=strs[j];
if (j==i) a[i]=strs[i]+strs[i+1]+strs[i+2];
if (j>i+2) a[j-2]=strs[j];
}
return this.fixSentenceEnds(a,reg);
}
// BUGGY STUFF - trying to fix up [[S. C. Johnson & Son]] preview
if (false && abbrevRe.test(strs[i])) {
var j=i, buf='';
do {
buf=buf+strs[i]+strs[i+1];
i=i+2;
} while (i<strs.length-2 && abbrevRe.test(strs[i]));
strs[i]=buf+strs[i];
var a=(j?strs.slice(0,j-1):[]).concat(strs.slice(i));
return this.fixSentenceEnds(a,reg);
}
}
return strs;
};
/**
@private
*/
Previewmaker.prototype.firstSentences = function(strs, howmany) {
var t=strs.slice(0, 2*howmany);
return t.join('');
};
/**
@private
*/
Previewmaker.prototype.killBadWhitespace = function() {
// also cleans up isolated '''', eg [[Suntory Sungoliath]]
this.data=this.data.replace(RegExp('^ *\'+ *$', 'gm'), '');
};
/**
Runs the various methods to generate the preview.
The preview is stored in the <code>html</html> field.
@private
*/
Previewmaker.prototype.makePreview = function() {
if (this.owner.article.namespaceId()!=pg.nsTemplateId &&
this.owner.article.namespaceId()!=pg.nsImageId ) {
this.killComments();
this.killDivs();
this.killGalleries();
this.killBoxTemplates();
if (getValueOf('popupPreviewKillTemplates')) {
this.killTemplates();
} else {
this.killMultilineTemplates();
}
this.killTables();
this.killImages();
this.killHTML();
this.killChunks();
this.mopup();
this.firstBit();
this.killBadWhitespace();
}
else
{
this.killHTML();
}
this.html=wiki2html(this.data, this.baseUrl); // needs livepreview
this.fixHTML();
this.stripLongTemplates();
};
/**
@private
*/
Previewmaker.prototype.esWiki2HtmlPart = function(data) {
var reLinks = /(?:\[\[([^|\]]*)(?:\|([^|\]]*))*]]([a-z]*))/gi; //match a wikilink
reLinks.lastIndex = 0; //reset regex
var match;
var result = "";
var postfixIndex = 0;
while ((match = reLinks.exec(data)) != null) //match all wikilinks
{
//FIXME: the way that link is built here isn't perfect. It is clickable, but popups preview won't recognize it in some cases.
result += pg.escapeQuotesHTML(data.substring(postfixIndex, match.index)) +
'<a href="'+Insta.conf.paths.articles+pg.escapeQuotesHTML(match[1])+'">'+pg.escapeQuotesHTML((match[2]?match[2]:match[1])+match[3])+"</a>";
postfixIndex = reLinks.lastIndex;
}
//append the rest
result += pg.escapeQuotesHTML(data.substring(postfixIndex));
return result;
};
Previewmaker.prototype.editSummaryPreview=function() {
var reAes = /\/\* *(.*?) *\*\//g; //match the first section marker
reAes.lastIndex = 0; //reset regex
var match;
match = reAes.exec(this.data);
if (match)
{
//we have a section link. Split it, process it, combine it.
var prefix = this.data.substring(0,match.index-1);
var section = match[1];
var postfix = this.data.substring(reAes.lastIndex);
var start = "<span class='autocomment'>";
var end = "</span>";
if (prefix.length>0) start = this.esWiki2HtmlPart(prefix) + " " + start + "- ";
if (postfix.length>0) end = ": " + end + this.esWiki2HtmlPart(postfix);
var t=new Title().fromURL(this.baseUrl);
t.anchorFromUtf(section);
var sectionLink = Insta.conf.paths.articles + pg.escapeQuotesHTML(t.toString(true)) + '#' + pg.escapeQuotesHTML(t.anchor);
return start + '<a href="'+sectionLink+'">→</a> '+pg.escapeQuotesHTML(section) + end;
}
//else there's no section link, htmlify the whole thing.
return this.esWiki2HtmlPart(this.data);
};
//<NOLITE>
/** Test function for debugging preview problems one step at a time.
*/
function previewSteps(txt) {
try {
txt=txt || document.editform.wpTextbox1.value;
} catch (err) {
if (pg.cache.pages.length > 0) {
txt=pg.cache.pages[pg.cache.pages.length-1].data;
} else {
alert('provide text or use an edit page');
}
}
txt=txt.substring(0,10000);
var base=pg.wiki.articlebase + Title.fromURL(document.location.href).urlString();
var p=new Previewmaker(txt, base, pg.current.link.navpopup);
if (this.owner.article.namespaceId() != pg.nsTemplateId) {
p.killComments(); if (!confirm('done killComments(). Continue?\n---\n' + p.data)) { return; }
p.killDivs(); if (!confirm('done killDivs(). Continue?\n---\n' + p.data)) { return; }
p.killGalleries(); if (!confirm('done killGalleries(). Continue?\n---\n' + p.data)) { return; }
p.killBoxTemplates(); if (!confirm('done killBoxTemplates(). Continue?\n---\n' + p.data)) { return; }
if (getValueOf('popupPreviewKillTemplates')) {
p.killTemplates(); if (!confirm('done killTemplates(). Continue?\n---\n' + p.data)) { return; }
} else {
p.killMultilineTemplates(); if (!confirm('done killMultilineTemplates(). Continue?\n---\n' + p.data)) { return; }
}
p.killTables(); if (!confirm('done killTables(). Continue?\n---\n' + p.data)) { return; }
p.killImages(); if (!confirm('done killImages(). Continue?\n---\n' + p.data)) { return; }
p.killHTML(); if (!confirm('done killHTML(). Continue?\n---\n' + p.data)) { return; }
p.killChunks(); if (!confirm('done killChunks(). Continue?\n---\n' + p.data)) { return; }
p.mopup(); if (!confirm('done mopup(). Continue?\n---\n' + p.data)) { return; }
p.firstBit(); if (!confirm('done firstBit(). Continue?\n---\n' + p.data)) { return; }
p.killBadWhitespace(); if (!confirm('done killBadWhitespace(). Continue?\n---\n' + p.data)) { return; }
}
p.html=wiki2html(p.data, base); // needs livepreview
p.fixHTML(); if (!confirm('done fixHTML(). Continue?\n---\n' + p.html)) { return; }
p.stripLongTemplates(); if (!confirm('done stripLongTemplates(). Continue?\n---\n' + p.html)) { return; }
alert('finished preview - end result follows.\n---\n' + p.html);
}
//</NOLITE>
/**
Works around livepreview bugs.
@private
*/
Previewmaker.prototype.fixHTML = function() {
if(!this.html) return;
var ret = this.html;
// fix question marks in wiki links
// maybe this'll break some stuff :-(
ret=ret.replace(RegExp('\(<a href="' + pg.wiki.articlePath + '/[^"]*\)[?]\(.*?"\)', 'g'), '$1%3F$2');
ret=ret.replace(RegExp('\(<a href=\'' + pg.wiki.articlePath + '/[^\']*\)[?]\(.*?\'\)', 'g'), '$1%3F$2');
// FIXME fix up % too
this.html=ret;
};
/**
Generates the preview and displays it in the current popup.
Does nothing if the generated preview is invalid or consists of whitespace only.
Also activates wikilinks in the preview for subpopups if the popupSubpopups option is true.
*/
Previewmaker.prototype.showPreview = function () {
this.makePreview();
if (typeof this.html != typeof '') return;
if (RegExp('^\\s*$').test(this.html)) return;
setPopupHTML('<hr>', 'popupPrePreviewSep', this.owner.idNumber);
setPopupTipsAndHTML(this.html, 'popupPreview', this.owner.idNumber, { owner: this.owner });
var more = (this.fullLength > this.data.length) ? this.moreLink() : '';
setPopupHTML(more, 'popupPreviewMore', this.owner.idNumber);
};
/**
@private
*/
Previewmaker.prototype.moreLink=function() {
var a=document.createElement('a');
a.className='popupMoreLink';
a.innerHTML=popupString('more...');
var savedThis=this;
a.onclick=function() {
savedThis.maxCharacters+=2000;
savedThis.maxSentences+=20;
savedThis.setData();
savedThis.showPreview();
}
return a;
}
/**
@private
*/
Previewmaker.prototype.stripLongTemplates = function() {
// operates on the HTML!
this.html=this.html.replace(RegExp('^.{0,1000}[{][{][^}]*?(<(p|br)( /)?>\\s*){2,}([^{}]*?[}][}])?', 'gi'), '');
this.html=this.html.split('\n').join(' '); // workaround for <pre> templates
this.html=this.html.replace(RegExp('[{][{][^}]*<pre>[^}]*[}][}]','gi'), '');
};
/**
@private
*/
Previewmaker.prototype.killMultilineTemplates = function() {
this.kill('{{{', '}}}');
this.kill(RegExp('\\s*[{][{][^{}]*\\n'), '}}', '{{');
};
// ENDFILE: previewmaker.js
// STARTFILE: querypreview.js
function loadAPIPreview(queryType, article, navpop) {
var art=new Title(article).urlString();
var url=pg.wiki.apiwikibase + '?format=json&action=query&';
var htmlGenerator=function(a,d){alert('invalid html generator');};
switch (queryType) {
case 'history':
url += 'meta=userinfo&uiprop=options&titles=' + art + '&prop=revisions&rvlimit=' +
getValueOf('popupHistoryPreviewLimit');
htmlGenerator=APIhistoryPreviewHTML;
break;
case 'category':
url += 'list=categorymembers&cmtitle=' + art;
htmlGenerator=APIcategoryPreviewHTML;
break;
case 'userinfo':
var username = new Title( article ).userName();
var usernameart = encodeURIComponent( username );
if (pg.re.ipUser.test(username)) {
url += 'list=blocks&bkprop=range&bkip=' + usernameart;
} else {
url += 'list=users&usprop=blockinfo|groups|editcount|registration&ususers=' + usernameart + "&meta=globaluserinfo&guiprop=groups|unattached&guiuser="+ usernameart;
}
htmlGenerator=APIuserInfoPreviewHTML;
break;
case 'contribs':
var usernameart = encodeURIComponent( new Title( article ).userName() );
url += 'list=usercontribs&meta=userinfo&uiprop=options&ucuser=' + usernameart +
'&uclimit=' + getValueOf('popupContribsPreviewLimit');
htmlGenerator=APIcontribsPreviewHTML;
break;
case 'imagepagepreview':
var trail='';
if (getValueOf('popupImageLinks')) { trail = '&list=imageusage&iutitle=' + art; }
url += 'titles=' + art + '&prop=revisions|imageinfo&rvprop=content' + trail;
htmlGenerator=APIimagepagePreviewHTML;
break;
case 'backlinks':
url += 'list=backlinks&bltitle=' + art;
htmlGenerator=APIbacklinksPreviewHTML;
break;
}
pendingNavpopTask(navpop);
if( !window.wgEnableAPI || !wgEnableAPI ) {
/* The API is not available */
htmlGenerator=function(a,d){
return 'This function of navigation popups now requires a MediaWiki ' +
'installation with the <a href="http://www.mediawiki.org/wiki/API">API</a> enabled.'; };
}
var callback=function(d){
log( "callback of API functions was hit" );
showAPIPreview(queryType, htmlGenerator(article,d,navpop), navpop.idNumber, navpop, d);
};
if (pg.flag.isIE) {
url = url + '&*'; //to circumvent https://bugzilla.wikimedia.org/show_bug.cgi?id=28840
}
var go = function(){
getPageWithCaching(url, callback, navpop);
return true;
}
if (navpop.visible || !getValueOf('popupLazyDownloads')) { go(); }
else { navpop.addHook(go, 'unhide', 'before', 'DOWNLOAD_'+queryType+'_QUERY_DATA'); }
}
function linkList(list) {
list.sort(function(x,y) { return (x==y ? 0 : (x<y ? -1 : 1)); });
var buf=[];
for (var i=0; i<list.length; ++i) {
buf.push(wikiLink({article: new Title(list[i]),
text: list[i].split(' ').join(' '),
action: 'view'}));
}
return buf.join(', ');
}
function getTimeOffset(tz) {
if( tz ) {
if( tz.indexOf('|') > -1 ) {
// New format
return parseInt(tz.split('|')[1],10);
} else if ( tz.indexOf(':') > -1 ) {
// Old format
return( parseInt(tz,10)*60 + parseInt(tz.split(':')[1],10) );
}
}
return 0;
}
function editPreviewTable(article, h, reallyContribs, timeOffset) {
var html=['<table>'];
var day=null;
var curart=article;
for (var i=0; i<h.length; ++i) {
if (reallyContribs) {
var page=h[i]['title']; curart = new Title(page);
}
var minor=typeof h[i]['minor']=='undefined' ? '' : '<b>m </b>';
var editDate=adjustDate(getDateFromTimestamp(h[i].timestamp), timeOffset);
var thisDay = dayFormat(editDate);
var thisTime = timeFormat(editDate);
if (thisDay==day) { thisDay=''; }
else { day=thisDay; }
if (thisDay) {
html.push( '<tr><td colspan=3><span class="popup_history_date">' +
thisDay+'</span></td></tr>' );
}
html.push('<tr class="popup_history_row_' + ( (i%2) ? 'odd' : 'even') + '">');
html.push('<td>(<a href="' + pg.wiki.titlebase + new Title(curart).urlString() +
'&diff=prev&oldid=' + h[i]['revid'] + '">' + popupString('last') + '</a>)</td>');
html.push('<td>' +
'<a href="' + pg.wiki.titlebase + new Title(curart).urlString() +
'&oldid=' + h[i]['revid'] + '">' + thisTime + '</a></td>');
var col3url='', col3txt='';
if (!reallyContribs) {
var user=h[i]['user'];
if( typeof h[i]['userhidden'] == "undefined" ) {
if( pg.re.ipUser.test(user) ) {
col3url=pg.wiki.titlebase + mw.config.get('wgFormattedNamespaces')[pg.nsSpecialId] + ':Contributions&target=' + new Title(user).urlString();
} else {
col3url=pg.wiki.titlebase + mw.config.get('wgFormattedNamespaces')[pg.nsUserId] + ':' + new Title(user).urlString();
}
col3txt=pg.escapeQuotesHTML(user);
} else {
col3url=getValueOf('popupRevDelUrl');
col3txt=pg.escapeQuotesHTML( popupString('revdel'));
}
} else {
col3url=pg.wiki.titlebase + curart.urlString();
col3txt=pg.escapeQuotesHTML(page);
}
html.push('<td>' + (reallyContribs ? minor : '') +
'<a href="' + col3url + '">' + col3txt + '</a></td>');
var comment='';
var c=h[i].comment || h[i]['*'];
if (c) {
comment=new Previewmaker(c, new Title(curart).toUrl()).editSummaryPreview();
} else if (typeof h[i]['commenthidden'] != "undefined" ) {
comment=popupString('revdel');
}
html.push('<td>' + (!reallyContribs ? minor : '') + comment + '</td>');
html.push('</tr>');
html=[html.join('')];
}
html.push('</table>');
return html.join('');
}
function getDateFromTimestamp(t) {
var s=t.split(/[^0-9]/);
switch(s.length) {
case 0: return null;
case 1: return new Date(s[0]);
case 2: return new Date(s[0], s[1]-1);
case 3: return new Date(s[0], s[1]-1, s[2]);
case 4: return new Date(s[0], s[1]-1, s[2], s[3]);
case 5: return new Date(s[0], s[1]-1, s[2], s[3], s[4]);
case 6: return new Date(s[0], s[1]-1, s[2], s[3], s[4], s[5]);
default: return new Date(s[0], s[1]-1, s[2], s[3], s[4], s[5], s[6]);
}
}
function adjustDate(d, offset) {
// offset is in minutes
var o=offset * 60 * 1000;
return new Date( +d + o);
}
function dayFormat(editDate, utc) {
if (utc) { return map(zeroFill, [editDate.getUTCFullYear(), editDate.getUTCMonth()+1, editDate.getUTCDate()]).join('-'); }
return map(zeroFill, [editDate.getFullYear(), editDate.getMonth()+1, editDate.getDate()]).join('-');
}
function timeFormat(editDate, utc) {
if (utc) { return map(zeroFill, [editDate.getUTCHours(), editDate.getUTCMinutes(), editDate.getUTCSeconds()]).join(':'); }
return map(zeroFill, [editDate.getHours(), editDate.getMinutes(), editDate.getSeconds()]).join(':');
}
function showAPIPreview(queryType, html, id, navpop, download) {
// DJ: done
var target='popupPreview';
switch (queryType) {
case 'imagelinks':
case 'category':
case 'userinfo':
target='popupPostPreview'; break;
}
setPopupTipsAndHTML(html, target, id);
completedNavpopTask(navpop);
}
function APIbacklinksPreviewHTML(article, download, navpop) {
try {
var jsObj=getJsObj(download.data);
var list=jsObj.query.backlinks;
} catch (someError) { return 'backlinksPreviewHTML went wonky'; }
var html=[];
if (!list) { return popupString('No backlinks found'); }
for ( var i=0; i < list.length; i++ ) {
var t=new Title(list[i]['title']);
html.push('<a href="' + pg.wiki.titlebase + t.urlString() + '">' + t + '</a>');
}
html=html.join(', ');
if (jsObj['query-continue'] && jsObj['query-continue'].backlinks && jsObj['query-continue'].backlinks.blcontinue) {
html += popupString(' and more');
}
return html;
}
function APIsharedImagePagePreviewHTML(obj) {
log( "APIsharedImagePagePreviewHTML" );
var popupid = obj['requestid'];
if( obj['query'] && obj['query']['pages'] )
{
var page=anyChild(obj['query']['pages']);
var content=(page && page.revisions ) ? page.revisions[0]['*'] : null;
if( content )
{
/* Not entirely safe, but the best we can do */
var p=new Previewmaker(content, pg.current.link.navpopup.article, pg.current.link.navpopup);
p.makePreview();
setPopupHTML( p.html, "popupSecondPreview", popupid );
}
}
}
function APIimagepagePreviewHTML(article, download, navpop) {
try {
var jsObj=getJsObj(download.data);
var page=anyChild(jsObj.query.pages);
var content=(page && page.revisions ) ? page.revisions[0]['*'] : null;
} catch (someError) {
return 'API imagepage preview failed :(';
}
var ret='';
var alt='';
try{alt=navpop.parentAnchor.childNodes[0].alt;} catch(e){}
if (alt) {
ret = ret + '<hr><b>' + popupString('Alt text:') + '</b> ' + pg.escapeQuotesHTML(alt);
}
if (content) {
var p=prepPreviewmaker(content, article, navpop);
p.makePreview();
if (p.html) { ret += '<hr>' + p.html; }
}
if (content!==null && getValueOf('popupSummaryData')) {
var info=getPageInfo(content, download);
log(info);
setPopupTrailer(info, navpop.idNumber);
}
if (page && page.imagerepository == "shared" ) {
var art=new Title(article);
var encart = encodeURIComponent( "File:" + art.stripNamespace() );
var shared_url = pg.wiki.apicommonsbase + '?format=json&callback=APIsharedImagePagePreviewHTML' +
'&requestid=' + navpop.idNumber +
'&action=query&prop=revisions&rvprop=content&titles=' + encart;
if (pg.flag.isIE) {
shared_url = shared_url + '&*'; //to circumvent https://bugzilla.wikimedia.org/show_bug.cgi?id=28840
}
ret = ret +'<hr>' + popupString( 'Image from Commons') +
': <a href="' + pg.wiki.commonsbase + '?title=' + encart + '">' +
popupString( 'Description page') + '</a>';
importScriptURI( shared_url );
}
showAPIPreview('imagelinks', APIimagelinksPreviewHTML(article,download), navpop.idNumber, download);
return ret;
}
function APIimagelinksPreviewHTML(article, download) {
try {
var jsobj=getJsObj(download.data);
var list=jsobj.query.imageusage;
if (!list) { return popupString('No image links found'); }
} catch(someError) { return 'Image links preview generation failed :('; }
var ret=[];
for (var i=0; i < list.length; i++) {
ret.push(list[i]['title']);
}
if (ret.length === 0) { return popupString('No image links found'); }
return '<h2>' + popupString('File links') + '</h2>' + linkList(ret);
}
function APIcategoryPreviewHTML(article, download) {
try{
var jsobj=getJsObj(download.data);
var list=jsobj.query.categorymembers;
} catch(someError) { return 'Category preview failed :('; }
var ret=[];
for (var p=0; p < list.length; p++) {
ret.push(list[p]['title']);
}
if (ret.length === 0) { return popupString('Empty category'); }
ret = '<h2>' + tprintf('Category members (%s shown)', [ret.length]) + '</h2>' +linkList(ret);
if (jsobj['query-continue'] && jsobj['query-continue'].categorymembers && jsobj['query-continue'].categorymembers.cmcontinue) {
ret += popupString(' and more');
}
return ret;
}
function APIuserInfoPreviewHTML(article, download) {
var ret=[];
try{
var queryobj=getJsObj(download.data).query;
} catch(someError) { return 'Userinfo preview failed :('; }
var user=anyChild(queryobj.users);
if (user) {
var globaluserinfo=queryobj.globaluserinfo;
if (user.invalid == '') {
ret.push( popupString( 'Invalid user') );
} else if (user.missing == '') {
ret.push( popupString( 'Not a registered username') );
}
if( user.blockedby )
ret.push('<b>' + popupString('BLOCKED') + '</b>');
if( globaluserinfo && (globaluserinfo.locked != null || globaluserinfo.hidden != null) ) {
var lockedSulAccountIsAttachedToThis = true;
for( var i=0; globaluserinfo.unattached && i < globaluserinfo.unattached.length; i++) {
if (globaluserinfo.unattached[i].wiki===wgDBname) { lockedSulAccountIsAttachedToThis=false; break; }
}
if (lockedSulAccountIsAttachedToThis) {
if (globaluserinfo.locked != null) ret.push('<b><i>' + popupString('LOCKED') + '</i></b>');
if (globaluserinfo.hidden != null) ret.push('<b><i>' + popupString('HIDDEN') + '</i></b>');
}
}
for( var i=0; (user.groups && i < user.groups.length); i++) {
switch (user.groups[i]) {
case '*':
case 'user':
case 'autoconfirmed':
break;
default:
ret.push( pg.escapeQuotesHTML(user.groups[i]) );
}
}
for( var i=0; (globaluserinfo && globaluserinfo.groups && i < globaluserinfo.groups.length); i++) {
ret.push( '<i>'+pg.escapeQuotesHTML(globaluserinfo.groups[i])+'</i>' );
}
if( user.editcount || user.registration )
ret.push( pg.escapeQuotesHTML((user.editcount?user.editcount:'') + popupString(' edits since: ') + (user.registration?dayFormat(getDateFromTimestamp(user.registration)):'')) );
}
if (queryobj.blocks) {
ret.push( popupString( 'IP user') ); //we only request list=blocks for IPs
for (var i=0; i<queryobj.blocks.length; i++) {
ret.push('<b>' + popupString(queryobj.blocks[i].rangestart===queryobj.blocks[i].rangeend ? 'BLOCKED' : 'RANGEBLOCKED') + '</b>' );
}
}
ret = '<hr>' + ret.join( ', ' );
return ret;
}
function APIcontribsPreviewHTML(article, download, navpop) {
return APIhistoryPreviewHTML(article, download, navpop, true);
}
function APIhistoryPreviewHTML(article, download, navpop, reallyContribs) {
try {
var jsobj=getJsObj(download.data);
var tz=jsobj.query.userinfo.options.timecorrection;
if( reallyContribs )
var edits=jsobj.query.usercontribs;
else
var edits=anyChild(jsobj.query.pages)['revisions'];
} catch (someError) {
return 'History preview failed :-(';
}
var timeOffset = getTimeOffset(tz);
Cookie.create('popTz', timeOffset, 1);
var ret=editPreviewTable(article, edits, reallyContribs, timeOffset);
return ret;
}
//</NOLITE>
// ENDFILE: querypreview.js
// STARTFILE: debug.js
////////////////////////////////////////////////////////////////////
// Debugging functions
////////////////////////////////////////////////////////////////////
function log(){}; // dummy to stop errors
function setupDebugging() {
//<NOLITE>
if (window.popupDebug) { // popupDebug is set from .version
window.log=function(x) { //if(gMsg!='')gMsg += '\n'; gMsg+=time() + ' ' + x; };
window.console.log(x);
}
window.errlog=function(x) {
window.console.error(x);
}
log('Initializing logger');
} else {
//</NOLITE>
window.log = function(x) {};
window.errlog = function(x) {};
//<NOLITE>
}
//</NOLITE>
}
// ENDFILE: debug.js
// STARTFILE: images.js
// load image of type Title.
function loadImage(image, navpop) {
if (typeof image.stripNamespace != 'function') { alert('loadImages bad'); }
// API call to retrieve image info.
if (!getValueOf('popupImages') || !window.wgEnableAPI || !wgEnableAPI) return;
if (!isValidImageName(image)) return false;
var art=image.urlString();
var url=pg.wiki.apiwikibase + '?format=json&action=query';
url += '&prop=imageinfo&iiprop=url|mime&iiurlwidth=' + getValueOf('popupImageSizeLarge');;
url += '&titles=' + art;
if (pg.flag.isIE) {
url = url + '&*'; //to circumvent https://bugzilla.wikimedia.org/show_bug.cgi?id=28840
}
pendingNavpopTask(navpop);
var callback=function(d){
popupsInsertImage(navpop.idNumber, navpop, d);
};
var go = function(){
getPageWithCaching(url, callback, navpop);
return true;
}
if (navpop.visible || !getValueOf('popupLazyDownloads')) { go(); }
else { navpop.addHook(go, 'unhide', 'after', 'DOWNLOAD_IMAGE_QUERY_DATA'); }
}
function popupsInsertImage(id, navpop, download) {
log( "popupsInsertImage");
try {
var jsObj=getJsObj(download.data);
var imagepage=anyChild(jsObj.query.pages);
if (typeof imagepage.imageinfo === 'undefined') return;
var imageinfo = imagepage.imageinfo[0];
} catch (someError) {
log( "popupsInsertImage failed :(" );
return;
}
var popupImage = document.getElementById("popupImg"+id);
if (!popupImage) {
log( "could not find insertion point for image");
return;
}
popupImage.width=getValueOf('popupImageSize');
popupImage.style.display='inline';
// Set the source for the image.
if( imageinfo.thumburl )
popupImage.src=imageinfo.thumburl;
else if( imageinfo.mime.indexOf("image") == 0 ){
popupImage.src=imageinfo.url;
log( "a thumb could not be found, using original image" );
} else log( "fullsize imagethumb, but not sure if it's an image");
var a=document.getElementById("popupImageLink"+id);
if (a === null) { return null; }
// Determine the action of the surrouding imagelink.
switch (getValueOf('popupThumbAction')) {
case 'imagepage':
if (pg.current.article.namespaceId()!=pg.nsImageId) {
a.href=imageinfo.descriptionurl;
// FIXME: unreliable pg.idNumber
popTipsSoonFn('popupImage' + id)();
break;
} // else fall through
case 'sizetoggle':
a.onclick=toggleSize;
a.title=popupString('Toggle image size');
return;
case 'linkfull':
a.href = imageinfo.url;
a.title=popupString('Open full-size image');
return;
}
}
// Toggles the image between inline small and navpop fullwidth.
// It's the same image, no actual sizechange occurs, only display width.
function toggleSize() {
var imgContainer=this;
if (!imgContainer) { alert('imgContainer is null :/'); return;}
img=imgContainer.firstChild;
if (!img) { alert('img is null :/'); return;}
if (!img.style.width || img.style.width=='') { img.style.width='100%'; }
else { img.style.width=''; }
}
// Returns one title of an image from wikiText.
function getValidImageFromWikiText(wikiText) {
// nb in pg.re.image we're interested in the second bracketed expression
// this may change if the regex changes :-(
//var match=pg.re.image.exec(wikiText);
var matched=null;
var match;
// strip html comments, used by evil bots :-(
var t = removeMatchesUnless(wikiText, RegExp('(<!--[\\s\\S]*?-->)'), 1,
RegExp('^<!--[^[]*popup', 'i'));
while ( match = pg.re.image.exec(t) ) {
// now find a sane image name - exclude templates by seeking {
var m = match[2] || match[6];
if ( isValidImageName(m) ) {
matched=m;
break;
}
}
pg.re.image.lastIndex=0;
if (!matched) { return null; }
return mw.config.get('wgFormattedNamespaces')[pg.nsImageId]+':'+upcaseFirst(matched);
}
function removeMatchesUnless(str, re1, parencount, re2) {
var split=str.parenSplit(re1);
var c=parencount + 1;
for (var i=0; i<split.length; ++i) {
if ( i%c === 0 || re2.test(split[i]) ) { continue; }
split[i]='';
}
return split.join('');
}
//</NOLITE>
// ENDFILE: images.js
// STARTFILE: namespaces.js
// Set up namespaces and other non-strings.js localization
// (currently that means redirs too)
function namespaceListToRegex(list) {return RegExp('^('+list.join('|').split(' ').join('[ _]')+'):');};
function setNamespaces() {
pg.nsSpecialId = -1;
pg.nsMainspaceId = 0;
pg.nsImageId = 6;
pg.nsUserId = 2;
pg.nsUsertalkId = 3;
pg.nsCategoryId = 14;
pg.nsTemplateId = 10;
}
function setRedirs() {
var r='redirect';
var R='REDIRECT';
var redirLists={
//<NOLITE>
'ar': [ R, 'تحويل' ],
'be': [ r, 'перанакіраваньне' ],
'bg': [ r, 'пренасочване', 'виж' ],
'bs': [ r, 'Preusmjeri', 'preusmjeri', 'PREUSMJERI' ],
'cs': [ R, 'PŘESMĚRUJ' ],
'cy': [ r, 'ail-cyfeirio' ],
'de': [ R, 'WEITERLEITUNG' ],
'eo': [ R, 'ALIDIREKTU', 'ALIDIREKTI' ],
'es': [ R, 'REDIRECCIÓN' ],
'et': [ r, 'suuna' ],
'ga': [ r, 'athsheoladh' ],
'gl': [ r, 'REDIRECCIÓN', 'REDIRECIONAMENTO'],
'he': [ R, 'הפניה' ],
'hu': [ R, 'ÁTIRÁNYÍTÁS' ],
'is': [ r, 'tilvísun', 'TILVÍSUN' ],
'it': [ R, 'RINVIA', 'Rinvia'],
'ja': [ R, '転送' ],
'mk': [ r, 'пренасочување', 'види' ],
'nds': [ r, 'wiederleiden' ],
'nl': [ R, 'DOORVERWIJZING' ],
'nn': [ r, 'omdiriger' ],
'pl': [ R, 'PATRZ', 'PRZEKIERUJ', 'TAM' ],
'pt': [ R, 'redir' ],
'ru': [ R, 'ПЕРЕНАПРАВЛЕНИЕ', 'ПЕРЕНАПР' ],
'sk': [ r, 'presmeruj' ],
'sr': [ r, 'Преусмери', 'преусмери', 'ПРЕУСМЕРИ', 'Preusmeri', 'preusmeri', 'PREUSMERI' ],
'tt': [ R, 'yünältü', 'перенаправление', 'перенапр' ],
'uk': [ R, 'ПЕРЕНАПРАВЛЕННЯ', 'ПЕРЕНАПР' ],
'vi': [ r, 'đổi' ] // no comma
//</NOLITE>
};
var redirList=redirLists[ pg.wiki.lang ] || [r, R];
// Mediawiki is very tolerant about what comes after the #redirect at the start
pg.re.redirect=RegExp('^\\s*[#](' + redirList.join('|') + ').*?\\[{2}([^\\|\\]]*)(|[^\\]]*)?\\]{2}\\s*(.*)', 'i');
}
function setInterwiki() {
if (pg.wiki.wikimedia) {
// From http://meta.wikimedia.org/wiki/List_of_Wikipedias
pg.wiki.interwiki='aa|ab|ace|af|ak|als|am|an|ang|ar|arc|arz|as|ast|av|ay|az|ba|bar|bat-smg|bcl|be|be-x-old|bg|bh|bi|bjn|bm|bn|bo|bpy|br|bs|bug|bxr|ca|cbk-zam|cdo|ce|ceb|ch|cho|chr|chy|ckb|co|cr|crh|cs|csb|cu|cv|cy|da|de|diq|dsb|dv|dz|ee|el|eml|en|eo|es|et|eu|ext|fa|ff|fi|fiu-vro|fj|fo|fr|frp|frr|fur|fy|ga|gag|gan|gd|gl|glk|gn|got|gu|gv|ha|hak|haw|he|hi|hif|ho|hr|hsb|ht|hu|hy|hz|ia|id|ie|ig|ii|ik|ilo|io|is|it|iu|ja|jbo|jv|ka|kaa|kab|kbd|kg|ki|kj|kk|kl|km|kn|ko|koi|kr|krc|ks|ksh|ku|kv|kw|ky|la|lad|lb|lbe|lg|li|lij|lmo|ln|lo|lt|ltg|lv|map-bms|mdf|mg|mh|mhr|mi|mk|ml|mn|mo|mr|mrj|ms|mt|mus|mwl|my|myv|mzn|na|nah|nap|nds|nds-nl|ne|new|ng|nl|nn|no|nov|nrm|nv|ny|oc|om|or|os|pa|pag|pam|pap|pcd|pdc|pfl|pi|pih|pl|pms|pnb|pnt|ps|pt|qu|rm|rmy|rn|ro|roa-rup|roa-tara|ru|rue|rw|sa|sah|sc|scn|sco|sd|se|sg|sh|si|simple|sk|sl|sm|sn|so|sq|sr|srn|ss|st|stq|su|sv|sw|szl|ta|te|tet|tg|th|ti|tk|tl|tn|to|tpi|tr|ts|tt|tum|tw|ty|udm|ug|uk|ur|uz|ve|vec|vi|vls|vo|wa|war|wo|wuu|xal|xh|yi|yo|za|zea|zh|zh-classical|zh-min-nan|zh-yue|zu';
pg.re.interwiki=RegExp('^'+pg.wiki.interwiki+':');
} else {
pg.wiki.interwiki=null;
pg.re.interwiki=RegExp('^$');
}
}
// return a regexp pattern matching all variants to write the given namespace
function nsRe(namespaceId) {
var imageNamespaceVariants = [];
jQuery.each(mw.config.get('wgNamespaceIds'), function(_localizedNamespaceLc, _namespaceId) {
if (_namespaceId!=namespaceId) return;
//todo: escape regexp fragments!
_localizedNamespaceLc = upcaseFirst(_localizedNamespaceLc);
imageNamespaceVariants.push(_localizedNamespaceLc.split(' ').join('[ _]'));
imageNamespaceVariants.push(encodeURI(_localizedNamespaceLc));
});
return '(?:' + imageNamespaceVariants.join('|') + ')';
}
function nsReImage() {
return nsRe(pg.nsImageId);
}
// ENDFILE: namespaces.js
// STARTFILE: selpop.js
//<NOLITE>
function getEditboxSelection() {
// see http://www.webgurusforum.com/8/12/0
try {
var editbox=document.editform.wpTextbox1;
} catch (dang) { return; }
// IE, Opera
if (document.selection) { return document.selection.createRange().text; }
// Mozilla
var selStart = editbox.selectionStart;
var selEnd = editbox.selectionEnd;
return (editbox.value).substring(selStart, selEnd);
}
function doSelectionPopup() {
// popup if the selection looks like [[foo|anything afterwards at all
// or [[foo|bar]]text without ']]'
// or [[foo|bar]]
var sel=getEditboxSelection();
var open=sel.indexOf('[[');
var pipe=sel.indexOf('|');
var close=sel.indexOf(']]');
if (open == -1 || ( pipe == -1 && close == -1) ) { return; }
if (pipe != -1 && open > pipe || close != -1 && open > close) { return; }
if (getValueOf('popupOnEditSelection')=='boxpreview') {
return doSeparateSelectionPopup(sel);
}
var article=new Title(sel.substring(open+2, (pipe < 0) ? close : pipe)).urlString();
if (close > 0 && sel.substring(close+2).indexOf('[[') >= 0) {
return;
}
var a=document.createElement('a');
a.href=pg.wiki.titlebase + article;
mouseOverWikiLink2(a);
if (a.navpopup) {
a.navpopup.addHook(function(){runStopPopupTimer(a.navpopup);}, 'unhide', 'after');
}
}
function doSeparateSelectionPopup(str) {
var div=document.getElementById('selectionPreview');
if (!div) {
div = document.createElement('div');
div.id='selectionPreview';
try { var box=document.editform.wpTextbox1; }
catch (oopsie) { return; }
box.parentNode.insertBefore(div, box);
}
div.innerHTML=wiki2html(str);
div.ranSetupTooltipsAlready = false;
popTipsSoonFn('selectionPreview')();
}
//</NOLITE>
// ENDFILE: selpop.js
// STARTFILE: navpopup.js
/**
@fileoverview Defines two classes: {@link Navpopup} and {@link Mousetracker}.
<code>Navpopup</code> describes popups: when they appear, where, what
they look like and so on.
<code>Mousetracker</code> "captures" the mouse using
<code>document.onmousemove</code>.
*/
/**
Creates a new Mousetracker.
@constructor
@class The Mousetracker class. This monitors mouse movements and manages associated hooks.
*/
function Mousetracker() {
/**
Interval to regularly run the hooks anyway, in milliseconds.
@type Integer
*/
this.loopDelay=400;
/**
Timer for the loop.
@type Timer
*/
this.timer=null;
/**
Flag - are we switched on?
@type Boolean
*/
this.active=false;
/**
Flag - are we probably inaccurate, i.e. not reflecting the actual mouse position?
*/
this.dirty=true;
/**
Array of hook functions.
@private
@type Array
*/
this.hooks=[];
}
/**
Adds a hook, to be called when we get events.
@param {Function} f A function which is called as
<code>f(x,y)</code>. It should return <code>true</code> when it
wants to be removed, and <code>false</code> otherwise.
*/
Mousetracker.prototype.addHook = function (f) {
this.hooks.push(f);
};
/**
Runs hooks, passing them the x
and y coords of the mouse. Hook functions that return true are
passed to {@link Mousetracker#removeHooks} for removal.
@private
*/
Mousetracker.prototype.runHooks = function () {
if (!this.hooks || !this.hooks.length) { return; }
//log('Mousetracker.runHooks; we got some hooks to run');
var remove=false;
var removeObj={};
// this method gets called a LOT -
// pre-cache some variables
var x=this.x, y=this.y, len = this.hooks.length;
for (var i=0; i<len; ++i) {
//~ run the hook function, and remove it if it returns true
if (this.hooks[i](x, y)===true) {
remove=true;
removeObj[i]=true;
}
}
if (remove) { this.removeHooks(removeObj); }
};
/**
Removes hooks.
@private
@param {Object} removeObj An object whose keys are the index
numbers of functions for removal, with values that evaluate to true
*/
Mousetracker.prototype.removeHooks = function(removeObj) {
var newHooks=[];
var len = this.hooks.length;
for (var i=0; i<len; ++i) {
if (! removeObj[i]) { newHooks.push(this.hooks[i]); }
}
this.hooks=newHooks;
};
/**
Event handler for mouse wiggles.
We simply grab the event, set x and y and run the hooks.
This makes the cpu all hot and bothered :-(
@private
@param {Event} e Mousemove event
*/
Mousetracker.prototype.track=function (e) {
//~ Apparently this is needed in IE.
e = e || window.event;
var x, y;
if (e) {
if (e.pageX) { x=e.pageX; y=e.pageY; }
else if (typeof e.clientX!='undefined') {
var left, top, docElt = window.document.documentElement;
if (docElt) { left=docElt.scrollLeft; }
left = left || window.document.body.scrollLeft || window.document.scrollLeft || 0;
if (docElt) { top=docElt.scrollTop; }
top = top || window.document.body.scrollTop || window.document.scrollTop || 0;
x=e.clientX + left;
y=e.clientY + top;
} else { return; }
this.setPosition(x,y);
}
};
/**
Sets the x and y coordinates stored and takes appropriate action,
running hooks as appropriate.
@param {Integer} x, y Screen coordinates to set
*/
Mousetracker.prototype.setPosition=function(x,y) {
this.x = x;
this.y = y;
if (this.dirty || this.hooks.length === 0) { this.dirty=false; return; }
if (typeof this.lastHook_x != 'number') { this.lastHook_x = -100; this.lastHook_y=-100; }
var diff = (this.lastHook_x - x)*(this.lastHook_y - y);
diff = (diff >= 0) ? diff : -diff;
if ( diff > 1 ) {
this.lastHook_x=x;
this.lastHook_y=y;
if (this.dirty) { this.dirty = false; }
else { this.runHooks(); }
}
}
/**
Sets things in motion, unless they are already that is, registering an event handler on <code>document.onmousemove</code>.
A half-hearted attempt is made to preserve the old event handler if there is one.
*/
Mousetracker.prototype.enable = function () {
if (this.active) { return; }
this.active=true;
//~ Save the current handler for mousemove events. This isn't too
//~ robust, of course.
this.savedHandler=document.onmousemove;
//~ Gotta save @tt{this} again for the closure, and use apply for
//~ the member function.
var savedThis=this;
document.onmousemove=function (e) {savedThis.track.apply(savedThis, [e]);};
if (this.loopDelay) { this.timer = setInterval(function() { //log('loop delay in mousetracker is working');
savedThis.runHooks();}, this.loopDelay); }
};
/**
Disables the tracker, removing the event handler.
*/
Mousetracker.prototype.disable = function () {
if (!this.active) { return; }
if (typeof this.savedHandler=='function') {
document.onmousemove=this.savedHandler;
} else { delete document.onmousemove; }
if (this.timer) { clearInterval(this.timer); }
this.active=false;
};
/**
Creates a new Navpopup.
Gets a UID for the popup and
@param init Contructor object. If <code>init.draggable</code> is true or absent, the popup becomes draggable.
@constructor
@class The Navpopup class. This generates popup hints, and does some management of them.
*/
function Navpopup(init) {
//alert('new Navpopup(init)');
/** UID for each Navpopup instance.
Read-only.
@type integer
*/
this.uid=Navpopup.uid++;
/**
Read-only flag for current visibility of the popup.
@type boolean
@private
*/
this.visible=false;
/** Flag to be set when we want to cancel a previous request to
show the popup in a little while.
@private
@type boolean
*/
this.noshow=false;
/** Categorised list of hooks.
@see #runHooks
@see #addHook
@private
@type Object
*/
this.hooks={
'create': [],
'unhide': [],
'hide': []
};
/** list of unique IDs of hook functions, to avoid duplicates
@private
*/
this.hookIds={};
/** List of downloads associated with the popup.
@private
@type Array
*/
this.downloads=[];
/** Number of uncompleted downloads.
@type integer
*/
this.pending=null;
/** Tolerance in pixels when detecting whether the mouse has left the popup.
@type integer
*/
this.fuzz=5;
/** Flag to toggle running {@link #limitHorizontalPosition} to regulate the popup's position.
@type boolean
*/
this.constrained=true;
/** The popup width in pixels.
@private
@type integer
*/
this.width=0;
/** The popup width in pixels.
@private
@type integer
*/
this.height=0;
/** The main content DIV element.
@type HTMLDivElement
*/
this.mainDiv=null;
this.createMainDiv();
// if (!init || typeof init.popups_draggable=='undefined' || init.popups_draggable) {
// this.makeDraggable(true);
// }
}
/**
A UID for each Navpopup. This constructor property is just a counter.
@type integer
@private
*/
Navpopup.uid=0;
/**
Retrieves the {@link #visible} attribute, indicating whether the popup is currently visible.
@type boolean
*/
Navpopup.prototype.isVisible=function() {
return this.visible;
};
/**
Repositions popup using CSS style.
@private
@param {integer} x x-coordinate (px)
@param {integer} y y-coordinate (px)
@param {boolean} noLimitHor Don't call {@link #limitHorizontalPosition}
*/
Navpopup.prototype.reposition= function (x,y, noLimitHor) {
log ('reposition('+x+','+y+','+noLimitHor+')');
if (typeof x != 'undefined' && x!==null) { this.left=x; }
if (typeof y != 'undefined' && y!==null) { this.top=y; }
if (typeof this.left != 'undefined' && typeof this.top != 'undefined') {
this.mainDiv.style.left=this.left + 'px';
this.mainDiv.style.top=this.top + 'px';
}
if (!noLimitHor) { this.limitHorizontalPosition(); }
//console.log('navpop'+this.uid+' - (left,top)=(' + this.left + ',' + this.top + '), css=('
//+ this.mainDiv.style.left + ',' + this.mainDiv.style.top + ')');
};
/**
Prevents popups from being in silly locations. Hopefully.
Should not be run if {@link #constrained} is true.
@private
*/
Navpopup.prototype.limitHorizontalPosition=function() {
if (!this.constrained || this.tooWide) { return; }
this.updateDimensions();
var x=this.left;
var w=this.width;
var cWidth=document.body.clientWidth;
// log('limitHorizontalPosition: x='+x+
// ', this.left=' + this.left +
// ', this.width=' + this.width +
// ', cWidth=' + cWidth);
if ( (x+w) >= cWidth ||
( x > 0 && this.maxWidth && this.width < this.maxWidth && this.height > this.width
&& x > cWidth - this.maxWidth ) ) {
// This is a very nasty hack. There has to be a better way!
// We find the "natural" width of the div by positioning it at the far left
// then reset it so that it should be flush right (well, nearly)
this.mainDiv.style.left='-10000px';
this.mainDiv.style.width = this.maxWidth + 'px';
var naturalWidth=parseInt(this.mainDiv.offsetWidth, 10);
var newLeft=cWidth - naturalWidth - 1;
if (newLeft < 0) { newLeft = 0; this.tooWide=true; } // still unstable for really wide popups?
log ('limitHorizontalPosition: moving to ('+newLeft + ','+ this.top+');' + ' naturalWidth=' + naturalWidth + ', clientWidth=' + cWidth);
this.reposition(newLeft, null, true);
}
};
/**
Counter indicating the z-order of the "highest" popup.
We start the z-index at 1000 so that popups are above everything
else on the screen.
@private
@type integer
*/
Navpopup.highest=1000;
/**
Brings popup to the top of the z-order.
We increment the {@link #highest} property of the contructor here.
@private
*/
Navpopup.prototype.raise = function () {
this.mainDiv.style.zIndex=Navpopup.highest + 1;
++Navpopup.highest;
};
/**
Shows the popup provided {@link #noshow} is not true.
Updates the position, brings the popup to the top of the z-order and unhides it.
*/
Navpopup.prototype.show = function () {
//document.title+='s';
if (this.noshow) { return; }
//document.title+='t';
this.reposition();
this.raise();
this.unhide();
};
/**
Runs the {@link #show} method in a little while, unless we're
already visible.
@param {integer} time Delay in milliseconds
@see #showSoonIfStable
*/
Navpopup.prototype.showSoon = function (time) {
if (this.visible) { return; }
this.noshow=false;
//~ We have to save the value of @tt{this} so that the closure below
//~ works.
var savedThis=this;
//this.start_x = Navpopup.tracker.x;
//this.start_y = Navpopup.tracker.y;
setTimeout(function () {
if (Navpopup.tracker.active) {
savedThis.reposition.apply(savedThis, [Navpopup.tracker.x + 2, Navpopup.tracker.y + 2]);
}
//~ Have to use apply to invoke his member function here
savedThis.show.apply(savedThis, []);
}, time);
};
/**
Checks to see if the mouse pointer has
stabilised (checking every <code>time</code>/2 milliseconds) and runs the
{@link #show} method if it has. This method makes {@link #showSoon} redundant.
@param {integer} time The minimum time (ms) before the popup may be shown.
*/
Navpopup.prototype.showSoonIfStable = function (time) {
log ('showSoonIfStable, time='+time);
if (this.visible) { return; }
this.noshow = false;
//~ initialize these variables so that we never run @tt{show} after
//~ just half the time
this.stable_x = -10000; this.stable_y = -10000;
var stableShow = function() {
log('stableShow called');
var new_x = Navpopup.tracker.x, new_y = Navpopup.tracker.y;
var dx = savedThis.stable_x - new_x, dy = savedThis.stable_y - new_y;
var fuzz2 = 0; // savedThis.fuzz * savedThis.fuzz;
//document.title += '[' + [savedThis.stable_x,new_x, savedThis.stable_y,new_y, dx, dy, fuzz2].join(',') + '] ';
if ( dx * dx <= fuzz2 && dy * dy <= fuzz2 ) {
log ('mouse is stable');
clearInterval(savedThis.showSoonStableTimer);
savedThis.reposition.apply(savedThis, [new_x + 2, new_y + 2]);
savedThis.show.apply(savedThis, []);
return;
}
savedThis.stable_x = new_x; savedThis.stable_y = new_y;
};
var savedThis = this;
this.showSoonStableTimer = setInterval(stableShow, time/2);
};
/**
Makes the popup unhidable until we call {@link #unstick}.
*/
Navpopup.prototype.stick=function() {
this.noshow=false;
this.sticky=true;
};
/**
Allows the popup to be hidden.
*/
Navpopup.prototype.unstick=function() {
this.sticky=false;
};
/**
Sets the {@link #noshow} flag and hides the popup. This should be called
when the mouse leaves the link before
(or after) it's actually been displayed.
*/
Navpopup.prototype.banish = function () {
log ('banish called');
// hide and prevent showing with showSoon in the future
this.noshow=true;
if (this.showSoonStableTimer) {
log('clearing showSoonStableTimer');
clearInterval(this.showSoonStableTimer);
}
this.hide();
};
/**
Runs hooks added with {@link #addHook}.
@private
@param {String} key Key name of the {@link #hooks} array - one of 'create', 'unhide', 'hide'
@param {String} when Controls exactly when the hook is run: either 'before' or 'after'
*/
Navpopup.prototype.runHooks = function (key, when) {
if (!this.hooks[key]) { return; }
var keyHooks=this.hooks[key];
var len=keyHooks.length;
for (var i=0; i< len; ++i) {
if (keyHooks[i] && keyHooks[i].when == when) {
if (keyHooks[i].hook.apply(this, [])) {
// remove the hook
if (keyHooks[i].hookId) {
delete this.hookIds[keyHooks[i].hookId];
}
keyHooks[i]=null;
}
}
}
};
/**
Adds a hook to the popup. Hook functions are run with <code>this</code> set to refer to the Navpopup instance, and no arguments.
@param {Function} hook The hook function. Functions that return true are deleted.
@param {String} key Key name of the {@link #hooks} array - one of 'create', 'unhide', 'hide'
@param {String} when Controls exactly when the hook is run: either 'before' or 'after'
@param {String} uid A truthy string identifying the hook function; if it matches another hook in this position, it won't be added again.
*/
Navpopup.prototype.addHook = function ( hook, key, when, uid ) {
when = when || 'after';
if (!this.hooks[key]) { return; }
// if uid is specified, don't add duplicates
var hookId=null;
if (uid) {
hookId=[key,when,uid].join('|');
if (this.hookIds[hookId]) {
return;
}
this.hookIds[hookId]=true;
}
this.hooks[key].push( {hook: hook, when: when, hookId: hookId} );
};
/**
Creates the main DIV element, which contains all the actual popup content.
Runs hooks with key 'create'.
@private
*/
Navpopup.prototype.createMainDiv = function () {
if (this.mainDiv) { return; }
this.runHooks('create', 'before');
var mainDiv=document.createElement('div');
var savedThis=this;
mainDiv.onclick=function(e) {savedThis.onclickHandler(e);};
mainDiv.className=(this.className) ? this.className : 'navpopup_maindiv';
mainDiv.id=mainDiv.className + this.uid;
mainDiv.style.position='absolute';
mainDiv.style.display='none';
mainDiv.className='navpopup';
// easy access to javascript object through DOM functions
mainDiv.navpopup=this;
this.mainDiv=mainDiv;
document.body.appendChild(mainDiv);
this.runHooks('create', 'after');
};
/**
Calls the {@link #raise} method.
@private
*/
Navpopup.prototype.onclickHandler=function(e) {
this.raise();
};
/**
Makes the popup draggable, using a {@link Drag} object.
@private
*/
Navpopup.prototype.makeDraggable=function(handleName) {
if (!this.mainDiv) { this.createMainDiv(); }
var drag=new Drag();
if (!handleName) {
drag.startCondition=function(e) {
try { if (!e.shiftKey) { return false; } } catch (err) { return false; }
return true;
};
}
var dragHandle;
if (handleName) dragHandle = document.getElementById(handleName);
if (!dragHandle) dragHandle = this.mainDiv;
var np=this;
drag.endHook=function(x,y) {
Navpopup.tracker.dirty=true;
np.reposition(x,y);
};
drag.init(dragHandle,this.mainDiv);
};
/** Hides the popup using CSS. Runs hooks with key 'hide'.
Sets {@link #visible} appropriately. {@link #banish} should be called externally instead of this method.
@private
*/
Navpopup.prototype.hide = function () {
this.runHooks('hide', 'before');
this.abortDownloads();
if (this.sticky) { return; }
if (typeof this.visible != 'undefined' && this.visible) {
this.mainDiv.style.display='none';
this.visible=false;
}
this.runHooks('hide', 'after');
};
/** Shows the popup using CSS. Runs hooks with key 'unhide'.
Sets {@link #visible} appropriately. {@link #show} should be called externally instead of this method.
@private
*/
Navpopup.prototype.unhide = function () {
this.runHooks('unhide', 'before');
if (typeof this.visible != 'undefined' && !this.visible) {
this.mainDiv.style.display='inline';
this.visible=true;
}
this.runHooks('unhide', 'after');
};
/**
Sets the <code>innerHTML</code> attribute of the main div containing the popup content.
@param {String} html The HTML to set.
*/
Navpopup.prototype.setInnerHTML = function (html) {
this.mainDiv.innerHTML = html;
};
/**
Updates the {@link #width} and {@link #height} attributes with the CSS properties.
@private
*/
Navpopup.prototype.updateDimensions = function () {
this.width=parseInt(this.mainDiv.offsetWidth, 10);
this.height=parseInt(this.mainDiv.offsetHeight, 10);
};
/**
Checks if the point (x,y) is within {@link #fuzz} of the
{@link #mainDiv}.
@param {integer} x x-coordinate (px)
@param {integer} y y-coordinate (px)
@type boolean
*/
Navpopup.prototype.isWithin = function(x,y) {
//~ If we're not even visible, no point should be considered as
//~ being within the popup.
if (!this.visible) { return false; }
this.updateDimensions();
var fuzz=this.fuzz || 0;
//~ Use a simple box metric here.
return (x+fuzz >= this.left && x-fuzz <= this.left + this.width &&
y+fuzz >= this.top && y-fuzz <= this.top + this.height);
};
/**
Adds a download to {@link #downloads}.
@param {Downloader} download
*/
Navpopup.prototype.addDownload=function(download) {
if (!download) { return; }
this.downloads.push(download);
};
/**
Aborts the downloads listed in {@link #downloads}.
@see Downloader#abort
*/
Navpopup.prototype.abortDownloads=function() {
for(var i=0; i<this.downloads.length; ++i) {
var d=this.downloads[i];
if (d && d.abort) { d.abort(); }
}
this.downloads=[];
};
/**
A {@link Mousetracker} instance which is a property of the constructor (pseudo-global).
*/
Navpopup.tracker=new Mousetracker();
// ENDFILE: navpopup.js
// STARTFILE: diff.js
//<NOLITE>
/*
* Javascript Diff Algorithm
* By John Resig (http://ejohn.org/) and [[:en:User:Lupin]]
*
* More Info:
* http://ejohn.org/projects/javascript-diff-algorithm/
*/
function delFmt(x) {
if (!x.length) { return ''; }
return "<del class='popupDiff'>" + x.join('') +"</del>";
}
function insFmt(x) {
if (!x.length) { return ''; }
return "<ins class='popupDiff'>" + x.join('') +"</ins>";
}
function countCrossings(a, b, i, eject) {
// count the crossings on the edge starting at b[i]
if (!b[i].row && b[i].row !== 0) { return -1; }
var count=0;
for (var j=0; j<a.length; ++j) {
if (!a[j].row && a[j].row !== 0) { continue; }
if ( (j-b[i].row)*(i-a[j].row) > 0) {
if(eject) { return true; }
count++;
}
}
return count;
}
function shortenDiffString(str, context) {
var re=RegExp('(<del[\\s\\S]*?</del>|<ins[\\s\\S]*?</ins>)');
var splitted=str.parenSplit(re);
var ret=[''];
for (var i=0; i<splitted.length; i+=2) {
if (splitted[i].length < 2*context) {
ret[ret.length-1] += splitted[i];
if (i+1<splitted.length) { ret[ret.length-1] += splitted[i+1]; }
continue;
}
else {
if (i > 0) { ret[ret.length-1] += splitted[i].substring(0,context); }
if (i+1 < splitted.length) {
ret.push(splitted[i].substring(splitted[i].length-context) +
splitted[i+1]);
}
}
}
while (ret.length > 0 && !ret[0]) { ret = ret.slice(1); }
return ret;
}
function diffString( o, n, simpleSplit ) {
var splitRe=RegExp('([[]{2}|[\\]]{2}|[{]{2,3}|[}]{2,3}|[|]|=|<|>|[*:]+|\\s|\\b)');
// We need to split the strings o and n first, and entify() the parts
// individually, so that the HTML entities are never cut apart. (AxelBoldt)
var out, i, oSplitted, nSplitted;
if (simpleSplit) {
oSplitted=o.split(/\b/);
nSplitted=n.split(/\b/);
} else {
oSplitted=o.parenSplit(splitRe);
nSplitted=n.parenSplit(splitRe);
}
for (i=0; i<oSplitted.length; ++i) {oSplitted[i]=oSplitted[i].entify();}
for (i=0; i<nSplitted.length; ++i) {nSplitted[i]=nSplitted[i].entify();}
out = diff (oSplitted, nSplitted);
var str = "";
var acc=[]; // accumulator for prettier output
// crossing pairings -- eg 'A B' vs 'B A' -- cause problems, so let's iron them out
// this doesn't always do things optimally but it should be fast enough
var maxOutputPair=0;
for (i=0; i<out.n.length; ++i) {
if ( out.n[i].paired ) {
if( maxOutputPair > out.n[i].row ) {
// tangle - delete pairing
out.o[ out.n[i].row ]=out.o[ out.n[i].row ].text;
out.n[i]=out.n[i].text;
}
if (maxOutputPair < out.n[i].row) { maxOutputPair = out.n[i].row; }
}
}
// output the stuff preceding the first paired old line
for (i=0; i<out.o.length && !out.o[i].paired; ++i) { acc.push( out.o[i] ); }
str += delFmt(acc); acc=[];
// main loop
for ( i = 0; i < out.n.length; ++i ) {
// output unpaired new "lines"
while ( i < out.n.length && !out.n[i].paired ) { acc.push( out.n[i++] ); }
str += insFmt(acc); acc=[];
if ( i < out.n.length ) { // this new "line" is paired with the (out.n[i].row)th old "line"
str += out.n[i].text;
// output unpaired old rows starting after this new line's partner
var m = out.n[i].row + 1;
while ( m < out.o.length && !out.o[m].paired ) { acc.push ( out.o[m++] ); }
str += delFmt(acc); acc=[];
}
}
return str;
}
// see http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object
// FIXME: use obj.hasOwnProperty instead of this kludge!
window.jsReservedProperties=RegExp('^(constructor|prototype|__((define|lookup)[GS]etter)__' +
'|eval|hasOwnProperty|propertyIsEnumerable' +
'|to(Source|String|LocaleString)|(un)?watch|valueOf)$');
function diffBugAlert(word) {
if (!diffBugAlert.list[word]) {
diffBugAlert.list[word]=1;
alert('Bad word: '+word+'\n\nPlease report this bug.');
}
}
diffBugAlert.list={};
function makeDiffHashtable(src) {
var ret={};
for ( var i = 0; i < src.length; i++ ) {
if ( jsReservedProperties.test(src[i]) ) { src[i] += '<!-- -->'; }
if ( !ret[ src[i] ] ) { ret[ src[i] ] = []; }
try { ret[ src[i] ].push( i ); } catch (err) { diffBugAlert(src[i]); }
}
return ret;
}
function diff( o, n ) {
// pass 1: make hashtable ns with new rows as keys
var ns = makeDiffHashtable(n);
// pass 2: make hashtable os with old rows as keys
var os = makeDiffHashtable(o);
// pass 3: pair unique new rows and matching unique old rows
var i;
for ( i in ns ) {
if ( ns[i].length == 1 && os[i] && os[i].length == 1 ) {
n[ ns[i][0] ] = { text: n[ ns[i][0] ], row: os[i][0], paired: true };
o[ os[i][0] ] = { text: o[ os[i][0] ], row: ns[i][0], paired: true };
}
}
// pass 4: pair matching rows immediately following paired rows (not necessarily unique)
for ( i = 0; i < n.length - 1; i++ ) {
if ( n[i].paired && ! n[i+1].paired && n[i].row + 1 < o.length && ! o[ n[i].row + 1 ].paired &&
n[i+1] == o[ n[i].row + 1 ] ) {
n[i+1] = { text: n[i+1], row: n[i].row + 1, paired: true };
o[n[i].row+1] = { text: o[n[i].row+1], row: i + 1, paired: true };
}
}
// pass 5: pair matching rows immediately preceding paired rows (not necessarily unique)
for ( i = n.length - 1; i > 0; i-- ) {
if ( n[i].paired && ! n[i-1].paired && n[i].row > 0 && ! o[ n[i].row - 1 ].paired &&
n[i-1] == o[ n[i].row - 1 ] ) {
n[i-1] = { text: n[i-1], row: n[i].row - 1, paired: true };
o[n[i].row-1] = { text: o[n[i].row-1], row: i - 1, paired: true };
}
}
return { o: o, n: n };
}
//</NOLITE>
// ENDFILE: diff.js
// STARTFILE: init.js
function setSiteInfo() {
if (window.popupLocalDebug) {
pg.wiki.hostname = 'en.wikipedia.org';
} else {
pg.wiki.hostname = location.hostname; // use in preference to location.hostname for flexibility (?)
}
pg.wiki.wikimedia=RegExp('(wiki([pm]edia|source|books|news|quote|versity)|wiktionary|mediawiki)[.]org').test(pg.wiki.hostname);
pg.wiki.wikia=RegExp('[.]wikia[.]com$', 'i').test(pg.wiki.hostname);
pg.wiki.isLocal=RegExp('^localhost').test(pg.wiki.hostname);
pg.wiki.commons=( pg.wiki.wikimedia && pg.wiki.hostname != 'commons.wikimedia.org') ? 'commons.wikimedia.org' : null;
pg.wiki.lang = wgContentLanguage;
var port = location.port ? ':' + location.port : '';
pg.wiki.sitebase = pg.wiki.hostname + port;
}
function setTitleBase() {
var protocol = ( window.popupLocalDebug ? 'http:' : location.protocol );
pg.wiki.articlePath = wgArticlePath.replace(/\/\$1/, ""); // as in http://some.thing.com/wiki/Article
pg.wiki.botInterfacePath = wgScript;
pg.wiki.APIPath = wgScriptPath +"/api.php";
// default mediawiki setting is paths like http://some.thing.com/articlePath/index.php?title=foo
var titletail = pg.wiki.botInterfacePath + '?title=';
//var titletail2 = joinPath([pg.wiki.botInterfacePath, 'wiki.phtml?title=']);
// other sites may need to add code here to set titletail depending on how their urls work
pg.wiki.titlebase = protocol + '//' + pg.wiki.sitebase + titletail;
//pg.wiki.titlebase2 = protocol + '//' + joinPath([pg.wiki.sitebase, titletail2]);
pg.wiki.wikibase = protocol + '//' + pg.wiki.sitebase + pg.wiki.botInterfacePath;
pg.wiki.apiwikibase = protocol + '//' + pg.wiki.sitebase + pg.wiki.APIPath;
pg.wiki.articlebase = protocol + '//' + pg.wiki.sitebase + pg.wiki.articlePath;
pg.wiki.commonsbase = protocol + '//' + pg.wiki.commons + pg.wiki.botInterfacePath;
pg.wiki.apicommonsbase = protocol + '//' + pg.wiki.commons + pg.wiki.APIPath;
pg.re.basenames = RegExp( '^(' +
map( literalizeRegex, [ pg.wiki.titlebase, //pg.wiki.titlebase2,
pg.wiki.articlebase ]).join('|') + ')' );
}
//////////////////////////////////////////////////
// Global regexps
function setMainRegex() {
var reStart='[^:]*://';
var preTitles = literalizeRegex(wgScriptPath) + '/(?:index[.]php|wiki[.]phtml)[?]title=';
preTitles += '|' + literalizeRegex( pg.wiki.articlePath + '/' );
var reEnd='(' + preTitles + ')([^&?#]*)[^#]*(?:#(.+))?';
pg.re.main = RegExp(reStart + literalizeRegex(pg.wiki.sitebase) + reEnd);
}
function setRegexps() {
setMainRegex();
var sp=nsRe(pg.nsSpecialId);
pg.re.urlNoPopup=RegExp('((title=|/)' + sp + '(?:%3A|:)|section=[0-9]|^#$)') ;
pg.re.contribs =RegExp('(title=|/)' + sp + '(?:%3A|:)Contributions' + '(&target=|/|/' + mw.config.get('wgFormattedNamespaces')[pg.nsUserId]+':)(.*)') ;
pg.re.email =RegExp('(title=|/)' + sp + '(?:%3A|:)EmailUser' + '(&target=|/|/(?:' + mw.config.get('wgFormattedNamespaces')[pg.nsUserId]+':)?)(.*)') ;
pg.re.backlinks =RegExp('(title=|/)' + sp + '(?:%3A|:)WhatLinksHere' + '(&target=|/)([^&]*)');
//<NOLITE>
var im=nsReImage();
// note: tries to get images in infobox templates too, e.g. movie pages, album pages etc
// (^|\[\[)image: *([^|\]]*[^|\] ]) *
// (^|\[\[)image: *([^|\]]*[^|\] ])([^0-9\]]*([0-9]+) *px)?
// $4 = 120 as in 120px
pg.re.image = RegExp('(^|\\[\\[)' + im + ': *([^|\\]]*[^|\\] ])' +
'([^0-9\\]]*([0-9]+) *px)?|(?:\\n *[|]?|[|]) *' +
'(' + getValueOf('popupImageVarsRegexp') + ')' +
' *= *(?:\\[\\[ *)?(?:' + im + ':)?' +
'([^|]*?)(?:\\]\\])? *[|]? *\\n', 'img') ;
pg.re.imageBracketCount = 6;
pg.re.category = RegExp('\\[\\[' +nsRe(pg.nsCategoryId) +
': *([^|\\]]*[^|\\] ]) *', 'i');
pg.re.categoryBracketCount = 1;
pg.re.ipUser=RegExp('^' +
// IPv6
'(?::(?::|(?::[0-9A-Fa-f]{1,4}){1,7})|[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4}){0,6}::|[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4}){7})' +
// IPv4
'|(((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}' +
'(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]))$');
pg.re.stub= RegExp(getValueOf('popupStubRegexp'), 'im');
pg.re.disambig=RegExp(getValueOf('popupDabRegexp'), 'im');
//</NOLITE>
// FIXME replace with general parameter parsing function, this is daft
pg.re.oldid=RegExp('[?&]oldid=([^&]*)');
pg.re.diff=RegExp('[?&]diff=([^&]*)');
}
//////////////////////////////////////////////////
// miscellany
function setupCache() {
// page caching
pg.cache.pages = [];
}
function setMisc() {
pg.current.link=null;
pg.current.links=[];
pg.current.linksHash={};
setupCache();
pg.timer.checkPopupPosition=null;
pg.counter.loop=0;
// ids change with each popup: popupImage0, popupImage1 etc
pg.idNumber=0;
// for myDecodeURI
pg.misc.decodeExtras = [
{from: '%2C', to: ',' },
{from: '_', to: ' ' },
{from: '%24', to: '$'},
{from: '%26', to: '&' } // no ,
];
}
function leadingInteger(s){
var n=s.match(/^(\d*)/)[1];
if (n) { return +n; }
return null;
}
function setBrowserHacks() {
var useOriginal=false;
// browser-specific hacks
if (typeof window.opera != 'undefined') {
//if (leadingInteger(opera.version()) < 9)
{ useOriginal=true; } // v9 beta still seems to have buggy css
setDefault('popupNavLinkSeparator', ' · ');
} else if (navigator.appName=='Konqueror') {
setDefault('popupNavLinkSeparator', ' • ');
pg.flag.isKonq=true;
} else if ( navigator.vendor && navigator.vendor.toLowerCase().indexOf('apple computer')===0) {
pg.flag.isSafari=true;
var webkit=+navigator.userAgent.replace(RegExp('^.*AppleWebKit[/](\\d+).*', 'i'), '$1');
if (webkit < 420) { useOriginal=true; }
} else if (navigator.appName.indexOf("Microsoft")!=-1) {
setDefault('popupNavLinkSeparator', ' · ');
var ver=+navigator.userAgent.replace(RegExp('^.*MSIE (\\d+).*'), '$1');
pg.flag.isIE=true;
pg.flag.IEVersion=ver;
}
if (pg.flag.isIE && pg.flag.IEVersion < 8) {
useOriginal=true;
}
if ((pg.flag.isIE && pg.flag.IEVersion < 7) || pg.flag.isKonq || (pg.flag.isSafari && webkit < 420)) {
pg.flag.linksLikeIE6=true;
}
if (useOriginal && pg.structures.original) {
setDefault('popupStructure','original');
}
}
// We need a callback since this might end up asynchronous because of
// the mw.loader.using() call.
function setupPopups( callback ) {
mw.loader.using( 'mediawiki.user', function() {
// NB translatable strings should be set up first (strings.js)
// basics
setupDebugging();
setSiteInfo();
setTitleBase();
setOptions(); // see options.js
// namespaces etc
setNamespaces();
setInterwiki();
// regexps
setRegexps();
setRedirs();
// other stuff
setBrowserHacks();
setMisc();
setupLivePreview();
// main deal here
setupTooltips();
Navpopup.tracker.enable();
setupPopups.completed = true;
if ( $.isFunction( callback ) ) {
callback();
}
});
}
// ENDFILE: init.js
// STARTFILE: navlinks.js
//<NOLITE>
//////////////////////////////////////////////////
// navlinks... let the fun begin
//
function defaultNavlinkSpec() {
var str='';
str += '<b><<mainlink|shortcut= >></b>';
if (getValueOf('popupLastEditLink')) {
str += '*<<lastEdit|shortcut=/>>|<<lastContrib>>|<<sinceMe>>if(oldid){|<<oldEdit>>|<<diffCur>>}';
}
// user links
// contribs - log - count - email - block
// count only if applicable; block only if popupAdminLinks
str += 'if(user){<br><<contribs|shortcut=c>>*<<userlog|shortcut=L|log>>';
str+='if(ipuser){*<<arin>>}if(wikimedia){*<<count|shortcut=#>>}';
str+='if(ipuser){}else{*<<email|shortcut=E>>}if(admin){*<<block|shortcut=b>>|<<blocklog|log>>}}';
// editing links
// talkpage -> edit|new - history - un|watch - article|edit
// other page -> edit - history - un|watch - talk|edit|new
var editstr='<<edit|shortcut=e>>';
var editOldidStr='if(oldid){<<editOld|shortcut=e>>|<<revert|shortcut=v|rv>>|<<edit|cur>>}else{' + editstr + '}'
var historystr='<<history|shortcut=h>>if(mainspace_en){|<<editors|shortcut=E|>>}';
var watchstr='<<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>>';
str+='<br>if(talk){' +
editOldidStr+'|<<new|shortcut=+>>' + '*' + historystr+'*'+watchstr + '*' +
'<b><<article|shortcut=a>></b>|<<editArticle|edit>>' +
'}else{' + // not a talk page
editOldidStr + '*' + historystr + '*' + watchstr + '*' +
'<b><<talk|shortcut=t>></b>|<<editTalk|edit>>|<<newTalk|shortcut=+|new>>'
+ '}';
// misc links
str += '<br><<whatLinksHere|shortcut=l>>*<<relatedChanges|shortcut=r>>*<<move|shortcut=m>>';
// admin links
str += 'if(admin){<br><<unprotect|unprotectShort>>|<<protect|shortcut=p>>|<<protectlog|log>>*' +
'<<undelete|undeleteShort>>|<<delete|shortcut=d>>|<<deletelog|log>>}';
return str;
}
function navLinksHTML (article, hint, params) { //oldid, rcid) {
var str = '<span class="popupNavLinks">' + defaultNavlinkSpec() + '</span>';
// BAM
return navlinkStringToHTML(str, article, params);
}
function expandConditionalNavlinkString(s,article,z,recursionCount) {
var oldid=z.oldid, rcid=z.rcid, diff=z.diff;
// nested conditionals (up to 10 deep) are ok, hopefully! (work from the inside out)
if (typeof recursionCount!=typeof 0) { recursionCount=0; }
var conditionalSplitRegex=RegExp(
//(1 if \\( (2 2) \\) {(3 3)} (4 else {(5 5)} 4)1)
'(;?\\s*if\\s*\\(\\s*([\\w]*)\\s*\\)\\s*\\{([^{}]*)\\}(\\s*else\\s*\\{([^{}]*?)\\}|))', 'i');
var splitted=s.parenSplit(conditionalSplitRegex);
// $1: whole conditional
// $2: test condition
// $3: true expansion
// $4: else clause (possibly empty)
// $5: false expansion (possibly null)
var numParens=5;
var ret = splitted[0];
for (var i=1; i<splitted.length; i=i+numParens+1) {
var testString=splitted[i+2-1];
var trueString=splitted[i+3-1];
var falseString=splitted[i+5-1];
if (typeof falseString=='undefined' || !falseString) { falseString=''; }
var testResult=null;
switch (testString) {
case 'user':
testResult=(article.userName())?true:false;
break;
case 'talk':
testResult=(article.talkPage())?false:true; // talkPage converts _articles_ to talkPages
break;
case 'admin':
testResult=getValueOf('popupAdminLinks')?true:false;
break;
case 'oldid':
testResult=(typeof oldid != 'undefined' && oldid)?true:false;
break;
case 'rcid':
testResult=(typeof rcid != 'undefined' && rcid)?true:false;
break;
case 'ipuser':
testResult=(article.isIpUser())?true:false;
break;
case 'mainspace_en':
testResult=isInMainNamespace(article) &&
pg.wiki.hostname=='en.wikipedia.org';
break;
case 'wikimedia':
testResult=(pg.wiki.wikimedia) ? true : false;
break;
case 'diff':
testResult=(typeof diff != 'undefined' && diff)?true:false;
break;
}
switch(testResult) {
case null: ret+=splitted[i]; break;
case true: ret+=trueString; break;
case false: ret+=falseString; break;
}
// append non-conditional string
ret += splitted[i+numParens];
}
if (conditionalSplitRegex.test(ret) && recursionCount < 10) {
return expandConditionalNavlinkString(ret,article,z,recursionCount+1);
}
return ret;
}
function navlinkStringToArray(s, article, params) {
s=expandConditionalNavlinkString(s,article,params);
var splitted=s.parenSplit(RegExp('<<(.*?)>>'));
var ret=[];
for (var i=0; i<splitted.length; ++i) {
if (i%2) { // i odd, so s is a tag
var t=new navlinkTag();
var ss=splitted[i].split('|');
t.id=ss[0];
for (var j=1; j<ss.length; ++j) {
var sss=ss[j].split('=');
if (sss.length>1) {
t[sss[0]]=sss[1];
}
else { // no assignment (no "="), so treat this as a title (overwriting the last one)
t.text=popupString(sss[0]);
}
}
t.article=article;
var oldid=params.oldid, rcid=params.rcid, diff=params.diff;
if (typeof oldid != 'undefined' && oldid != null) { t.oldid=oldid; }
if (typeof rcid != 'undefined' && rcid != null) { t.rcid=rcid; }
if (typeof diff != 'undefined' && diff != null) { t.diff=diff; }
if (!t.text && t.id != 'mainlink') { t.text=popupString(t.id); }
ret.push(t);
}
else { // plain HTML
ret.push(splitted[i]);
}
}
return ret;
}
function navlinkSubstituteHTML(s) {
return s.split('*').join(getValueOf('popupNavLinkSeparator'))
.split('<menurow>').join('<li class="popup_menu_row">')
.split('</menurow>').join('</li>')
.split('<menu>').join('<ul class="popup_menu">')
.split('</menu>').join('</ul>');
}
function navlinkDepth(magic,s) {
return s.split('<' + magic + '>').length - s.split('</' + magic + '>').length;
}
// navlinkString: * becomes the separator
// <<foo|bar=baz|fubar>> becomes a foo-link with attribute bar='baz'
// and visible text 'fubar'
// if(test){...} and if(test){...}else{...} work too (nested ok)
function navlinkStringToHTML(s,article,params) {
//limitAlert(navlinkStringToHTML, 5, 'navlinkStringToHTML\n' + article + '\n' + (typeof article));
var p=navlinkStringToArray(s,article,params);
var html='';
var menudepth = 0; // nested menus not currently allowed, but doesn't do any harm to code for it
var menurowdepth = 0;
var wrapping = null;
for (var i=0; i<p.length; ++i) {
if (typeof p[i] == typeof '') {
html+=navlinkSubstituteHTML(p[i]);
menudepth += navlinkDepth('menu', p[i]);
menurowdepth += navlinkDepth('menurow', p[i]);
// if (menudepth === 0) {
// tagType='span';
// } else if (menurowdepth === 0) {
// tagType='li';
// } else {
// tagType = null;
// }
} else if (typeof p[i].type != 'undefined' && p[i].type=='navlinkTag') {
if (menudepth > 0 && menurowdepth === 0) {
html += '<li class="popup_menu_item">' + p[i].html() + '</li>';
} else {
html+=p[i].html();
}
}
}
return html;
}
function navlinkTag() {
this.type='navlinkTag';
}
navlinkTag.prototype.html=function () {
this.getNewWin();
this.getPrintFunction();
var html='';
var opening, closing;
var tagType='span';
if (!tagType) {
opening = ''; closing = '';
} else {
opening = '<' + tagType + ' class="popup_' + this.id + '">';
closing = '</' + tagType + '>';
}
if (typeof this.print!='function') {
errlog ('Oh dear - invalid print function for a navlinkTag, id='+this.id);
} else {
html=this.print(this);
if (typeof html != typeof '') {html='';}
else if (typeof this.shortcut!='undefined') html=addPopupShortcut(html, this.shortcut);
}
return opening + html + closing;
};
navlinkTag.prototype.getNewWin=function() {
getValueOf('popupLinksNewWindow');
if (typeof pg.option.popupLinksNewWindow[this.id] === 'undefined') { this.newWin=null; }
this.newWin=pg.option.popupLinksNewWindow[this.id];
}
navlinkTag.prototype.getPrintFunction=function() { //think about this some more
// this.id and this.article should already be defined
if (typeof this.id!=typeof '' || typeof this.article!=typeof {} ) { return; }
var html='';
var a,t;
this.noPopup=1;
switch (this.id) {
case 'contribs': case 'history': case 'whatLinksHere':
case 'userPage': case 'monobook': case 'userTalk':
case 'talk': case 'article': case 'lastEdit':
this.noPopup=null;
}
switch (this.id) {
case 'email': case 'contribs': case 'block': case 'unblock':
case 'userlog': case 'userSpace': case 'deletedContribs':
this.article=this.article.userName();
}
switch (this.id) {
case 'userTalk': case 'newUserTalk': case 'editUserTalk':
case 'userPage': case 'monobook': case 'editMonobook': case 'blocklog':
this.article=this.article.userName(true);
// fall through; no break
case 'pagelog': case 'deletelog': case 'protectlog':
delete this.oldid;
}
if (this.id=='editMonobook' || this.id=='monobook') { this.article.append('/monobook.js'); }
if (this.id != 'mainlink') {
// FIXME anchor handling should be done differently with Title object
this.article=this.article.removeAnchor();
// if (typeof this.text=='undefined') this.text=popupString(this.id);
}
switch (this.id) {
case 'undelete': this.print=specialLink; this.specialpage='Undelete'; this.sep='/'; break;
case 'whatLinksHere': this.print=specialLink; this.specialpage='Whatlinkshere'; break;
case 'relatedChanges': this.print=specialLink; this.specialpage='Recentchangeslinked'; break;
case 'move': this.print=specialLink; this.specialpage='Movepage'; break;
case 'contribs': this.print=specialLink; this.specialpage='Contributions'; break;
case 'deletedContribs':this.print=specialLink; this.specialpage='Deletedcontributions'; break;
case 'email': this.print=specialLink; this.specialpage='EmailUser'; this.sep='/'; break;
case 'block': this.print=specialLink; this.specialpage='Blockip'; this.sep='&ip='; break;
case 'unblock': this.print=specialLink; this.specialpage='Ipblocklist'; this.sep='&action=unblock&ip='; break;
case 'userlog': this.print=specialLink; this.specialpage='Log'; this.sep='&user='; break;
case 'blocklog': this.print=specialLink; this.specialpage='Log'; this.sep='&type=block&page='; break;
case 'pagelog': this.print=specialLink; this.specialpage='Log'; this.sep='&page='; break;
case 'protectlog': this.print=specialLink; this.specialpage='Log'; this.sep='&type=protect&page='; break;
case 'deletelog': this.print=specialLink; this.specialpage='Log'; this.sep='&type=delete&page='; break;
case 'userSpace': this.print=specialLink; this.specialpage='PrefixIndex'; this.sep='&namespace=2&prefix='; break;
case 'search': this.print=specialLink; this.specialpage='Search'; this.sep='&fulltext=Search&search='; break;
case 'unwatch': case 'watch':
this.print=magicWatchLink; this.action=this.id+'&autowatchlist=1&actoken='+autoClickToken(); break;
case 'history': case 'historyfeed':
case 'unprotect': case 'protect':
this.print=wikiLink; this.action=this.id; break;
case 'delete':
this.print=wikiLink; this.action='delete';
if (this.article.namespaceId()==pg.nsImageId) {
var img=this.article.stripNamespace();
this.action+='&image='+img;
}
break;
case 'markpatrolled':
case 'edit': // editOld should keep the oldid, but edit should not.
delete this.oldid; // fall through
case 'view': case 'purge': case 'render':
this.print=wikiLink;
this.action=this.id; break;
case 'raw':
this.print=wikiLink; this.action='raw&ctype=text/css'; break;
case 'new':
this.print=wikiLink; this.action='edit§ion=new'; break;
case 'mainlink':
if (typeof this.text=='undefined') { this.text=this.article.toString().entify(); }
if (getValueOf('popupSimplifyMainLink') && isInStrippableNamespace(this.article)) {
var s=this.text.split('/'); this.text=s[s.length-1];
if (this.text=='' && s.length > 1) { this.text=s[s.length-2]; }
}
this.print=titledWikiLink;
if (typeof this.title=='undefined' && pg.current.link && typeof pg.current.link.href != 'undefined') {
this.title=safeDecodeURI((pg.current.link.originalTitle)?pg.current.link.originalTitle:this.article);
if (typeof this.oldid != 'undefined' && this.oldid) {
this.title=tprintf('Revision %s of %s', [this.oldid, this.title]);
}
}
this.action='view'; break;
case 'userPage':
case 'article':
case 'monobook':
case 'editMonobook':
case 'editArticle':
delete this.oldid;
//alert(this.id+'\n'+this.article + '\n'+ typeof this.article);
this.article=this.article.articleFromTalkOrArticle();
//alert(this.id+'\n'+this.article + '\n'+ typeof this.article);
this.print=wikiLink;
if (this.id.indexOf('edit')==0) {
this.action='edit';
} else { this.action='view';}
break;
case 'userTalk':
case 'talk':
this.article=this.article.talkPage();
delete this.oldid;
this.print=wikiLink;
this.action='view'; break;
case 'arin':
this.print=arinLink; break;
case 'count':
this.print=editCounterLink; break;
case 'google':
this.print=googleLink; break;
case 'editors':
this.print=editorListLink; break;
case 'globalsearch':
this.print=globalSearchLink; break;
case 'lastEdit':
this.print=titledDiffLink;
this.title=popupString('Show the last edit');
this.from='prev'; this.to='cur'; break;
case 'oldEdit':
this.print=titledDiffLink;
this.title=popupString('Show the edit made to get revision') + ' ' + this.oldid;
this.from='prev'; this.to=this.oldid; break;
case 'editOld':
this.print=wikiLink; this.action='edit'; break;
case 'undo':
this.print=wikiLink; this.action='edit&undo='; break;
case 'markpatrolled':
this.print=wikiLink; this.action='markpatrolled';
case 'revert':
this.print=wikiLink; this.action='revert'; break;
case 'nullEdit':
this.print=wikiLink; this.action='nullEdit'; break;
case 'diffCur':
this.print=titledDiffLink;
this.title=tprintf('Show changes since revision %s', [this.oldid]);
this.from=this.oldid; this.to='cur'; break;
case 'editUserTalk':
case 'editTalk':
delete this.oldid;
this.article=this.article.talkPage();
this.action='edit'; this.print=wikiLink; break;
case 'newUserTalk':
case 'newTalk':
this.article=this.article.talkPage();
this.action='edit§ion=new'; this.print=wikiLink; break;
case 'lastContrib':
case 'sinceMe':
this.print=magicHistoryLink;
break;
case 'togglePreviews':
this.text=popupString(pg.option.simplePopups ? 'enable previews' : 'disable previews');
case 'disablePopups': case 'purgePopups':
this.print=popupMenuLink;
break;
default:
this.print=function () {return 'Unknown navlink type: '+this.id+''};
}
};
//
// end navlinks
//////////////////////////////////////////////////
//</NOLITE>
// ENDFILE: navlinks.js
// STARTFILE: shortcutkeys.js
//<NOLITE>
function popupHandleKeypress(evt) {
var keyCode = window.event ? window.event.keyCode : ( evt.keyCode ? evt.keyCode : evt.which);
if (!keyCode || !pg.current.link || !pg.current.link.navpopup) { return; }
if (keyCode==27) { // escape
killPopup();
return false; // swallow keypress
}
var letter=String.fromCharCode(keyCode);
var links=pg.current.link.navpopup.mainDiv.getElementsByTagName('A');
var startLink=0;
var i,j;
if (popupHandleKeypress.lastPopupLinkSelected) {
for (i=0; i<links.length; ++i) {
if (links[i]==popupHandleKeypress.lastPopupLinkSelected) { startLink=i; }
}
}
for (j=0; j<links.length; ++j) {
i=(startLink + j + 1) % links.length;
if (links[i].getAttribute('popupkey')==letter) {
if (evt && evt.preventDefault) evt.preventDefault();
links[i].focus();
popupHandleKeypress.lastPopupLinkSelected=links[i];
return false; // swallow keypress
}
}
// pass keypress on
if (document.oldPopupOnkeypress) { return document.oldPopupOnkeypress(evt); }
return true;
}
function addPopupShortcuts() {
if (document.onkeypress!=popupHandleKeypress) {
document.oldPopupOnkeypress=document.onkeypress;
}
document.onkeypress=popupHandleKeypress;
}
function rmPopupShortcuts() {
popupHandleKeypress.lastPopupLinkSelected=null;
try {
if (document.oldPopupOnkeypress && document.oldPopupOnkeypress==popupHandleKeypress) {
// panic
document.onkeypress=null; //function () {};
return;
}
document.onkeypress=document.oldPopupOnkeypress;
} catch (nasties) { /* IE goes here */ }
}
function addLinkProperty(html, property) {
// take "<a href=...>...</a> and add a property
// not sophisticated at all, easily broken
var i=html.indexOf('>');
if (i<0) { return html; }
return html.substring(0,i) + ' ' + property + html.substring(i);
}
function addPopupShortcut(html, key) {
if (!getValueOf('popupShortcutKeys')) { return html; }
var ret= addLinkProperty(html, 'popupkey="'+key+'"');
if (key==' ') { key=popupString('spacebar'); }
return ret.replace(RegExp('^(.*?)(title=")(.*?)(".*)$', 'i'),'$1$2$3 ['+key+']$4');
}
//</NOLITE>
// ENDFILE: shortcutkeys.js
// STARTFILE: diffpreview.js
//<NOLITE>
function loadDiff(article, oldid, diff, navpop) {
navpop.diffData={};
var oldRev, newRev;
switch (diff) {
case 'cur':
switch ( oldid ) {
case null:
case '':
case 'prev':
// eg newmessages diff link
oldRev='0&direction=prev';
newRev=0;
break;
default:
oldRev = oldid;
newRev = 0;
}
break;
case 'prev':
oldRev = ( oldid || 0 ) + '&direction=prev'; newRev = oldid; break;
case 'next':
oldRev = oldid; newRev = oldid + '&direction=next';
break;
default:
oldRev = oldid || 0; newRev = diff || 0; break;
}
oldRev = oldRev || 0;
newRev = newRev || 0;
var go = function() {
pendingNavpopTask(navpop);
getWiki(article, doneDiffNew, newRev, navpop);
pendingNavpopTask(navpop);
getWiki(article, doneDiffOld, oldRev, navpop);
var tz = Cookie.read('popTz');
if ( (window.wgEnableAPI || wgEnableAPI) && getValueOf('popupAdjustDiffDates') && tz===null) {
pendingNavpopTask(navpop);
getPageWithCaching(pg.wiki.apiwikibase + '?format=json&action=query&meta=userinfo&uiprop=options',
function(d) {
completedNavpopTask(navpop);
setTimecorrectionCookie(d);
if (diffDownloadsComplete(navpop)) { insertDiff(navpop); }
}, navpop);
}
return true; // remove hook once run
}
if (navpop.visible || !getValueOf('popupLazyDownloads')) { go(); }
else { navpop.addHook(go, 'unhide', 'before', 'DOWNLOAD_DIFFS'); }
}
function setTimecorrectionCookie(d) {
try {
var jsobj=getJsObj(d.data);
var tz=jsobj.query.userinfo.options.timecorrection;
} catch (someError) {
logerr( 'setTimecorretion failed' );
return;
}
Cookie.create( 'popTz', getTimeOffset(tz), 1);
}
function doneDiff(download, isOld) {
if (!download.owner || !download.owner.diffData) { return; }
var navpop=download.owner;
var label= (isOld) ? 'Old' : 'New';
var otherLabel=(isOld) ? 'New' : 'Old';
navpop.diffData[label]=download;
completedNavpopTask(download.owner);
if (diffDownloadsComplete(navpop)) { insertDiff(navpop); }
}
function diffDownloadsComplete(navpop) {
if ( Cookie.read('popTz')===null) { return false; }
return navpop.diffData.Old && navpop.diffData.New;
}
function doneDiffNew(download) { doneDiff(download, false); }
function doneDiffOld(download) { doneDiff(download, true); }
function rmBoringLines(a,b,context) {
if (typeof context == 'undefined') { context=2; }
// this is fairly slow... i think it's quicker than doing a word-based diff from the off, though
var aa=[], aaa=[];
var bb=[], bbb=[];
var i, j;
// first, gather all disconnected nodes in a and all crossing nodes in a and b
for (i=0; i<a.length; ++i ) {
if(!a[i].paired) { aa[i]=1; }
else if (countCrossings(b,a,i, true)) {
aa[i]=1;
bb[ a[i].row ] = 1;
}
}
// pick up remaining disconnected nodes in b
for (i=0; i<b.length; ++i ) {
if (bb[i]==1) { continue; }
if(!b[i].paired) { bb[i]=1; }
}
// another pass to gather context: we want the neighbours of included nodes which are not yet included
// we have to add in partners of these nodes, but we don't want to add context for *those* nodes in the next pass
for (i=0; i<b.length; ++i) {
if ( bb[i] == 1 ) {
for (j=max(0,i-context); j < min(b.length, i+context); ++j) {
if ( !bb[j] ) { bb[j] = 1; aa[ b[j].row ] = 0.5; }
}
}
}
for (i=0; i<a.length; ++i) {
if ( aa[i] == 1 ) {
for (j=max(0,i-context); j < min(a.length, i+context); ++j) {
if ( !aa[j] ) { aa[j] = 1; bb[ a[j].row ] = 0.5; }
}
}
}
for (i=0; i<bb.length; ++i) {
if (bb[i] > 0) { // it's a row we need
if (b[i].paired) { bbb.push(b[i].text); } // joined; partner should be in aa
else {
bbb.push(b[i]);
}
}
}
for (i=0; i<aa.length; ++i) {
if (aa[i] > 0) { // it's a row we need
if (a[i].paired) { aaa.push(a[i].text); } // joined; partner should be in aa
else {
aaa.push(a[i]);
}
}
}
return { a: aaa, b: bbb};
}
function stripOuterCommonLines(a,b,context) {
var i=0;
while (i<a.length && i < b.length && a[i]==b[i]) { ++i; }
var j=a.length-1; var k=b.length-1;
while ( j>=0 && k>=0 && a[j]==b[k] ) { --j; --k; }
return { a: a.slice(max(0,i - 1 - context), min(a.length+1, j + context+1)),
b: b.slice(max(0,i - 1 - context), min(b.length+1, k + context+1)) };
}
function insertDiff(navpop) {
// for speed reasons, we first do a line-based diff, discard stuff that seems boring, then do a word-based diff
// FIXME: sometimes this gives misleading diffs as distant chunks are squashed together
var oldlines=navpop.diffData.Old.data.split('\n');
var newlines=navpop.diffData.New.data.split('\n');
var inner=stripOuterCommonLines(oldlines,newlines,getValueOf('popupDiffContextLines'));
oldlines=inner.a; newlines=inner.b;
var truncated=false;
getValueOf('popupDiffMaxLines');
if (oldlines.length > pg.option.popupDiffMaxLines || newlines.length > pg.option.popupDiffMaxLines) {
// truncate
truncated=true;
inner=stripOuterCommonLines(oldlines.slice(0,pg.option.popupDiffMaxLines),
newlines.slice(0,pg.option.popupDiffMaxLines),
pg.option.popupDiffContextLines);
oldlines=inner.a; newlines=inner.b;
}
var lineDiff=diff(oldlines, newlines);
var lines2=rmBoringLines(lineDiff.o, lineDiff.n);
var oldlines2=lines2.a; var newlines2=lines2.b;
var simpleSplit = !String.prototype.parenSplit.isNative;
var html='<hr>';
if (getValueOf('popupDiffDates')) {
html += diffDatesTable(navpop.diffData.Old, navpop.diffData.New);
html += '<hr>';
}
html += shortenDiffString(
diffString(oldlines2.join('\n'), newlines2.join('\n'), simpleSplit),
getValueOf('popupDiffContextCharacters') ).join('<hr>');
setPopupTipsAndHTML(html.split('\n').join('<br>') +
(truncated ? '<hr><b>'+popupString('Diff truncated for performance reasons')+'</b>' : '') ,
'popupPreview', navpop.idNumber);
}
function diffDatesTable( oldDl, newDl ) {
var html='<table class="popup_diff_dates">';
html += diffDatesTableRow( newDl, tprintf('New revision'));
html += diffDatesTableRow( oldDl, tprintf('Old revision'));
html += '</table>';
return html;
}
function diffDatesTableRow( dl, label ) {
var txt='';
if (!dl) {
txt=popupString('Something went wrong :-(');
} else if (!dl.lastModified) {
txt= (/^\s*$/.test(dl.data)) ?
popupString('Empty revision, maybe non-existent') : popupString('Unknown date');
} else {
var datePrint=getValueOf('popupDiffDatePrinter');
if (typeof dl.lastModified[datePrint] == 'function') {
if (getValueOf('popupAdjustDiffDates')) {
var off;
if (off=Cookie.read('popTz')) {
var d2=adjustDate(dl.lastModified, off);
txt = dayFormat(d2, true) + ' ' + timeFormat(d2, true);
}
} else {
txt = dl.lastModified[datePrint]();
}
} else {
txt = tprintf('Invalid %s %s', ['popupDiffDatePrinter', datePrint]);
}
}
var revlink = generalLink({url: dl.url.replace(/&.*?(oldid=[0-9]+(?:&direction=[^&]*)?).*/, '&$1'),
text: label, title: label});
return simplePrintf('<tr><td>%s</td><td>%s</td></tr>', [ revlink, txt ]);
}
//</NOLITE>
// ENDFILE: diffpreview.js
// STARTFILE: links.js
//<NOLITE>
/////////////////////
// LINK GENERATION //
/////////////////////
// titledDiffLink --> titledWikiLink --> generalLink
// wikiLink --> titledWikiLink --> generalLink
// editCounterLink --> generalLink
function titledDiffLink(l) { // article, text, title, from, to) {
return titledWikiLink({article: l.article, action: l.to + '&oldid=' + l.from,
newWin: l.newWin,
noPopup: l.noPopup,
text: l.text, title: l.title,
/* hack: no oldid here */
actionName: 'diff'});
}
function wikiLink(l) {
//{article:article, action:action, text:text, oldid, newid}) {
if (! (typeof l.article == typeof {}
&& typeof l.action == typeof '' && typeof l.text==typeof '')) return null;
if (typeof l.oldid == 'undefined') { l.oldid=null; }
var savedOldid = l.oldid;
if (!/^(edit|view|revert|render)$|^raw/.test(l.action)) { l.oldid=null; }
var hint=popupString(l.action + 'Hint'); // revertHint etc etc etc
var oldidData=[l.oldid, safeDecodeURI(l.article)];
var revisionString = tprintf('revision %s of %s', oldidData);
log('revisionString='+revisionString);
switch (l.action) {
case 'edit§ion=new': hint = popupString('newSectionHint'); break;
case 'edit&undo=':
if (l.diff && l.diff != 'prev' && savedOldid ) {
l.action += l.diff + '&undoafter=' + savedOldid;
} else if (savedOldid) {
l.action += savedOldid;
}
hint = popupString('undoHint');
break;
case 'raw&ctype=text/css': hint=popupString('rawHint'); break;
case 'revert':
if (!window.wgEnableAPI || !wgEnableAPI) {
alert( 'This function of navigation popups now requires a MediaWiki ' +
'installation with the API enabled.');
break;
}
var p=parseParams(pg.current.link.href);
l.action='edit&autoclick=wpSave&actoken=' + autoClickToken() + '&autosummary=' + revertSummary(l.oldid, p.diff);
if (p.diff=='prev') {
l.action += '&direction=prev';
revisionString = tprintf('the revision prior to revision %s of %s', oldidData);
}
if (getValueOf('popupRevertSummaryPrompt')) { l.action += '&autosummaryprompt=true'; }
if (getValueOf('popupMinorReverts')) { l.action += '&autominor=true'; }
log('revisionString is now '+revisionString);
break;
case 'nullEdit':
l.action='edit&autoclick=wpSave&actoken=' + autoClickToken() + '&autosummary=null';
break;
case 'historyfeed':
l.action='history&feed=rss';
break;
case 'markpatrolled':
l.action='markpatrolled&rcid='+l.rcid;
}
if (hint) {
if (l.oldid) {
hint = simplePrintf(hint, [revisionString]);
}
else {
hint = simplePrintf(hint, [safeDecodeURI(l.article)]);
}
}
else {
hint = safeDecodeURI(l.article + '&action=' + l.action) + (l.oldid) ? '&oldid='+l.oldid : '';
}
return titledWikiLink({article: l.article, action: l.action, text: l.text, newWin:l.newWin,
title: hint, oldid: l.oldid, noPopup: l.noPopup, onclick: l.onclick});
}
function revertSummary(oldid, diff) {
var ret='';
if (diff == 'prev') {
ret=getValueOf('popupQueriedRevertToPreviousSummary');
} else { ret = getValueOf('popupQueriedRevertSummary'); }
return ret + '&autorv=' + oldid;
}
function titledWikiLink(l) {
// possible properties of argument:
// article, action, text, title, oldid, actionName, className, noPopup
// oldid = null is fine here
// article and action are mandatory args
if (typeof l.article == 'undefined' || typeof l.action=='undefined') {
errlog('got undefined article or action in titledWikiLink');
return null;
}
var base = pg.wiki.titlebase + l.article.urlString();
var url=base;
if (typeof l.actionName=='undefined' || !l.actionName) { l.actionName='action'; }
// no need to add &action=view, and this confuses anchors
if (l.action != 'view') { url = base + '&' + l.actionName + '=' + l.action; }
if (typeof l.oldid!='undefined' && l.oldid) { url+='&oldid='+l.oldid; }
var cssClass=pg.misc.defaultNavlinkClassname;
if (typeof l.className!='undefined' && l.className) { cssClass=l.className; }
return generalNavLink({url: url, newWin: l.newWin,
title: (typeof l.title != 'undefined') ? l.title : null,
text: (typeof l.text!='undefined')?l.text:null,
className: cssClass, noPopup:l.noPopup, onclick:l.onclick});
}
function getLastContrib(wikipage, newWin) {
getHistoryInfo(wikipage, function(x){processLastContribInfo(x,{page: wikipage, newWin: newWin})});
}
function processLastContribInfo(info, stuff) {
if(!info.edits || !info.edits.length) { alert('Popups: an odd thing happened. Please retry.'); return; }
if(!info.firstNewEditor) {
alert(tprintf('Only found one editor: %s made %s edits', [info.edits[0].editor,info.edits.length]));
return;
}
var newUrl=pg.wiki.titlebase + new Title(stuff.page).urlString() + '&diff=cur&oldid='+info.firstNewEditor.oldid;
displayUrl(newUrl, stuff.newWin);
}
function getDiffSinceMyEdit(wikipage, newWin) {
getHistoryInfo(wikipage, function(x){processDiffSinceMyEdit(x,{page: wikipage, newWin: newWin})});
}
function processDiffSinceMyEdit(info, stuff) {
if(!info.edits || !info.edits.length) { alert('Popups: something fishy happened. Please try again.'); return; }
var friendlyName=stuff.page.split('_').join(' ');
if(!info.myLastEdit) {
alert(tprintf('Couldn\'t find an edit by %s\nin the last %s edits to\n%s',
[info.userName, getValueOf('popupHistoryLimit'), friendlyName]));
return;
}
if(info.myLastEdit.index==0) {
alert(tprintf("%s seems to be the last editor to the page %s", [info.userName, friendlyName]));
return;
}
var newUrl=pg.wiki.titlebase + new Title(stuff.page).urlString() + '&diff=cur&oldid='+ info.myLastEdit.oldid;
displayUrl(newUrl, stuff.newWin);
}
function displayUrl(url, newWin){
if(newWin) { window.open(url); }
else { document.location=url; }
}
function purgePopups() {
processAllPopups(true);
setupCache(); // deletes all cached items (not browser cached, though...)
pg.option={};
abortAllDownloads();
}
function processAllPopups(nullify, banish) {
for (var i=0; i<pg.current.links.length; ++i) {
if (!pg.current.links[i].navpopup) { continue; }
(nullify || banish) && pg.current.links[i].navpopup.banish();
pg.current.links[i].simpleNoMore=false;
nullify && (pg.current.links[i].navpopup=null);
}
}
function disablePopups(){
processAllPopups(false, true);
setupTooltips(null, true);
}
function togglePreviews() {
processAllPopups(true, true);
pg.option.simplePopups=!pg.option.simplePopups;
abortAllDownloads();
}
function magicWatchLink(l) {
//Yuck!! Would require a thorough redesign to add this as a click event though ...
l.onclick = simplePrintf( 'modifyWatchlist(\'%s\',\'%s\');return false;', [l.article.toString(true).split("\\").join("\\\\").split("'").join("\\'"), this.id] );
return wikiLink(l);
}
function modifyWatchlist(title, action) {
var reqData = {
'action': 'watch',
'format': 'json',
'title': title,
'token': mw.user.tokens.get('watchToken'),
'uselang': mw.config.get('wgUserLanguage')
};
if (action==='unwatch') reqData.unwatch = '';
jQuery.ajax({
url: mw.util.wikiScript('api'),
dataType: 'json',
type: 'POST',
data: reqData,
success: function( data, textStatus, xhr ) {
mw.util.jsMessage( data.watch.message, 'watch' );
}
});
}
function magicHistoryLink(l) {
// FIXME use onclick change href trick to sort this out instead of window.open
var jsUrl='', title='';
switch(l.id) {
case 'lastContrib':
jsUrl=simplePrintf('javascript:getLastContrib(\'%s\',%s)',
[l.article.toString(true).split("\\").join("\\\\").split("'").join("\\'"), l.newWin]);
title=popupString('lastContribHint');
break;
case 'sinceMe':
jsUrl=simplePrintf('javascript:getDiffSinceMyEdit(\'%s\',%s)',
[l.article.toString(true).split("\\").join("\\\\").split("'").join("\\'"), l.newWin]);
title=popupString('sinceMeHint');
break;
}
return generalNavLink({url: jsUrl, newWin: false, // can't have new windows with JS links, I think
title: title, text: l.text, noPopup: l.noPopup});
}
function popupMenuLink(l) {
var jsUrl=simplePrintf('javascript:%s()', [l.id]);
var title=popupString(simplePrintf('%sHint', [l.id]));
return generalNavLink({url: jsUrl, newWin:false, title:title, text:l.text, noPopup:l.noPopup});
}
function specialLink(l) {
// properties: article, specialpage, text, sep
if (typeof l.specialpage=='undefined'||!l.specialpage) return null;
var base = pg.wiki.titlebase + mw.config.get('wgFormattedNamespaces')[pg.nsSpecialId]+':'+l.specialpage;
if (typeof l.sep == 'undefined' || l.sep===null) l.sep='&target=';
var article=l.article.urlString({keepSpaces: l.specialpage=='Search'});
var hint=popupString(l.specialpage+'Hint');
switch (l.specialpage) {
case 'Log':
switch (l.sep) {
case '&user=': hint=popupString('userLogHint'); break;
case '&type=block&page=': hint=popupString('blockLogHint'); break;
case '&page=': hint=popupString('pageLogHint'); break;
case '&type=protect&page=': hint=popupString('protectLogHint'); break;
case '&type=delete&page=': hint=popupString('deleteLogHint'); break;
default: log('Unknown log type, sep=' + l.sep); hint='Missing hint (FIXME)';
}
break;
case 'PrefixIndex': article += '/'; break;
}
if (hint) hint = simplePrintf(hint, [safeDecodeURI(l.article)]);
else hint = safeDecodeURI(l.specialpage+':'+l.article) ;
var url = base + l.sep + article;
return generalNavLink({url: url, title: hint, text: l.text, newWin:l.newWin, noPopup:l.noPopup});
}
function generalLink(l) {
// l.url, l.text, l.title, l.newWin, l.className, l.noPopup, l.onclick
if (typeof l.url=='undefined') return null;
// only quotation marks in the url can screw us up now... I think
var url=l.url.split('"').join('%22');
var ret='<a href="' + url + '"';
if (typeof l.title!='undefined' && l.title) { ret += ' title="' + pg.escapeQuotesHTML(l.title) + '"'; }
if (typeof l.onclick!='undefined' && l.onclick) { ret += ' onclick="' + pg.escapeQuotesHTML(l.onclick) + '"'; }
if (l.noPopup) { ret += ' noPopup=1'; }
var newWin;
if (typeof l.newWin=='undefined' || l.newWin===null) { newWin=getValueOf('popupNewWindows'); }
else { newWin=l.newWin; }
if (newWin) { ret += ' target="_blank"'; }
if (typeof l.className!='undefined'&&l.className) { ret+=' class="'+l.className+'"'; }
ret += '>';
if (typeof l.text==typeof '') { ret+= l.text; }
ret +='</a>';
return ret;
}
function appendParamsToLink(linkstr, params) {
var sp=linkstr.parenSplit(RegExp('(href="[^"]+?)"', 'i'));
if (sp.length<2) return null;
var ret=sp.shift() + sp.shift();
ret += '&' + params + '"';
ret += sp.join('');
return ret;
}
function changeLinkTargetLink(x) { // newTarget, text, hint, summary, clickButton, minor, title (optional) {
if (x.newTarget) {
log ('changeLinkTargetLink: newTarget=' + x.newTarget);
}
// optional: oldTarget (in wikitext)
// if x.newTarget omitted or null, remove the link
//x.text=encodeURI(x.text); // this buggers things up on zh.wikipedia.org and doesn't seem necessary
x.clickButton=encodeURI(x.clickButton);
// FIXME: first character of page title as well as namespace should be case insensitive
// eg [[category:foo]] and [[Category:Foo]] are equivalent
// this'll break if charAt(0) is nasty
var cA=literalizeRegex(x.oldTarget);
var chs=cA.charAt(0).toUpperCase();
chs='['+chs + chs.toLowerCase()+']';
var currentArticleRegexBit=encodeURIComponent(chs+cA.substring(1));
currentArticleRegexBit=currentArticleRegexBit
.split(RegExp('[_ ]+', 'g')).join('[_ ]+')
.split( "%20" ).join('[_ ]+')
.split('\\(').join('(?:%2528|\\()')
.split('\\)').join('(?:%2529|\\))');
// leading and trailing space should be ignored, and anchor bits optional:
currentArticleRegexBit = '\\s*(' + currentArticleRegexBit + '(?:#[^\\[\\|]*)?)\\s*';
// e.g. Computer (archaic) -> \s*([Cc]omputer[_ ](?:%2528|\()archaic(?:%2528|\)))\s*
// autoedit=s~\[\[([Cc]ad)\]\]~[[Computer-aided%20design|$1]]~g;s~\[\[([Cc]AD)[|]~[[Computer-aided%20design|~g
var title=x.title || wgPageName.split('_').join(' ');
var lk=titledWikiLink({article: new Title(title), newWin:x.newWin,
action: 'edit',
text: x.text,
title: x.hint,
className: 'popup_change_title_link'
});
var cmd='';
if (x.newTarget) {
// escape '&' and other nasties
var t=encodeURIComponent(x.newTarget);
var s=encodeURIComponent(literalizeRegex(x.newTarget));
cmd += 's~\\[\\['+currentArticleRegexBit+'\\]\\]~[['+t+'|$1]]~g;';
cmd += 's~\\[\\['+currentArticleRegexBit+'[|]~[['+t+'|~g;';
cmd += 's~\\[\\['+s + '\\|' + s + '\\]\\]~[[' + t + ']]~g';
} else {
cmd += 's~\\[\\['+currentArticleRegexBit+'\\]\\]~$1~g;';
cmd += 's~\\[\\['+currentArticleRegexBit+'[|](.*?)\\]\\]~$2~g';
}
cmd += '&autoclick='+x.clickButton + '&actoken=' + autoClickToken();
cmd += ( x.minor == null ) ? '' : '&autominor='+x.minor;
cmd += ( x.watch == null ) ? '' : '&autowatch='+x.watch;
cmd += '&autosummary='+encodeURIComponent(x.summary);
return appendParamsToLink(lk, 'autoedit='+cmd);
}
function redirLink(redirMatch, article) {
// NB redirMatch is in wikiText
var ret='';
if (getValueOf('popupAppendRedirNavLinks') && getValueOf('popupNavLinks')) {
ret += '<hr>';
if (getValueOf('popupFixRedirs') && typeof autoEdit != 'undefined' && autoEdit) {
log('redirLink: newTarget=' + redirMatch);
ret += addPopupShortcut(
changeLinkTargetLink(
{newTarget: redirMatch, text: popupString('Redirects'),
hint: popupString('Fix this redirect'),
summary: simplePrintf(getValueOf('popupFixRedirsSummary'),
[article.toString(), redirMatch ]),
oldTarget: article.toString(),
clickButton: getValueOf('popupRedirAutoClick'), minor: true,
watch: getValueOf('popupWatchRedirredPages')})
, 'R');
ret += popupString(' to ');
}
else ret += popupString('Redirects') + popupString(' to ');
return ret;
}
else return '<br> ' + popupString('Redirects') + popupString(' to ') +
titledWikiLink({article: new Title().fromWikiText(redirMatch), action: 'view', /* FIXME: newWin */
text: safeDecodeURI(redirMatch), title: popupString('Bypass redirect')});
}
function arinLink(l) {
if (!saneLinkCheck(l)) { return null; }
if ( ! l.article.isIpUser() || ! pg.wiki.wikimedia) return null;
var uN=l.article.userName();
return generalNavLink({url:'http://ws.arin.net/cgi-bin/whois.pl?queryinput=' + encodeURIComponent(uN), newWin:l.newWin,
title: tprintf('Look up %s in ARIN whois database', [uN]),
text: l.text, noPopup:1});
}
function toolDbName(cookieStyle) {
var ret = wgDBname;
if (!cookieStyle) { ret+= '_p'; }
return ret;
}
function saneLinkCheck(l) {
if (typeof l.article != typeof {} || typeof l.text != typeof '') { return false; }
return true;
}
function editCounterLink(l) {
if(!saneLinkCheck(l)) return null;
if (! pg.wiki.wikimedia) return null;
var uN=l.article.userName();
var tool=getValueOf('popupEditCounterTool');
var url;
var soxredToolUrl='//tools.wmflabs.org/xtools/pcount/index.php?name=$1&lang=$2&wiki=$3';
switch(tool) {
case 'custom':
url=simplePrintf(getValueOf('popupEditCounterUrl'), [ encodeURIComponent(uN), toolDbName() ]);
break;
case 'kate':
case 'interiot':
default:
var theWiki=pg.wiki.hostname.split('.');
url=simplePrintf(soxredToolUrl, [ encodeURIComponent(uN), theWiki[0], theWiki[1] ]);
}
return generalNavLink({url:url, title: tprintf('editCounterLinkHint', [uN]),
newWin:l.newWin, text: l.text, noPopup:1});
}
function globalSearchLink(l) {
if(!saneLinkCheck(l)) return null;
var base='http://vs.aka-online.de/cgi-bin/globalwpsearch.pl?timeout=120&search=';
var article=l.article.urlString({keepSpaces:true});
return generalNavLink({url:base + article, newWin:l.newWin,
title: tprintf('globalSearchHint', [safeDecodeURI(l.article)]),
text: l.text, noPopup:1});
}
function googleLink(l) {
if(!saneLinkCheck(l)) return null;
var base='http://www.google.com/search?q=';
var article=l.article.urlString({keepSpaces:true});
return generalNavLink({url:base + '%22' + article + '%22', newWin:l.newWin,
title: tprintf('googleSearchHint', [safeDecodeURI(l.article)]),
text: l.text, noPopup:1});
}
function editorListLink(l) {
if(!saneLinkCheck(l)) return null;
var article= l.article.articleFromTalkPage() || l.article;
var theWiki=pg.wiki.hostname.split('.');
var base='//toolserver.org/~tparis/articleinfo/index.php?&uselang=' + wgUserLanguage +
'lang=' + theWiki[0] + '&wiki=' + theWiki[1] + '&begin=&end=&article='
return generalNavLink({url:base+article.urlString(),
title: tprintf('editorListHint', [article]),
newWin:l.newWin, text: l.text, noPopup:1});
}
function generalNavLink(l) {
l.className = (l.className==null) ? 'popupNavLink' : l.className;
return generalLink(l);
}
//////////////////////////////////////////////////
// magic history links
//
function getHistoryInfo(wikipage, whatNext) {
log('getHistoryInfo');
getHistory(wikipage, whatNext ? function(d){whatNext(processHistory(d));} : processHistory);
}
// FIXME eliminate pg.idNumber ... how? :-(
function getHistory(wikipage, onComplete) {
log('getHistory');
if( !window.wgEnableAPI || !wgEnableAPI ) {
alert( 'This function of navigation popups now requires a MediaWiki ' +
'installation with the API enabled.');
return false;
}
var url = pg.wiki.apiwikibase + '?format=json&action=query&prop=revisions&titles=' +
new Title(wikipage).urlString() + '&rvlimit=' + getValueOf('popupHistoryLimit');
log('getHistory: url='+url);
if (pg.flag.isIE) {
url = url + '&*'; //to circumvent https://bugzilla.wikimedia.org/show_bug.cgi?id=28840
}
return startDownload(url, pg.idNumber+'history', onComplete);
}
function processHistory(download) {
var jsobj = getJsObj(download.data);
try {
window.x=jsobj;
var p=jsobj['query']['pages']
for (var pageid in p) {
var revisions=p[pageid]['revisions'];
// we only get the first one
break;
}
} catch (someError) {
log('Something went wrong with JSON business');
return finishProcessHistory([]);
}
var edits=[];
for (var i=0; i<revisions.length; ++i) {
edits.push({ oldid: revisions[i]['revid'], editor: revisions[i]['user'] });
}
log('processed ' + edits.length + ' edits');
return finishProcessHistory(edits, wgUserName);
}
function finishProcessHistory(edits, userName) {
var histInfo={};
histInfo.edits=edits;
histInfo.userName=userName;
for (var i=0; i<edits.length; ++i) {
if (typeof histInfo.myLastEdit == 'undefined' && userName && edits[i].editor==userName) {
histInfo.myLastEdit={index: i, oldid: edits[i].oldid, previd: (i==0 ? null : edits[i-1].oldid)};
}
if (typeof histInfo.firstNewEditor == 'undefined' && edits[i].editor != edits[0].editor) {
histInfo.firstNewEditor={index:i, oldid:edits[i].oldid, previd: (i==0 ? null : edits[i-1].oldid)};
}
}
//pg.misc.historyInfo=histInfo;
return histInfo;
}
//</NOLITE>
// ENDFILE: links.js
// STARTFILE: options.js
//////////////////////////////////////////////////
// options
// check for cookies and existing value, else use default
function defaultize(x) {
var val=null;
if (x!='popupCookies') {
defaultize('popupCookies');
if (pg.option.popupCookies && (val=Cookie.read(x))) {
pg.option[x]=val;
return;
}
}
if (pg.option[x]===null || typeof pg.option[x]=='undefined') {
if (typeof window[x] != 'undefined' ) pg.option[x]=window[x];
else pg.option[x]=pg.optionDefault[x];
}
}
function newOption(x, def) {
pg.optionDefault[x]=def;
}
function setDefault(x, def) {
return newOption(x, def);
}
function getValueOf(varName) {
defaultize(varName);
return pg.option[varName];
}
function useDefaultOptions() { // for testing
for (var p in pg.optionDefault) {
pg.option[p]=pg.optionDefault[p];
if (typeof window[p]!='undefined') { delete window[p]; }
}
}
function setOptions() {
// user-settable parameters and defaults
var userIsSysop = false;
if ( wgUserGroups ) {
for ( var g = 0; g < wgUserGroups.length; ++g ) {
if ( wgUserGroups[g] == "sysop" )
userIsSysop = true
}
}
// Basic options
newOption('popupDelay', 0.5);
newOption('popupHideDelay', 0.5);
newOption('simplePopups', false);
newOption('popupStructure', 'shortmenus'); // see later - default for popupStructure is 'original' if simplePopups is true
newOption('popupActionsMenu', true);
newOption('popupSetupMenu', true);
newOption('popupAdminLinks', userIsSysop);
newOption('popupShortcutKeys', false);
newOption('popupHistoricalLinks', true);
newOption('popupOnlyArticleLinks', true);
newOption('removeTitles', true);
newOption('popupMaxWidth', 350);
newOption('popupInitialWidth', false); // integer or false
newOption('popupSimplifyMainLink', true);
newOption('popupAppendRedirNavLinks', true);
newOption('popupTocLinks', false);
newOption('popupSubpopups', true);
newOption('popupDragHandle', false /* 'popupTopLinks'*/);
newOption('popupLazyPreviews', true);
newOption('popupLazyDownloads', true);
newOption('popupAllDabsStubs', false);
newOption('popupDebugging', false);
newOption('popupAdjustDiffDates', true);
newOption('popupActiveNavlinks', true);
newOption('popupModifier', false); // ctrl, shift, alt or meta
newOption('popupModifierAction', 'enable'); // or 'disable'
newOption('popupDraggable', true);
//<NOLITE>
// images
newOption('popupImages', true);
newOption('imagePopupsForImages', true);
newOption('popupNeverGetThumbs', false);
//newOption('popupImagesToggleSize', true);
newOption('popupThumbAction', 'imagepage'); //'sizetoggle');
newOption('popupImageSize', 60);
newOption('popupImageSizeLarge', 200);
// redirs, dabs, reversion
newOption('popupFixRedirs', false);
newOption('popupRedirAutoClick', 'wpDiff');
newOption('popupFixDabs', false);
newOption('popupRevertSummaryPrompt', false);
newOption('popupMinorReverts', false);
newOption('popupRedlinkRemoval', false);
newOption('popupWatchDisambiggedPages', null);
newOption('popupWatchRedirredPages', null);
newOption('popupDabWiktionary', 'last');
// navlinks
newOption('popupNavLinks', true);
newOption('popupNavLinkSeparator', ' ⋅ ');
newOption('popupLastEditLink', true);
newOption('popupEditCounterTool', 'soxred');
newOption('popupEditCounterUrl', '');
newOption('popupExtraUserMenu', '');
//</NOLITE>
// previews etc
newOption('popupPreviews', true);
newOption('popupSummaryData', true);
newOption('popupMaxPreviewSentences', 5);
newOption('popupMaxPreviewCharacters', 600);
newOption('popupLastModified', true);
newOption('popupPreviewKillTemplates', true);
newOption('popupPreviewRawTemplates', true);
newOption('popupPreviewFirstParOnly', true);
newOption('popupPreviewCutHeadings', true);
newOption('popupPreviewButton', false);
newOption('popupPreviewButtonEvent', 'click');
//<NOLITE>
// diffs
newOption('popupPreviewDiffs', true);
newOption('popupDiffMaxLines', 100);
newOption('popupDiffContextLines', 2);
newOption('popupDiffContextCharacters', 40);
newOption('popupDiffDates', true);
newOption('popupDiffDatePrinter', 'toLocaleString');
// edit summaries. God, these are ugly.
newOption('popupFixDabsSummary', popupString('defaultpopupFixDabsSummary') );
newOption('popupExtendedRevertSummary', popupString('defaultpopupExtendedRevertSummary') );
newOption('popupTimeOffset', null);
newOption('popupRevertSummary', popupString('defaultpopupRevertSummary') );
newOption('popupRevertToPreviousSummary', popupString('defaultpopupRevertToPreviousSummary') );
newOption('popupQueriedRevertSummary', popupString('defaultpopupQueriedRevertSummary') );
newOption('popupQueriedRevertToPreviousSummary', popupString('defaultpopupQueriedRevertToPreviousSummary') );
newOption('popupFixRedirsSummary', popupString('defaultpopupFixRedirsSummary') );
newOption('popupRedlinkSummary', popupString('defaultpopupRedlinkSummary') );
newOption('popupRmDabLinkSummary', popupString('defaultpopupRmDabLinkSummary') );
//</NOLITE>
// misc
newOption('popupCookies', false);
newOption('popupHistoryLimit', 50);
//<NOLITE>
newOption('popupFilters', [popupFilterStubDetect, popupFilterDisambigDetect,
popupFilterPageSize, popupFilterCountLinks,
popupFilterCountImages, popupFilterCountCategories,
popupFilterLastModified]);
newOption('extraPopupFilters', []);
newOption('popupOnEditSelection', 'cursor');
newOption('popupPreviewHistory', true);
newOption('popupImageLinks', true);
newOption('popupCategoryMembers', true);
newOption('popupUserInfo', true);
newOption('popupHistoryPreviewLimit', 25);
newOption('popupContribsPreviewLimit',25);
newOption('popupRevDelUrl', '//en.wikipedia.org/wiki/Wikipedia:Revision_deletion');
//</NOLITE>
// new windows
newOption('popupNewWindows', false);
newOption('popupLinksNewWindow', {'lastContrib': true, 'sinceMe': true});
// regexps
newOption('popupDabRegexp', '(\\{\\{\\s*disambig(?!uation needed)|disambig\\s*\\}\\}|disamb\\s*\\}\\}|dab\\s*\\}\\})|\\{\\{\\s*(((geo|hn|road?|school|number)dis)|[234][lc][acw]|(road|ship)index)(\\s*[|][^}]*)?\\s*[}][}]|is a .*disambiguation.*page');
newOption('popupAnchorRegexp', 'anchors?'); //how to identify an anchors template
newOption('popupStubRegexp', '(sect)?stub[}][}]|This .*-related article is a .*stub');
newOption('popupImageVarsRegexp', 'image|image_(?:file|skyline|name|flag|seal)|cover|badge|logo');
}
// ENDFILE: options.js
// STARTFILE: strings.js
//<NOLITE>
//////////////////////////////////////////////////
// Translatable strings
//////////////////////////////////////////////////
//
// See instructions at
// http://en.wikipedia.org/wiki/Wikipedia:Tools/Navigation_popups/Translation
pg.string = {
/////////////////////////////////////
// summary data, searching etc.
/////////////////////////////////////
'article': 'article',
'category': 'category',
'categories': 'categories',
'image': 'image',
'images': 'images',
'stub': 'stub',
'section stub': 'section stub',
'Empty page': 'Empty page',
'kB': 'kB',
'bytes': 'bytes',
'day': 'day',
'days': 'days',
'hour': 'hour',
'hours': 'hours',
'minute': 'minute',
'minutes': 'minutes',
'second': 'second',
'seconds': 'seconds',
'week': 'week',
'weeks': 'weeks',
'search': 'search',
'SearchHint': 'Find English Wikipedia articles containing %s',
'web': 'web',
'global': 'global',
'globalSearchHint': 'Search across Wikipedias in different languages for %s',
'googleSearchHint': 'Google for %s',
/////////////////////////////////////
// article-related actions and info
// (some actions also apply to user pages)
/////////////////////////////////////
'actions': 'actions', ///// view articles and view talk
'popupsMenu': 'popups',
'togglePreviewsHint': 'Toggle preview generation in popups on this page',
'enable previews': 'enable previews',
'disable previews': 'disable previews',
'toggle previews': 'toggle previews',
'show preview': 'show preview',
'reset': 'reset',
'more...': 'more...',
'disable': 'disable popups',
'disablePopupsHint': 'Disable popups on this page. Reload page to re-enable.',
'historyfeedHint': 'RSS feed of recent changes to this page',
'purgePopupsHint': 'Reset popups, clearing all cached popup data.',
'PopupsHint': 'Reset popups, clearing all cached popup data.',
'spacebar': 'space',
'view': 'view',
'view article': 'view article',
'viewHint': 'Go to %s',
'talk': 'talk',
'talk page': 'talk page',
'this revision': 'this revision',
'revision %s of %s': 'revision %s of %s',
'Revision %s of %s': 'Revision %s of %s',
'the revision prior to revision %s of %s': 'the revision prior to revision %s of %s',
'Toggle image size': 'Click to toggle image size',
'del': 'del', ///// delete, protect, move
'delete': 'delete',
'deleteHint': 'Delete %s',
'undeleteShort': 'un',
'UndeleteHint': 'Show the deletion history for %s',
'protect': 'protect',
'protectHint': 'Restrict editing rights to %s',
'unprotectShort': 'un',
'unprotectHint': 'Allow %s to be edited by anyone again',
'move': 'move',
'move page': 'move page',
'MovepageHint': 'Change the title of %s',
'edit': 'edit', ///// edit articles and talk
'edit article': 'edit article',
'editHint': 'Change the content of %s',
'edit talk': 'edit talk',
'new': 'new',
'new topic': 'new topic',
'newSectionHint': 'Start a new section on %s',
'null edit': 'null edit',
'nullEditHint': 'Submit an edit to %s, making no changes ',
'hist': 'hist', ///// history, diffs, editors, related
'history': 'history',
'historyHint': 'List the changes made to %s',
'last': 'last',
'lastEdit': 'lastEdit',
'mark patrolled': 'mark patrolled',
'markpatrolledHint': 'Mark this edit as patrolled',
'show last edit': 'most recent edit',
'Show the last edit': 'Show the effects of the most recent change',
'lastContrib': 'lastContrib',
'last set of edits': 'latest edits',
'lastContribHint': 'Show the net effect of changes made by the last editor',
'cur': 'cur',
'diffCur': 'diffCur',
'Show changes since revision %s': 'Show changes since revision %s',
'%s old': '%s old', // as in 4 weeks old
'oldEdit': 'oldEdit',
'purge': 'purge',
'purgeHint': 'Demand a fresh copy of %s',
'raw': 'source',
'rawHint': 'Download the source of %s',
'render': 'simple',
'renderHint': 'Show a plain HTML version of %s',
'Show the edit made to get revision': 'Show the edit made to get revision',
'sinceMe': 'sinceMe',
'changes since mine': 'diff my edit',
'sinceMeHint': 'Show changes since my last edit',
'Couldn\'t find an edit by %s\nin the last %s edits to\n%s': 'Couldn\'t find an edit by %s\nin the last %s edits to\n%s',
'eds': 'eds',
'editors': 'editors',
'editorListHint': 'List the users who have edited %s',
'related': 'related',
'relatedChanges': 'relatedChanges',
'related changes': 'related changes',
'RecentchangeslinkedHint': 'Show changes in articles related to %s',
'editOld': 'editOld', ///// edit old version, or revert
'rv': 'rv',
'revert': 'revert',
'revertHint': 'Revert to %s',
'defaultpopupRedlinkSummary': 'Removing link to empty page [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupFixDabsSummary': 'Disambiguate [[%s]] to [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupFixRedirsSummary': 'Redirect bypass from [[%s]] to [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupExtendedRevertSummary': 'Revert to revision dated %s by %s, oldid %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupRevertToPreviousSummary': 'Revert to the revision prior to revision %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupRevertSummary': 'Revert to revision %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupQueriedRevertToPreviousSummary': 'Revert to the revision prior to revision $1 dated $2 by $3 using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupQueriedRevertSummary': 'Revert to revision $1 dated $2 by $3 using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'defaultpopupRmDabLinkSummary': 'Remove link to dab page [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]',
'Redirects': 'Redirects', // as in Redirects to ...
' to ': ' to ', // as in Redirects to ...
'Bypass redirect': 'Bypass redirect',
'Fix this redirect': 'Fix this redirect',
'disambig': 'disambig', ///// add or remove dab etc.
'disambigHint': 'Disambiguate this link to [[%s]]',
'Click to disambiguate this link to:': 'Click to disambiguate this link to:',
'remove this link': 'remove this link',
'remove all links to this page from this article': 'remove all links to this page from this article',
'remove all links to this disambig page from this article': 'remove all links to this disambig page from this article',
'mainlink': 'mainlink', ///// links, watch, unwatch
'wikiLink': 'wikiLink',
'wikiLinks': 'wikiLinks',
'links here': 'links here',
'whatLinksHere': 'whatLinksHere',
'what links here': 'what links here',
'WhatlinkshereHint': 'List the pages that are hyperlinked to %s',
'unwatchShort': 'un',
'watchThingy': 'watch', // called watchThingy because {}.watch is a function
'watchHint': 'Add %s to my watchlist',
'unwatchHint': 'Remove %s from my watchlist',
'Only found one editor: %s made %s edits': 'Only found one editor: %s made %s edits',
'%s seems to be the last editor to the page %s': '%s seems to be the last editor to the page %s',
'rss': 'rss',
/////////////////////////////////////
// diff previews
/////////////////////////////////////
'Diff truncated for performance reasons': 'Diff truncated for performance reasons',
'Old revision': 'Old revision',
'New revision': 'New revision',
'Something went wrong :-(': 'Something went wrong :-(',
'Empty revision, maybe non-existent': 'Empty revision, maybe non-existent',
'Unknown date': 'Unknown date',
/////////////////////////////////////
// other special previews
/////////////////////////////////////
'Empty category': 'Empty category',
'Category members (%s shown)': 'Category members (%s shown)',
'No image links found': 'No image links found',
'File links': 'File links',
'No image found': 'No image found',
'Image from Commons': 'Image from Commons',
'Description page': 'Description page',
'Alt text:': 'Alt text:',
'revdel':'Hidden revision',
/////////////////////////////////////
// user-related actions and info
/////////////////////////////////////
'user': 'user', ///// user page, talk, email, space
'user page': 'user page',
'user talk': 'user talk',
'edit user talk': 'edit user talk',
'leave comment': 'leave comment',
'email': 'email',
'email user': 'email user',
'EmailuserHint': 'Send an email to %s',
'space': 'space', // short form for userSpace link
'PrefixIndexHint': 'Show pages in the userspace of %s',
'count': 'count', ///// contributions, log
'edit counter': 'edit counter',
'editCounterLinkHint': 'Count the contributions made by %s',
'contribs': 'contribs',
'contributions': 'contributions',
'deletedContribs': 'deleted contributions',
'DeletedcontributionsHint': 'List deleted edits made by %s',
'ContributionsHint': 'List the contributions made by %s',
'log': 'log',
'user log': 'user log',
'userLogHint': 'Show %s\'s user log',
'arin': 'ARIN lookup', ///// ARIN lookup, block user or IP
'Look up %s in ARIN whois database': 'Look up %s in the ARIN whois database',
'unblockShort': 'un',
'block': 'block',
'block user': 'block user',
'IpblocklistHint': 'Unblock %s',
'BlockipHint': 'Prevent %s from editing',
'block log': 'block log',
'blockLogHint': 'Show the block log for %s',
'protectLogHint': 'Show the protection log for %s',
'pageLogHint': 'Show the page log for %s',
'deleteLogHint': 'Show the deletion log for %s',
'Invalid %s %s': 'The option %s is invalid: %s',
'No backlinks found': 'No backlinks found',
' and more': ' and more',
'undo': 'undo',
'undoHint': 'undo this edit',
'Download preview data': 'Download preview data',
'Invalid or IP user': 'Invalid or IP user',
'Not a registered username': 'Not a registered username',
'BLOCKED': 'BLOCKED',
' edits since: ': ' edits since: ',
/////////////////////////////////////
// Autoediting
/////////////////////////////////////
'Enter a non-empty edit summary or press cancel to abort': 'Enter a non-empty edit summary or press cancel to abort',
'Failed to get revision information, please edit manually.\n\n': 'Failed to get revision information, please edit manually.\n\n',
'The %s button has been automatically clicked. Please wait for the next page to load.': 'The %s button has been automatically clicked. Please wait for the next page to load.',
'Could not find button %s. Please check the settings in your javascript file.': 'Could not find button %s. Please check the settings in your javascript file.',
/////////////////////////////////////
// Popups setup
/////////////////////////////////////
'Open full-size image': 'Open full-size image',
'zxy': 'zxy'
};
function popupString(str) {
if (typeof popupStrings != 'undefined' && popupStrings && popupStrings[str]) { return popupStrings[str]; }
if (pg.string[str]) { return pg.string[str]; }
return str;
}
function tprintf(str,subs) {
if (typeof subs != typeof []) { subs = [subs]; }
return simplePrintf(popupString(str), subs);
}
//</NOLITE>
// ENDFILE: strings.js
////////////////////////////////////////////////////////////////////
// Run things
////////////////////////////////////////////////////////////////////
hookEvent('load', setupPopups);
addOnloadHook(autoEdit);
// Support for MediaWiki's live preview, VisualEditor's saves and Echo's flyout.
( function () {
var once = true;
function dynamicContentHandler( $content ) {
// Try to detect the hook fired on initial page load and disregard
// it, we already hook to onload (possibly to different parts of
// page - it's configurable) and running twice might be bad. Ugly…
if ( $content.attr( 'id' ) == 'mw-content-text' ) {
if ( once ) {
once = false;
return;
}
}
function doIt () {
$content.each( function () {
this.ranSetupTooltipsAlready = false;
setupTooltips( this );
} );
};
if ( !setupPopups.completed ) {
setupPopups( doIt );
} else {
doIt();
}
}
// This hook is also fired after page load.
mw.hook( 'wikipage.content' ).add( dynamicContentHandler );
mw.hook( 'ext.echo.overlay.beforeShowingOverlay' ).add( function($overlay){
dynamicContentHandler( $overlay.find(".mw-echo-state") );
});
} )();
430ab2c83a1ca35b92fcd29e05ff7f590898adef
MediaWiki:Gadget-ProveIt
8
40
114
113
2014-01-16T15:33:54Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
[[User:ProveIt GT|ProveIt]], a powerful GUI tool for viewing, editing, adding, and inserting references ([[:File:ProveIt.jpg|screenshot]], {{plain link|http://proveit.wmflabs.org/demo|working demo}})
9099c4ebbb9a376b388d71eae53107be83602a06
113
2013-01-02T03:53:45Z
Superm401
0
update demo link
wikitext
text/x-wiki
[[User:ProveIt GT|ProveIt]], a powerful GUI tool for viewing, editing, adding, and inserting references ([[:File:ProveIt.jpg|screenshot]], {{plain link|http://proveit.wmflabs.org/demo|working demo}})
9099c4ebbb9a376b388d71eae53107be83602a06
MediaWiki:Gadget-ProveIt.css
8
42
118
117
2014-01-16T15:33:54Z
Ffkapa
2
1 wersja
css
text/css
/* _____________________________________________________________________________
* | |
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
* |_____________________________________________________________________________|
*/
/*
* Imported from Mercurial commit c978344be3df as of 2013-06-30 from http://code.google.com/p/proveit-js/
* Changes should be made through that Google Code project.
*/
div#proveit {
position: fixed;
bottom: 0px;
right: 20px;
z-index: 10000;
/*height: 300px;*/
width: 750px;
background: #fff;
/* border: 1px solid #666;
font-size: small !important;
opacity: 0.3;
filter: alpha(opacity=30); // older IE */
font-size: small;
}
div#proveit a img {
border: 0;
}
div#proveit h1 {
float: right;
width: 50%;
text-align: right;
font-size: 11px;
margin: 5px 5px 0 0; padding: 0;
font-weight: normal;
border: none;
}
div#proveit h1 a {
/* color: #00254c;
text-decoration: none; */
margin: 0 30px 0 0; padding: 0;
}
/* div#proveit h1 span {
font-weight: bold;
/* font-size: 14px; */
div#proveit h1 button.ui-button-icon-only {
margin: 3px 5px 0 0;
height: 25px; width: 25px;
}
/*
div#tabs-1, div#tabs-2, div#tabs-3 {
height: 270px;
padding: 10px 5px;
}
*/
div#proveit div#view-tab, div#proveit div#add-tab {
padding: 5px;
}
/*** BEGIN CSS FOR REFLIST ***/
div#proveit table {
border-collapse: collapse;
width: 100%;
margin: 0; padding: 0;
}
div#proveit tr.light td {
background-color: #fff;
}
div#proveit tr.dark td {
background-color: #eeeeee;
}
div#proveit tr.invalid td {
color: #ff0000;
}
div#proveit tr.selected td {
background-color: #2682c7;
}
div#proveit tr:hover td {
background-color: #fddc05;
color: #000;
}
div#proveit tr.selected:hover td {
background-color: #2682c7;
}
div#proveit td {
padding: 5px 3px 3px 3px;
vertical-align: top;
}
div#proveit td.number {
font-size: 12px;
color: #666;
text-align: right;
}
div#proveit tr.selected td.number {
color: #ccc;
}
/*
td.author {
padding-left: 0.5em;
}
td.year{
width: 50px;
text-align: center;
}
*/
/*div#proveit td.details {}*/
div#proveit td.type {
width: 20px;
background-repeat: no-repeat;
background-position: 50% 5px;
padding: 0 5px;
}
div#proveit td.title {
/* width: 460px; */
font-size: 12px;
color: #000;
text-align: left;
/* font-weight: bold; */
}
div#proveit tr.selected td.title {
color: #fff;
}
div#proveit td.edit {}
div#proveit td.edit button {
height: 20px;
width: 20px;
}
div#proveit tr.selected td.edit button {
visibility: hidden;
}
/*
div#proveit td.ibid button {
width: 20px; height: 20px;
}
*/
div#proveit tr.selected div.expanded {
display: block;
}
div#proveit div.expanded {
font-size: x-small;
padding: 5px 0;
display: none;
width: auto;
}
div#proveit div.expanded p {
color: #ccc;
}
div#proveit div.expanded p span {
color: #fff;
}
div#proveit div.expanded a:link, div#proveit div.expanded a:visited {
color: #fff;
text-decoration: underline;
}
div#proveit div.expanded a:hover {
color: #fff;
text-decoration: none;
}
div#proveit div.expanded span.all-citations a {
margin: 0 0.5em;
text-transform: uppercase;
}
div#proveit div.expanded button {
margin-right: 1em;
}
div#proveit div.expanded button span {
padding-top: 0.3em;
padding-bottom: 0.3em;
}
/*** END CSS FOR REFLIST ***/
div#proveit div.inputs {
border: 0;
margin: 0; padding: 3px;
}
div#proveit div.inputs div.input-row, div#proveit div.inputs div.ref-name-row {
display: block;
margin: 0 0 0.8em 0; padding: 0;
}
/*div.inputs div.hidden{
display: none;
}*/
div#proveit div.ref-name-row label {
cursor: help;
}
div#proveit div.inputs label.paramdesc {
display: block;
font-size: 12px;
text-transform: none;
float: left;
width: 200px;
text-align: left;
padding-top:5px;
}
div#proveit div.inputs input.paramdesc {
/*display: block;*/
font-size: 12px;
text-transform: none;
/*float: left;*/
width: 180px;
text-align: left;
padding-right: 10px;
}
div#proveit div.inputs input.paramvalue {
width: 480px; height: 18px;
font-size: 12px;
border: 1px solid #ccc;
}
div#proveit div.inputs select {
width: auto;
font-size: 12px;
}
div#proveit div.inputs button {
font-size: 11px;
}
div#proveit div.input-row button.delete-field
{
height: 20px; width: 20px;
margin-left: 5px;
line-height: 0;
}
div#proveit div#add-buttons, div#proveit div#edit-buttons {
margin-top: 5px;
font-size: 11px;
}
div#proveit button.right-side {
float: right;
}
div#proveit .pointers {
width: 2em;
overflow: scroll;
}
div#proveit div#edit-fields {
color: #fff;
background-color: #2682c7;
}
div#proveit .scroll {
display: block;
overflow: scroll;
overflow-y: scroll;
overflow-x: hidden;
border: 1px solid #dddddd !important;
}
div#proveit .required {
font-weight: bold;
/*color: #FF0084;*/
/*color: #ff0000;*/
}
/*** MISC STYLES ***/
div#proveit .notification {
font-size: 10px;
padding-left: 8px;
display: none;
}
div#proveit .hidden {
display: none;
}
div#proveit input {
padding: 0px;
}
/*
jqueryUI class modifications start here
*/
div#proveit a.tab-link {
font-weight: bold;
}
div#proveit ul.ui-tabs-nav {
position: static;
}
div#proveit button.ui-button-icon-only {
margin: 0; padding: 0;
height: 20px; width: 20px;
font-size: 11px;
vertical-align: top;
}
3a77931cd2bfa29eac9b9135485b854ecaad1eac
117
2013-06-30T02:15:24Z
Superm401
0
Deploy commit c978344be3df of ProveIt.
css
text/css
/* _____________________________________________________________________________
* | |
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
* |_____________________________________________________________________________|
*/
/*
* Imported from Mercurial commit c978344be3df as of 2013-06-30 from http://code.google.com/p/proveit-js/
* Changes should be made through that Google Code project.
*/
div#proveit {
position: fixed;
bottom: 0px;
right: 20px;
z-index: 10000;
/*height: 300px;*/
width: 750px;
background: #fff;
/* border: 1px solid #666;
font-size: small !important;
opacity: 0.3;
filter: alpha(opacity=30); // older IE */
font-size: small;
}
div#proveit a img {
border: 0;
}
div#proveit h1 {
float: right;
width: 50%;
text-align: right;
font-size: 11px;
margin: 5px 5px 0 0; padding: 0;
font-weight: normal;
border: none;
}
div#proveit h1 a {
/* color: #00254c;
text-decoration: none; */
margin: 0 30px 0 0; padding: 0;
}
/* div#proveit h1 span {
font-weight: bold;
/* font-size: 14px; */
div#proveit h1 button.ui-button-icon-only {
margin: 3px 5px 0 0;
height: 25px; width: 25px;
}
/*
div#tabs-1, div#tabs-2, div#tabs-3 {
height: 270px;
padding: 10px 5px;
}
*/
div#proveit div#view-tab, div#proveit div#add-tab {
padding: 5px;
}
/*** BEGIN CSS FOR REFLIST ***/
div#proveit table {
border-collapse: collapse;
width: 100%;
margin: 0; padding: 0;
}
div#proveit tr.light td {
background-color: #fff;
}
div#proveit tr.dark td {
background-color: #eeeeee;
}
div#proveit tr.invalid td {
color: #ff0000;
}
div#proveit tr.selected td {
background-color: #2682c7;
}
div#proveit tr:hover td {
background-color: #fddc05;
color: #000;
}
div#proveit tr.selected:hover td {
background-color: #2682c7;
}
div#proveit td {
padding: 5px 3px 3px 3px;
vertical-align: top;
}
div#proveit td.number {
font-size: 12px;
color: #666;
text-align: right;
}
div#proveit tr.selected td.number {
color: #ccc;
}
/*
td.author {
padding-left: 0.5em;
}
td.year{
width: 50px;
text-align: center;
}
*/
/*div#proveit td.details {}*/
div#proveit td.type {
width: 20px;
background-repeat: no-repeat;
background-position: 50% 5px;
padding: 0 5px;
}
div#proveit td.title {
/* width: 460px; */
font-size: 12px;
color: #000;
text-align: left;
/* font-weight: bold; */
}
div#proveit tr.selected td.title {
color: #fff;
}
div#proveit td.edit {}
div#proveit td.edit button {
height: 20px;
width: 20px;
}
div#proveit tr.selected td.edit button {
visibility: hidden;
}
/*
div#proveit td.ibid button {
width: 20px; height: 20px;
}
*/
div#proveit tr.selected div.expanded {
display: block;
}
div#proveit div.expanded {
font-size: x-small;
padding: 5px 0;
display: none;
width: auto;
}
div#proveit div.expanded p {
color: #ccc;
}
div#proveit div.expanded p span {
color: #fff;
}
div#proveit div.expanded a:link, div#proveit div.expanded a:visited {
color: #fff;
text-decoration: underline;
}
div#proveit div.expanded a:hover {
color: #fff;
text-decoration: none;
}
div#proveit div.expanded span.all-citations a {
margin: 0 0.5em;
text-transform: uppercase;
}
div#proveit div.expanded button {
margin-right: 1em;
}
div#proveit div.expanded button span {
padding-top: 0.3em;
padding-bottom: 0.3em;
}
/*** END CSS FOR REFLIST ***/
div#proveit div.inputs {
border: 0;
margin: 0; padding: 3px;
}
div#proveit div.inputs div.input-row, div#proveit div.inputs div.ref-name-row {
display: block;
margin: 0 0 0.8em 0; padding: 0;
}
/*div.inputs div.hidden{
display: none;
}*/
div#proveit div.ref-name-row label {
cursor: help;
}
div#proveit div.inputs label.paramdesc {
display: block;
font-size: 12px;
text-transform: none;
float: left;
width: 200px;
text-align: left;
padding-top:5px;
}
div#proveit div.inputs input.paramdesc {
/*display: block;*/
font-size: 12px;
text-transform: none;
/*float: left;*/
width: 180px;
text-align: left;
padding-right: 10px;
}
div#proveit div.inputs input.paramvalue {
width: 480px; height: 18px;
font-size: 12px;
border: 1px solid #ccc;
}
div#proveit div.inputs select {
width: auto;
font-size: 12px;
}
div#proveit div.inputs button {
font-size: 11px;
}
div#proveit div.input-row button.delete-field
{
height: 20px; width: 20px;
margin-left: 5px;
line-height: 0;
}
div#proveit div#add-buttons, div#proveit div#edit-buttons {
margin-top: 5px;
font-size: 11px;
}
div#proveit button.right-side {
float: right;
}
div#proveit .pointers {
width: 2em;
overflow: scroll;
}
div#proveit div#edit-fields {
color: #fff;
background-color: #2682c7;
}
div#proveit .scroll {
display: block;
overflow: scroll;
overflow-y: scroll;
overflow-x: hidden;
border: 1px solid #dddddd !important;
}
div#proveit .required {
font-weight: bold;
/*color: #FF0084;*/
/*color: #ff0000;*/
}
/*** MISC STYLES ***/
div#proveit .notification {
font-size: 10px;
padding-left: 8px;
display: none;
}
div#proveit .hidden {
display: none;
}
div#proveit input {
padding: 0px;
}
/*
jqueryUI class modifications start here
*/
div#proveit a.tab-link {
font-weight: bold;
}
div#proveit ul.ui-tabs-nav {
position: static;
}
div#proveit button.ui-button-icon-only {
margin: 0; padding: 0;
height: 20px; width: 20px;
font-size: 11px;
vertical-align: top;
}
3a77931cd2bfa29eac9b9135485b854ecaad1eac
MediaWiki:Gadget-ProveIt.js
8
41
116
115
2014-01-16T15:33:54Z
Ffkapa
2
1 wersja
javascript
text/javascript
/* _____________________________________________________________________________
* | |
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
* |_____________________________________________________________________________|
*/
/*
* Imported from Mercurial commit c978344be3df as of 2013-06-30 from http://code.google.com/p/proveit-js/
* Changes should be made through that Google Code project.
*/
/*
* ProveIt ([[User:ProveIt GT]]) is a powerful GUI tool for viewing, adding, editing, and inserting references on Wikipedia.
*
* Copyright 2008 - 2011
*
* Georgia Tech Research Corporation
*
* Atlanta, GA 30332-0415
*
* Copyright 2011 -
*
* Matthew Flaschen
*
* ALL RIGHTS RESERVED
*
* ProveIt is available under the GNU Free Documentation License (GFDL-1.3.txt), Creative Commons
* Attribution/Share-Alike License 3.0 (http://creativecommons.org/licenses/by-sa/3.0/), and the GNU
* General Public License 2 (GPL-2.txt)
*/
/**
* Electronic Learning Communities
* @module elc
*/
( function ( mw, $ ) {
/*
Second parameter (pre-existing proveit object, if any) passed to extend overrides first.
Gives users option to easily override initial constants, such as shouldAddSummary.
If proveit is unintentionally imported more than once, the first import will take precedence.
*/
/**
* Main class and namespace for ProveIt software. This is the only global variable.
* @class proveit
*/
var proveit = window.proveit = $.extend({
/**
* Approximately half the height of the edit box. Used in scrolling when highlighting text.
* @type Number
*/
HALF_EDIT_BOX_HEIGHT: 200,
// This could be preference-controlled, instead of hard-coded.
/**
* Language used for descriptions
* @type String
*/
LANG: "en",
/**
* Text before param name (e.g. url, title, etc.) in creation box, to avoid collisions with unrelated ids.
* @type String
*/
NEW_PARAM_PREFIX: "newparam",
/**
* Text before param name (e.g. url, title, etc.) in edit box, to avoid collisions with unrelated ids.
* @type String
*/
EDIT_PARAM_PREFIX: "editparam",
GUI_ID: "proveit",
/**
* Base URL used for static content
*
* This directory includes icons from the Silk set (http://www.famfamfam.com/lab/icons/silk/), by Mark James
* @type String
*/
STATIC_BASE: "//proveit-js.googlecode.com/hg/static/",
/* Used to map between keys, including citation parameter names, and human-readable text. It can be
* internationalized easily. Add descriptions.xx , where xx is
* the ISO 639-1 code for a language, then set proveit.LANG to "xx"
* to use the new descriptions.
*/
descriptions :
{
en :
{
agency: "Agency",
name: "Name",
author: "Author (L, F)",
author2: "Author two (L, F)",
author3: "Author three (L, F)",
author4: "Author four (L, F)",
author5: "Author five (L, F)",
author6: "Author six (L, F)",
author7: "Author seven (L, F)",
author8: "Author eight (L, F)",
author9: "Author nine (L, F)",
last: "Last name",
last2: "Last name (auth. two)",
last3: "Last name (auth. three)",
last4: "Last name (auth. four)",
last5: "Last name (auth. five)",
last6: "Last name (auth. six)",
last7: "Last name (auth. seven)",
last8: "Last name (auth. eight)",
last9: "Last name (auth. nine)",
first: "First name",
first2: "First name (auth. two)",
first3: "First name (auth. three)",
first4: "First name (auth. four)",
first5: "First name (auth. five)",
first6: "First name (auth. six)",
first7: "First name (auth. seven)",
first8: "First name (auth. eight)",
first9: "First name (auth. nine)",
authorlink: "Author article name",
title: "Title",
trans_title: "Title in English",
publisher: "Publisher",
year: "Year",
location: "Location",
place: "Location of work",
isbn: "ISBN",
id: "ID",
doi: "DOI",
page: "Page",
pages: "Pages",
quote: "Quote",
month: "Month",
journal: "Journal",
edition: "Edition",
volume: "Volume",
issue: "Issue",
url: "URL",
date: "Publication date",
accessdate: "Access date",
coauthors: "Co-authors",
booktitle: "Title of Proceedings",
contribution: "Contribution/Chapter",
encyclopedia: "Encyclopedia",
newsgroup: "Newsgroup",
version: "Version",
site: "Site",
newspaper: "Newspaper",
"publication-place": "Publication location",
editor: "Editor (L, F)",
article: "Article",
pubplace: "Publisher location",
pubyear: "Publication year",
inventor: "Inventor (L, F)",
"issue-date": "Issue date",
"patent-number": "Patent number",
"country-code": "Country code (XX)",
work: "Work",
format: "Format",
issn: "ISSN",
pmid: "PMID",
chapter: "Chapter",
web: "Web",
book: "Book",
conference: "Conference",
news: "News",
paper: "Paper",
"press release": "Press release",
interview: "Interview",
"AV media": "Audiovisual work",
subject: "Subject",
subjectlink: "Subject article name",
subject2: "Subject two",
subjectlink2: "Subject two article name",
subject3: "Subject three",
subjectlink3: "Subject three article name",
subject4: "Subject four",
interviewer: "Interviewer",
cointerviewers: "Co-interviewers",
type: "Type",
program: "Program",
callsign: "Call sign",
city: "City",
archiveurl: "Archive URL",
archivedate: "Date archived",
episode: "Episode",
episodelink: "Episode article name",
series: "Series",
serieslink: "Series article name",
credits: "Credits",
network: "Network",
station: "Station",
airdate: "Airdate",
began: "Start date",
ended: "End date",
season: "Season number",
seriesno: "Season number",
number: "Number",
minutes: "Minutes",
transcript: "Transcript",
transcripturl: "Transcript URL",
people: "People",
medium: "Production medium",
language: "Language",
time: "Time",
oclc: "OCLC",
ref: "Anchor ID",
deadurl: 'Dead URL?',
raw: 'Unknown format'
},
// Finnish translation by Olli (ollinpostit at gmail.com)
fi: {
agency: "Edustaja",
name: "Nimi",
author: "Tekijä",
author2: "Tekijä kaksi",
author3: "Tekijä kolme",
author4: "Tekijä neljä",
author5: "Tekijä viisi",
author6: "Tekijä kuusi",
author7: "Tekijä seitsemän",
author8: "Tekijä kahdeksan",
author9: "Tekijä yhdeksän",
last: "Sukunimi",
last2: "Sukunimi (tekijä 2)",
last3: "Sukunimi (tekijä 3)",
last4: "Sukunimi (tekijä 4)",
last5: "Sukunimi (tekijä 5)",
last6: "Sukunimi (tekijä 6)",
last7: "Sukunimi (tekijä 7)",
last8: "Sukunimi (tekijä 8)",
last9: "Sukunimi (tekijä 9)",
first: "Etunimi",
first2: "Etunimi (tekijä 2)",
first3: "Etunimi (tekijä 3)",
first4: "Etunimi (tekijä 4)",
first5: "Etunimi (tekijä 5)",
first6: "Etunimi (tekijä 6)",
first7: "Etunimi (tekijä 7)",
first8: "Etunimi (tekijä 8)",
first9: "Etunimi (tekijä 9)",
authorlink: "Tekijästä kertova sivu",
title: "Otsikko",
publisher: "Julkaisija",
year: "Vuosi",
location: "Paikka",
place: "Työn paikka",
isbn: "ISBN",
id: "ID",
doi: "DOI",
page: "Sivu",
pages: "Sivuja",
quote: "Lainaus",
month: "Kuukausi",
journal: "Aikakauslehti",
edition: "Painos",
volume: "Vuosikerta",
issue: "Numero",
url: "Osoite",
date: "Julkaisupäivä",
accessdate: "Luettu",
coauthors: "Muut tekijät",
booktitle: "Jatko-osien otsikko",
contribution: "Osallistuminen/yhteistyö",
encyclopedia: "Tietosanakirja",
newsgroup: "Uutisryhmä",
version: "Versio",
site: "Sivusto",
newspaper: "Sanomalehti",
"publication-place": "Julkaisupaikka",
editor: "Toimittaja",
article: "Artikkeli",
pubplace: "Julkaisijan paikka",
pubyear: "Julkaisuvuosi",
inventor: "Keksijä",
"issue-date": "Saatavilla päivänä",
"patent-number": "Patenttinumero",
"country-code": "Maakoodi (XX)",
work: "Työ",
format: "Muoto",
issn: "ISSN",
pmid: "PMID",
chapter: "Luku",
web: "Verkko",
book: "Kirja",
conference: "Kokous",
news: "Uutiset",
paper: "Lehti",
"press release": "Lehdistötiedote",
interview: "Haastattelu",
subject: "Otsikko",
subjectlink: "Artikkelin otsikko",
subject2: "Otsikko kaksi",
subjectlink2: "Artikkelin kaksi otsikko",
subject3: "Otsikko kolme",
subjectlink3: "Artikkelin kolme otsikko",
subject4: "Otsikko neljä",
interviewer: "Haastattelija",
cointerviewers: "Muut haastattelijat",
type: "Tyyppi",
program: "Ohjelma",
callsign: "Call sign",
city: "Kaupunki",
archiveurl: "Arkiston osoite",
archivedate: "Arkistointipäivämäärä",
episode: "Jakso",
episodelink: "Jakson sivun nimi",
series: "Sarja",
serieslink: "Sarjan sivun nimi",
credits: "Tekijät",
network: "Verkko",
station: "Asema",
airdate: "Lähetyspäivä",
began: "Aloituspäivä",
ended: "Lopetuspäivä",
season: "Kauden numero",
seriesno: "Kauden numero",
number: "Numero",
minutes: "Minuutit",
transcript: "Puhtaaksi kirjoitettu teksti",
transcripturl: "Puhtaaksikirjoitetun osoite",
video: "Video",
people: "Ihmiset",
medium: "Tuotantomedia",
language: "Kieli",
time: "Aika",
oclc: "OCLC",
ref: "Ankkurin ID-tunnus"
}
},
/**
* Optional preference to specify default date format for new references.
* If set, it overrides the general date preference from Special:Preferences.
*
* @type {String} supported date format string
*/
dateFormatString: null,
/**
* Singleton used to format dates according to user preference
*
* @type DateFormatter
*/
dateFormatter: null,
/**
* Gets the effective preference for date format. If there is no ProveIt-specific
* preference already at proveit.dateFormatString, it will determine the correct preference
* from MW user preferences. Then, it will store that value to proveit.dateFormatString
*
* @return {String} format string to use for dates
*/
getDatePreference: function () {
if (this.dateFormatString === null) {
this.dateFormatString = mw.user.options.get('date');
}
return this.dateFormatString;
},
/**
* Returns descriptions for the current language.
* @return {Object} descriptions
*/
getDescriptions: function()
{
//this could be made Cite-specific if needed.
return this.descriptions[proveit.LANG];
},
/**
* String added to logs for easy search
* @type String
*/
LOG_MARKER: "[ProveIt] ",
/**
* Convenience log function
* @param {...Object} var_args objects (including strings) to log
*/
log: function()
{
var args = Array.prototype.slice.call(arguments);
args.unshift(this.LOG_MARKER);
mw.log.apply(mw, args);
},
/**
* Log error object if possible, using error (preferable), or log, if available.
* @param {Error} ex error object
*/
logException: function(ex)
{
var args = [ex, ex.stack];
if(typeof(console) === "object" && $.isFunction(console.error))
{
args.unshift(this.LOG_MARKER);
console.error.apply(null, args);
}
else
{
this.log.apply(this, args);
}
},
/**
* Returns true if the page has an edit box
*
* @return {Boolean} true if the page has an edit box, false otherwise
*/
isEditPage: function()
{
return wgAction == 'edit' || wgAction == 'submit';
},
/**
* Returns true if the page is likely to contain references
* @return {Boolean} true if page is supported, false otherwise
*/
isSupportedPage: function()
{
// "Regular" article, userspace, or Wikipedia:Sandbox (exception for testing).
return (wgCanonicalNamespace == '' || wgCanonicalNamespace == 'User' || wgPageName == 'Wikipedia:Sandbox');
},
/**
* Convenience function. Returns the refbox element.
* @return {$Node} reference box
*/
getRefBox: function()
{
return $("#refs");
},
/**
* Provides the x (left) and y (top) offsets to a given element. From QuirksMode (http://www.quirksmode.org/js/findpos.html), a freely available site by Peter-Paul Koch
* @param {Node} node any HTML node
* @return {Object} offsets to node, as object with left and top properties.
*/
getPosition: function(node)
{
var left = 0, top = 0;
do
{
left += node.offsetLeft;
top += node.offsetTop;
} while (node = node.offsetParent);
return {"left": left, "top": top};
},
/**
* Highlights a given length of text, at a particular index.
* @param {Number} startInd start index in Wikipedia edit box
* @param {Number} length length of string to highlight
* @return {Boolean} always true
*/
highlightLengthAtIndex: function(startInd, length)
{
if(startInd < 0 || length < 0)
{
this.log("highlightStringAtIndex: invalid negative arguments");
}
var box = this.getMWEditBox();
var origText = box.value;
var editTop = this.getPosition(box).top;
box.value = origText.substring(0, startInd);
box.focus();
box.scrollTop = 1000000; //Larger than any real textarea (hopefully)
var curScrollTop = box.scrollTop;
box.value += origText.substring(startInd);
if(curScrollTop > 0)
{
box.scrollTop = curScrollTop + this.HALF_EDIT_BOX_HEIGHT;
}
$(box).focus().textSelection('setSelection',
{
start: startInd,
end: startInd + length
});
editTop = this.getPosition(box).top;
window.scroll(0, editTop);
return true;
},
/**
* Highlights the first instance of a given string in the MediaWiki edit box.
* @param {String} targetStr the string in the edit box to highlight
* @return {Boolean} true if successful, false otherwise
*/
highlightTargetString: function(targetStr)
{
var origText = this.getMWEditValue();
var startInd = origText.indexOf(targetStr);
if(startInd == -1)
{
this.log("Target string \"" + targetStr + "\" not found.");
return false;
}
return this.highlightLengthAtIndex(startInd, targetStr.length);
},
/**
* Convenience function. Returns the raw MediaWiki textarea element.
* @return {Node} the edit box element
*/
getMWEditBox: function()
{
return $("#wpTextbox1")[0];
},
/**
* Provides value of edit box with CR normalization
*
* @return {String} value of edit box with CRs stripped if document.selection exists
*/
getMWEditValue: function()
{
var box = this.getMWEditBox();
var value = box.value;
if(!box.selectionStart && document.selection) // IE 8-like behavior
{
value = value.replace(/\r\n/g, "\n");
}
return value;
},
/**
* Returns raw edit form element, which contains MWEditBox, among other things.
* @return {Node} the edit form element
*/
getMWEditForm: function()
{
return $("#editform")[0];
},
/**
* Runs a given function on submission of edit form
* @param {Function} subFunc function to run on submission
*/
addOnsubmit: function(subFunc)
{
var form = this.getMWEditForm();
if(!form)
{
throw new Error("No edit form, possibly due to protected page.");
}
form.addEventListener("submit", subFunc, false);
},
/**
* Returns the raw MW edit summary element
* @return {Node} the edit summary element
*/
getEditSummary: function()
{
return $("#wpSummary")[0];
},
/**
* Keep track of whether we have already added an onsubmit function to include ProveIt in the summary.
* This guarantees the function will not be run twice.
* @type Boolean
*/
summaryFunctionAdded: false,
/**
* Does the user want us to ever add "Edited by ProveIt" summary?
* @type Boolean
*/
shouldAddSummary: true,
/**
* ProveIt should be visible on load (rather than requiring toolbar button click) on supported edit pages
* @type Boolean
*/
loadVisible: true,
/**
* Maximize ProveIt when it first becomes visible. If false, it will start minimized. This has no effect on when it becomes visible.
* @type Boolean
*/
loadMaximized: false,
/**
* Specifies to include ProveIt edit summary on next save.
* Can be disabled by modifying shouldAddSummary
*/
includeProveItEditSummary: function()
{
if(this.shouldAddSummary && !this.summaryFunctionAdded)
{
try
{
var thisproveit = this;
this.addOnsubmit(function()
{
var summary = thisproveit.getEditSummary();
if(summary.value.indexOf("ProveIt") == -1)
{
summary.value += " (edited with [[User:ProveIt_GT|ProveIt]])";
}
});
this.summaryFunctionAdded = true;
}
catch(e)
{
this.log("Failed to add onsubmit handler. e.message: " + e.message);
}
}
},
/**
* Setup button so users can load ProveIt on demand
*/
setupButton: function()
{
var $box = $(this.getMWEditBox());
// Ensures wikiEditor is loaded
$box.bind('wikiEditor-toolbar-buildSection-main', function(event, section)
{
delete section.groups.insert.tools.reference;
section.groups.insert.tools.proveit = {
label: 'ProveIt',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/19/ProveIt_logo_for_user_boxes.svg/22px-ProveIt_logo_for_user_boxes.svg.png',
action: {
type: 'callback',
execute: function()
{
proveit.toggleVisibility();
}
}
};
});
},
/**
* Sets up ProveIt if we're on an edit page. This includes setting up the toolbar button. Depending on configuration and the current page, it may also call load to show ProveIt.
*/
setup: function()
{
if(this.isEditPage())
{
if(this.loadVisible && this.isSupportedPage())
{
this.load();
}
this.setupButton();
}
},
/**
* Loads dependencies and creates GUI
*/
load: function()
{
addOnloadHook(function()
{
var dependencies = ['jquery.ui.tabs', 'jquery.ui.button', 'jquery.effects.highlight', 'jquery.textSelection'];
var preference = proveit.getDatePreference();
proveit.dateFormatter = new proveit.DateFormatter(preference);
mw.loader.using(dependencies, function()
{
try
{
proveit.createGUI();
if(proveit.loadMaximized)
{
proveit.toggleViewAddVisibility();
}
}
catch(ex)
{
proveit.logException(ex);
}
}, function(ex, errorDependencies)
{
proveit.log('Failed to load one of: ', errorDependencies);
});
});
},
/**
* Clears the refBox of refBoxRows, except for dummy rows.
* @return {Boolean} false if refBox wasn't found
*/
clearRefBox: function()
{
var box = this.getRefBox();
if(box == null)
{
this.log("Ref box is not loaded yet.");
return false;
}
$("tr:not('tr#dummyRef')", box).remove();
return true;
},
/** Inserts ref text into MW edit box.
* @param {String} ref Reference text to insert
* @param {Boolean} full Insert the full reference text if true, citation otherwise.
* @return {Boolean} false if errors
*/
insertRefIntoMWEditBox: function(ref, full)
{
var txtarea = this.getMWEditBox();
if(!txtarea)
{
this.log("insertRefIntoMWEditBox: txtarea is null");
return false;
}
txtarea = $(txtarea);
var insertionText = ref.getInsertionText(full);
// Replace existing selection (if any), then scroll
txtarea.textSelection('encapsulateSelection',
{
peri: insertionText,
replace: true
});
var caretPos = txtarea.textSelection('getCaretPosition', {startAndEnd: true});
// This is slightly redundant. It is called primarily for the scrollig workaround
this.highlightLengthAtIndex(caretPos[0], caretPos[1] - caretPos[0]);
this.includeProveItEditSummary();
},
/**
* Modifies reference object from user-edited GUI. The reference object is mutated in place, so the return value is only for convenience.
*
* @param {Node} editPane the raw element of the editPane
* @param {AbstractReference} ref the original citation object we're modifying
*
* @return {AbstractReference} same ref that was passed in
*/
changeRefFromEditPane: function(ref, editPane)
{
var paramBoxes = $("div.input-row", editPane);
var refName = $('#editrefname').val();
ref.name = refName != "" ? refName : null; // Save blank names as null
// Clear old params
ref.params = {};
var paramName, paramVal;
for (var i = 0; i < paramBoxes.length; i++)
{
var paramRow = paramBoxes[i];
var valueTextbox = $(".paramvalue", paramRow)[0];
if($(paramRow).hasClass("addedrow")) // Added with "Add another field"
{
paramName = $.trim($(".paramdesc", paramRow)[0].value);
}
else
{
paramName = valueTextbox.id.substring(this.EDIT_PARAM_PREFIX.length);
}
this.log("paramName: " + paramName);
paramVal = $.trim(valueTextbox.value);
this.log("paramVal: " + paramVal);
if (paramName != "" && paramVal != "")
{
ref.params[paramName] = paramVal;
}
}
if (ref.toString() != ref.orig)
{
ref.save = false;
}
ref.update();
return ref;
},
/**
* Creates refBoxRow, updates numbering for all refBoxRows, replaces old refBoxRow with new one, and updates ref text in MWEditBox.
* @param {AbstractReference} ref the ref we want to save.
*/
saveRefFromEdit: function(ref)
{
if(!ref.save)
{
var newRichItem = this.makeRefBoxRow(ref, true);
var oldRichItem = $('.selected', this.getRefBox()).get(0);
var oldNumber = $('td.number',oldRichItem).text();
$('td.number',newRichItem).text(oldNumber); // preserve old numbering
oldRichItem.parentNode.replaceChild(newRichItem, oldRichItem);
$(newRichItem).addClass('selected');
ref.updateInText();
this.includeProveItEditSummary();
}
},
/**
* Updates the edit pane when you choose a reference to edit.
* @param {AbstractReference} ref the ref that was chosen.
*/
updateEditPane: function(ref)
{
$('#editrefname').val(ref.name || "");
// Don't contaminate actual object with junk params.
var tempParams = {};
for(var param in ref.params)
{
tempParams[param] = ref.params[param];
}
// Add default params with blank values.
var defaults = ref.getDefaultParams();
for(var i = 0; i < defaults.length; i++)
{
if(!tempParams[defaults[i]])
{
tempParams[defaults[i]] = "";
}
}
var required = ref.getRequiredParams();
var paramNames = new Array();
for(var item in tempParams) //First run through just to get names.
{
paramNames.push(item);
}
var sorter = ref.getSorter();
if(sorter)
{
paramNames.sort(sorter);
}
else
{
paramNames.sort();
}
/* Sort them to provide consistent interface. Uses custom sort order (which is easily tweaked)
where possible.
Javascript does destructive sorting, which in this case, is convenient...
*/
$('#edit-fields').children('.paramlist').children().remove('div:not(.hidden)'); // clear all fields in the edit box (except the hidden ones)
for(var j = 0; j < paramNames.length; j++)
{
this.addPaneRow($("#edit-pane").get(), tempParams, this.getDescriptions(), paramNames[j], required[paramNames[j]], true);
}
var acceptButton = $('#edit-buttons .accept');
var acceptEdit = function()
{
proveit.changeRefFromEditPane(ref, $("#edit-pane").get());
proveit.saveRefFromEdit(ref);
$("#edit-pane").hide();
$("#view-pane").show();
};
// Without setTimeout, scoll reset doesn't work in Firefox.
setTimeout(function()
{
// Reset scroll
$('#edit-fields').scrollTop(0);
}, 0);
acceptButton.unbind('click.proveit').bind('click.proveit', acceptEdit);
},
/**
* Add a row to an editPane or addPane.
* @param {Node} root root element for pane
* @param {Object} params the param object from the reference, or null for added rows.
* @param {Object} descs description object to use, or null for no description
* @param {String} item the current param name
* @param {Boolean} req true if current param name is required, otherwise not required.
* @param {Boolean} fieldType true for label, false for textbox.
*/
addPaneRow: function(root, params, descs, item, req, fieldType)
{
var id = fieldType ? "preloadedparamrow" : "addedparamrow";
var newline = $('#'+id).clone(); // clone the hidden row
$(newline).attr('id',''); // clear the ID (can't have two elements with same ID)
//this.activateRemoveField(newline);
var paramName = $('.paramdesc', newline).eq(0);
var paramValue = $('.paramvalue', newline).eq(0);
$('.paramlist', root).append(newline);
if(req) // if field is required...
{
$(paramName).addClass('required'); // visual indicator that label is required
$('.delete-field', newline).remove(); // don't let people remove required fields
}
else
{
this.activateRemoveField(newline);
}
if(fieldType) // the description/name is a label (not a textbox)
{
paramName.attr("for", this.EDIT_PARAM_PREFIX + item);
paramValue.attr('id',this.EDIT_PARAM_PREFIX + item);
var desc = descs[item];
if(!desc)
{
this.log("Undefined description for param: " + item + ". Using directly as description.");
desc = item;
}
$(paramName).text(desc);
$(paramName).attr('title',item);
$(paramValue).val(params[item]);
$(newline).show();
}
else
{
// added a new row, so make it fancy
$(newline).show('highlight',{},'slow');
$('.inputs', root).scrollTop(100000);
}
},
/*
* these are the current style and insert values to denote which one is
* currently active
*/
/**
* true signifies cite-style references, citation-style otherwise. Used when creating a reference.
* @type Boolean
*/
togglestyle: true,
// TODO: This should be eliminated if only name only inserts are allowed.
/** true signifies full references, name-only otherwise. Used when inserting.
* Note that new references are always inserted in full.
*
* @type Boolean
*/
toggleinsert: false,
/* Cross-Browser Split 1.0.1
(c) Steven Levithan <stevenlevithan.com>; MIT License
http://blog.stevenlevithan.com/archives/cross-browser-split
An ECMA-compliant, uniform cross-browser split method
*/
/**
* Cross-browser implementation of ECMAScript String.prototype.split function.
*
* @param {String} str input string to split
* @param separator separator to split on, as RegExp or String
* @param {Number} limit limit on number of splits. If the parameter is absent, no limit is imposed.
* @return {Array} array resulting from split
*/
split: function (str, separator, limit)
{
// if `separator` is not a regex, use the native `split`
if (Object.prototype.toString.call(separator) !== "[object RegExp]") {
return proveit.split._nativeSplit.call(str, separator, limit);
}
var output = [],
lastLastIndex = 0,
flags = (separator.ignoreCase ? "i" : "") +
(separator.multiline ? "m" : "") +
(separator.sticky ? "y" : ""),
separator = RegExp(separator.source, flags + "g"), // make `global` and avoid `lastIndex` issues by working with a copy
separator2, match, lastIndex, lastLength;
str = str + ""; // type conversion
if (!proveit.split._compliantExecNpcg) {
separator2 = RegExp("^" + separator.source + "$(?!\\s)", flags); // doesn't need /g or /y, but they don't hurt
}
/* behavior for `limit`: if it's...
- `undefined`: no limit.
- `NaN` or zero: return an empty array.
- a positive number: use `Math.floor(limit)`.
- a negative number: no limit.
- other: type-convert, then use the above rules. */
if (limit === undefined || +limit < 0) {
limit = Infinity;
} else {
limit = Math.floor(+limit);
if (!limit) {
return [];
}
}
while (match = separator.exec(str)) {
lastIndex = match.index + match[0].length; // `separator.lastIndex` is not reliable cross-browser
if (lastIndex > lastLastIndex) {
output.push(str.slice(lastLastIndex, match.index));
// fix browsers whose `exec` methods don't consistently return `undefined` for nonparticipating capturing groups
if (!proveit.split._compliantExecNpcg && match.length > 1) {
match[0].replace(separator2, function () {
for (var i = 1; i < arguments.length - 2; i++) {
if (arguments[i] === undefined) {
match[i] = undefined;
}
}
});
}
if (match.length > 1 && match.index < str.length) {
Array.prototype.push.apply(output, match.slice(1));
}
lastLength = match[0].length;
lastLastIndex = lastIndex;
if (output.length >= limit) {
break;
}
}
if (separator.lastIndex === match.index) {
separator.lastIndex++; // avoid an infinite loop
}
}
if (lastLastIndex === str.length) {
if (lastLength || !separator.test("")) {
output.push("");
}
} else {
output.push(str.slice(lastLastIndex));
}
return output.length > limit ? output.slice(0, limit) : output;
},
// TODO: Remove the split code, and just use a regular regex (with two main groups for name and val), iteratively. Regex.find? Make name and val indices match, and rework calling code as needed. Also, check how this was done in the original code.
/**
* Overly clever regex to parse template string (e.g. |last=Smith|first=John|title=My Life Story) into name and value pairs.
*
* names is an array of all names, and values is an array of all values. They have equal lengths.
*
* @param {String} workingString template string to parse.
* @return {Object} object with two properties, names and values.
*/
splitNameVals: function (workingString)
{
var split = {};
// The first component is "ordinary" text (no pipes), while the second is a correctly balanced wikilink, with optional pipe. Any combination of the two can appear.
split.names = proveit.split(workingString.substring(workingString.indexOf("|") + 1), /=(?:[^|]*?(?:\[\[[^|\]]*(?:\|(?:[^|\]]*))?\]\])?)+(?:\||\}\})/);
split.names.length--; // Remove single empty element at end
split.values = proveit.split(workingString.substring(workingString.indexOf("=") + 1, workingString.indexOf("}}")), /\|[^|=]*=/);
return split;
},
/**
* Scan for references in the MWEditBox, and create a reference object and refBoxRow for each.
*/
scanForRefs: function()
{
// these are strings used to allow the correct parsing of the ref
var workingstring;
var cutupstring;
this.clearRefBox();
var textValue = this.getMWEditValue();
// since we should pick the name out before we get to the reference type, here's a variable to hold it
var name;
// key - name
// value -
// object - key - "reference", value - reference obj . Avoids repeating same object in references array.
// key - "strings", value - array of orig strings
var citations = {};
// Array of reference objects. At end of function, addNewElement called on each.
var references = [];
// allRefs should count opening refs, but not ref citation (not <ref name="..."" />)
var allRefs = textValue.match(/<[\s]*ref[^\/>]*>/gi);
// currentScan holds the parsed (match objects) list of references. Regex matches full or name-only reference.
var currentScan = textValue.match(/<[\s]*ref[^>]*>(?:[^<]*<[\s]*\/[\s]*ref[\s]*>)?/gi); // [^<]* doesn't handle embedded HTML tags (or comments) correctly.
// if there are results,
if (currentScan)
{
for (var i = 0; i < currentScan.length; i++)
{
var reference = this.makeRef(currentScan[i]);
if(reference) // Full reference object
{
name = reference.name;
if(!name) // with no name, no possibility of repeat name.
{
references.push(reference);
}
}
else // Not full reference. Possibly citation.
{
var match = currentScan[i].match(this.REF_REGEX);
name = match && (match[1] || match[2] || match[3]);
}
if(name)
{
if(!citations[name])
{
// Create array of original reference strings
citations[name] = {};
if(!citations[name].strings)
{
citations[name].strings = [];
}
}
if(reference && !citations[name].reference) // reference, and not already one for this name
{
citations[name].reference = reference;
references.push(reference);
}
// Add to array
citations[name].strings.push(currentScan[i]);
}
}
}
for(var j = 0; j < references.length; j++)
{
if(references[j].name)
{
var citation = citations[references[j].name];
references[j].setCitationStrings(citation.strings);
}
this.addNewElement(references[j]);
}
},
/**
* Regex for parsing any reference text.
* @type RegExp
*/
REF_REGEX: /<[\s]*ref[\s]*name[\s]*=[\s]*(?:(?:\"(.*?)\")|(?:\'(.*?)\')|(?:(.*?)))[\s]*\/?[\s]*>/,
/**
* Factory function for references. Takes text of a reference, and returns instance of the appropriate class.
* @param {String} refText reference string
* @return {AbstractReference} null if refText isn't a ref, otherwise the reference object
*/
makeRef: function(refText)
{
var isReference = /<[\s]*ref[^>]*>[^<]*\S[^<]*<[\s]*\/[\s]*ref[\s]*>/.test(refText); // Tests for reference (non-citation);
if(!isReference)
{
return null;
}
var citeFunction = refText.match(/{{[\s]*cite/i) ? this.CiteReference : refText.match(/{{[\s]*Citation/i) ? this.CitationReference : this.RawReference;
if(citeFunction != this.RawReference)
{
var workingstring = refText.match(/{{[\s]*(cite|Citation)[\s\S]*?}}/i)[0];
var match = refText.match(this.REF_REGEX);
if(match && match != null)
{
var name = match[1] || match[2] || match[3]; // 3 possibilities, corresponding to above regex, are <ref name="foo">, <ref name='bar'>, and <ref name=baz>
}
var cutupstring = workingstring.split(/\|/g);
// This little hack relies on the fact that 'e' appears first as the last letter of 'cite', and the type is next.
if(citeFunction == this.CiteReference)
{
var beforeBar = cutupstring[0];
var typeStart = beforeBar.toLowerCase().indexOf('e');
// First end curly brace
var rightCurly = beforeBar.indexOf('}');
// Usually, rightCurly will be -1. But this takes into account empty references like <ref>{{cite web}}</ref>
var typeEnd = rightCurly != -1 ? rightCurly : beforeBar.length;
// grab the type, then trim it.
var type = $.trim(beforeBar.substring(typeStart + 1, typeEnd));
}
}
// type may be undefined, but that's okay.
var citation = new citeFunction({"name": name, "type": type, "save": true, "inMWEditBox": true, "orig": refText});
if(citeFunction != this.RawReference)
{
var split = this.splitNameVals(workingstring);
var names = split.names;
var values = split.values;
for (var j = 0; j < names.length; j++)
{
/* Drop blank space, and |'s without params, which are never correct for
citation templates.*/
var paramName = $.trim(names[j]).replace(/(?:\s*\|)*(.*)/, "$1");
var paramVal = $.trim(values[j]);
// Should there be a setParam function? It could handle empty values, and even drop (siliently or otherwise) invalid parameters. Alternatively, should params be passed in the constructor?
if (paramVal != "")
{
citation.params[paramName] = paramVal;
}
}
}
return citation;
},
// TODO: Use https://gerrit.wikimedia.org/r/#/c/67166/ when merged.
/**
* Date-formatting class
*
* @param {String} format one of the format strings supported by MW core.
* Currently, the supported values are 'default', 'mdy', 'dmy', 'ymd', and 'ISO 8601'.
* If an unknown value is passed, it will use wgDefaultDateFormat.
*/
DateFormatter: function (format) {
// 1-indexed (due to filler item at 0), in page content language.
var monthNames = mw.config.get('wgMonthNames');
var supportedFormats = ['mdy', 'dmy', 'ymd', 'ISO 8601'];
if($.inArray(format, supportedFormats) === -1) {
format = mw.config.get('wgDefaultDateFormat');
}
function getMonthName(date) {
return monthNames[date.getMonth() + 1];;
}
this.formatAsMdy = function(date) {
return getMonthName(date) + ' ' + date.getDate() + ', ' + date.getFullYear();
};
this.formatAsDmy = function(date) {
return date.getDate() + ' ' + getMonthName(date) + ' ' + date.getFullYear();
};
this.formatAsYmd = function(date) {
return date.getFullYear() + ' ' + getMonthName(date) + ' ' + date.getDate();
};
this.formatAsISO8601 = function(date) {
return date.getFullYear() + '-' +
(date.getMonth() < 9 ? '0' : '') + (date.getMonth() + 1) + '-' +
(date.getDate() < 10 ? '0' : '') + date.getDate();
};
var formatters =
{
mdy: this.formatAsMdy,
dmy: this.formatAsDmy,
ymd: this.formatAsYmd,
'ISO 8601': this.formatAsISO8601
};
/**
* Formats date according to stored preference
*
* @param {Date} date date to format
*
* @return {String} formatted date as String
*/
this.format = function(date)
{
return formatters[format](date);
};
},
/**
* Root reference type. Parent of RawReference, CiteReference, and CitationReference.
* @class AbstractReference
* @for proveit
* @constructor
* @param {Object} argObj argument object with keys for each option
*/
AbstractReference: function(argObj)
{
// CiteReference has a non-trivial override of this. This is defined early (and conditionally) because it is used in the constructor.
if(!this.setType)
{
/**
* @param {String} type type of reference
*/
this.setType = function(type)
{
this.type = type;
};
}
/**
* Update citation strings after changing reference. This runs after modifying a reference's fields (name, params), but before changing orig
*/
this.update = function()
{
var newCiteText = this.toString();
var strings = this.getCitationStrings();
/*
* Update main citation in strings list.
*
* TODO:
* Use strings array here to find and update citations that are not main references. As is, they are orphaned.
* Both array and textbox should be updated.
* It may be enough to just set all non-main citations in text and array to this.getInsertionText(false).
* However, if they remove the name entirely (not recommended), that would be a problem.
*/
if(strings.length > 0) // This implies there was a name before
{
for(var i = 0; i < strings.length; i++)
{
// If we find the full citation as a citation, update to the new text.
if(strings[i] == this.orig)
{
// this.orig itself is updated in updateInText
strings[i] = newCiteText;
}
}
}
else if(this.name != null) // They have added a name, so we should have a main citation.
{
// Now that it has a name, it is a citation to itself.
strings.push(newCiteText);
}
};
/**
* <ref name /> for reference
* @type String
*/
this.name = argObj.name != "" ? argObj.name : null; // Save blank names as null
/*
type of reference, e.g. cite web, cite news. Also used (including for CitationReference objects) to determine default fields.
*/
this.setType(argObj.type);
//TODO: Re-examine whether both (or indeed either) of save or inMWEditBox are really necessary. Can it be determined from context?
/**
* flag to determine whether citation must be saved. false indicates "dirty" citation that has yet to be updated in text and metadata.
* @type Boolean
*/
this.save = argObj.save;
/**
* true if and only if the ref is in the MW edit box with the same value as this object's orig.
* @type Boolean
*/
this.inMWEditBox = argObj.inMWEditBox;
/**
* original wikitext for reference
* @type String
*/
this.orig = argObj.orig;
/**
* mapping of parameter names to values
* @type Object
*/
this.params = {};
/**
* Convenience method. Returns sorter for parameters.
* @return {Function} sorter for parameters
*/
this.getSorter = function()
{
var thisCite = this; // Make closure work as intended.
// Sorter uses paramSortKey first, then falls back on alphabetical order.
return function(paramA, paramB)
{
var aInd = thisCite.getSortIndex(paramA);
var bInd = thisCite.getSortIndex(paramB);
if(aInd != -1 && bInd != -1)
{
return aInd - bInd;
}
else
{
proveit.log('Parameter missing from getSortIndex, which causes the sort to be invalid. paramA: ', paramA, ', aInd: ', aInd, ', paramB: ', paramB, ', bInd: ', bInd);
if(paramA < paramB)
{
return -1;
}
else if(paramA == paramB)
{
return 0;
}
else
{
return 1;
}
}
};
};
/**
* Returns true if this reference is valid, false otherwise.
* Assume all AbstractReference objects are valid. Can be overridden in subtypes.
* @return {Boolean} AbstractReference.isValid always returns true
*/
this.isValid = function(){return true;};
/**
* Generates label for reference using title, author, etc.
* @return {String} the label that was generated
*/
this.getLabel = function()
{
var label = "";
if (this.params.author)
{
label = this.params.author + "; ";
}
else if (this.params.last)
{
label = this.params.last;
if (this.params.first)
{
label += ", " + this.params.first;
}
label += "; ";
}
if (this.params.title)
{
label += this.params.title;
}
if(label == "")
{
var value;
for (value in this.params)
{
break;
}
if(value) // There could be no parameters
{
label = value;
}
}
return label;
};
/**
* Gets insertion text (for edit box).
*
* TODO: Generate a regex object instead (getInsertionRegExp), so highlighting would not fail due to trivial changes (e.g. spacing).
* @param {Boolean} full If true, insert full text, otherwise ref name only
* @return {String} insertion text
*/
this.getInsertionText = function(full)
{
if(full)
{
return this.toString();
}
else
{
if(this.name)
{
return "<ref name=\""
+ this.name + "\" />";
}
else
{
throw new Error("getInsertionText: ref.name is null");
}
}
};
/**
* Updates this reference in the edit box.
*/
this.updateInText = function()
{
var txtarea = proveit.getMWEditBox();
if (!txtarea || txtarea == null)
return;
txtarea.focus();
var text = proveit.getMWEditValue();
text = text.replace(this.orig, this.toString());
// Do replacement in textarea.
txtarea.value = text;
// Baseline for future modifications
this.orig = this.toString();
this.save = true;
proveit.highlightTargetString(this.toString());
};
/**
* Internal helper method for toString.
* @param {String} template template for ref (currently "cite" or "Citation"
* @param {Boolean} includeType true to include this.type, false otherwise
* @return {String} string for current reference
*/
this.toStringInternal = function(template, includeType)
{
if(this.name)
{
var returnstring = "<ref name=\"" + this.name + "\">";
}
else
{
var returnstring = "<ref>";
}
returnstring += "{{" + template + (includeType ? " " + this.type : "");
for (var name in this.params)
{
returnstring += " | " + name + "=" + this.params[name];
}
returnstring += "}}</ref>";
return returnstring;
};
/**
* Array of citation strings for this reference.
* @type Array
*/
this.citationStrings = [];
/**
* Sets citationStrings to an array
* @param {Array} strings array of citation strings, not null
*/
this.setCitationStrings = function(strings)
{
this.citationStrings = strings;
};
/**
* Gets array of citationStrings.
* @return {Array} (possibly empty) array of citation strings. Will not return null.
*/
this.getCitationStrings = function()
{
return this.citationStrings;
};
/**
* Get icon URL for reference
* @return {String} icon URL
*/
this.getIcon = function()
{
return proveit.STATIC_BASE + "page_white.png";
};
},
/**
* Constructor for CiteReference type.
* @class CiteReference
* @for proveit
* @constructor
* @extends AbstractReference
* @param {Object} argObj the argument object, with keys for each option
*/
CiteReference: function(argObj)
{
/* This is basically a fast representation of the template redirects, along with
* self-mappings.
*/
var typeNameMappings =
{
web: "web",
book: "book",
journal: "journal",
conference: "conference",
encyclopedia: "encyclopedia",
news: "news",
newsgroup: "newsgroup",
paper: "journal",
"press release": "press release",
"pressrelease": "press release",
interview: "interview",
episode: "episode",
"AV media": "AV media",
DVD: "AV media",
audio: "AV media",
"av media": "AV media",
cd: "AV media",
dvd: "AV media",
media: "AV media",
movie: "AV media",
"music video": "AV media",
video: "AV media",
visual: "AV media"
};
// Sets the type (e.g. web for cite web), applying the mappings. This is up top because it is used in AbstractReference constructor.
this.setType = function(rawType)
{
var mappedType = typeNameMappings[rawType];
if(mappedType != null)
this.type = mappedType;
else
this.type = rawType; // Use naive type as fallback.
};
/**
* Returns the type for display purposes, based on description messages. For example, for "AV media" it currently returns "Audiovisual work".
*
* @return {String} type for display
*/
this.getTypeForDisplay = function()
{
return proveit.getDescriptions()[this.type];
};
proveit.AbstractReference.call(this, argObj);
// TODO: Should CiteReference.getSortIndex and CitationReference.getSortIndex be merged into AbstractCitation? Less fine-grained, but simpler to maintain.
/**
* Returns the sort index for a given parameter
* @param {String} param parameter name
* @return {Number} sort index if found, otherwise -1
*/
this.getSortIndex = function(param)
{
// This is the order fields will be displayed or outputted.
return $.inArray(param, [
"url",
"title",
"trans_title",
"encyclopedia",
"publisher",
"work",
"date",
"agency",
"accessdate",
"author",
"last",
"first",
"subject",
"subjectlink",
"inventor",
"editor",
"author2",
"last2",
"first2",
"subject2",
"subjectlink2",
"author3",
"last3",
"first3",
"subject3",
"subjectlink3",
"author4",
"last4",
"first4",
"subject4",
"author5",
"last5",
"first5",
"author6",
"last6",
"first6",
"author7",
"last7",
"first7",
"author8",
"last8",
"first8",
"author9",
"last9",
"first9",
"authorlink",
"coauthors",
"interviewer",
"cointerviewers",
"type",
"newsgroup",
"journal",
"booktitle",
"program",
"episodelink",
"series",
"serieslink",
"credits",
"network",
"station",
"callsign",
"city",
"airdate",
"began",
"ended",
"season",
"seriesno",
"number",
"minutes",
"transcript",
"transcripturl",
"people",
"year",
"month",
"article",
"contribution",
"format",
"medium",
"newspaper",
"conference",
"volume",
"edition",
"issue",
"location",
"pages",
"page",
"language",
"isbn",
"issn",
"oclc",
"doi",
"pmid",
"id",
"archiveurl",
"archivedate",
"deadurl",
"time",
"quote",
"ref"
]);
};
/**
* Returns this reference as a string.
* @return {String} reference as string
*/
this.toString = function()
{
return this.toStringInternal("cite", true);
};
// References without these parameters will be flagged in red.
// True indicates required (null, or undefined, means not required)
var requiredParams =
{
web: { "url": true, "title": true},
book: { "title": true },
journal: { "title": true },
conference: { "title": true },
encyclopedia: { "title": true, "encyclopedia": true },
news: { "title": true, "work": true, "date": true },
newsgroup: { "title": true },
"press release" : { "title": true },
interview: { "last": true }, // TODO: Interview requires last *or* subject. Currently, we can't represent that.
episode: { "title": true },
"AV media": { "title": true }
};
/**
* Return required parameters for this citation type.
* @return {Object} object with required parameters as keys and true as value; empty object for unknown type
*/
this.getRequiredParams = function()
{
var curReq = requiredParams[this.type];
if(curReq)
return curReq;
else
return {}; // Return empty object rather than null to avoid dereferencing null.
};
// These paramaters will be auto-suggested when editing.
var defaultParams =
{
web: [ "url", "title", "author", "accessdate", "work", "publisher", "date", "pages"],
book: [ "title", "author", "authorlink", "year", "isbn", "publisher", "location", "pages", "url" ],
journal: [ "title", "author", "journal", "volume", "issue", "year", "month", "pages", "url", "doi" ],
conference: [ "conference", "title", "booktitle", "author", "editor", "year", "month", "url", "id", "accessdate", "location", "pages", "publisher" ],
encyclopedia: [ "title", "encyclopedia", "author", "editor", "accessdate", "edition", "year",
"publisher", "volume", "location", "pages" ],
news: [ "title", "author", "url", "work", "date", "accessdate", "pages", "location", "agency" ],
newsgroup: [ "title", "author", "date", "newsgroup", "id", "url", "accessdate" ],
"press release" : [ "title", "url", "publisher", "date", "accessdate" ],
interview: ["last", "first", "subjectlink", "interviewer", "title", "callsign", "city", "date", "program", "accessdate"],
episode: ["title", "series", "credits", "airdate", "city", "network", "season"],
"AV media": ["people", "date", "url", "title", "medium", "location", "publisher"]
};
/**
* Returns default parameters (to be suggested when editing) for current reference
* @return {Array} array of default parameter names; empty array if unknown
*/
this.getDefaultParams = function()
{
var curDefault = defaultParams[this.type];
if(curDefault)
return curDefault;
else
return []; // Return empty array rather than null to avoid dereferencing null.
};
this.isValid = function()
{
if(this.type == '')
{
return false;
}
var req = this.getRequiredParams();
var i = 0;
var allFound = true;
for(var reqParam in req)
{
/* Ignore parameters in req object that are null, undefined, or false.
They are not required. */
if(!req[reqParam])
continue;
allFound &= (reqParam in this.params);
if(!allFound)
break;
}
return allFound;
};
var iconMapping =
{
web: "page_white_world.png",
book: "book.png",
journal: "page_white_text.png",
news: "newspaper.png",
newsgroup: "comments.png",
"press release": "transmit_blue.png",
interview: "telephone.png",
episode: "television.png",
"AV media": "film.png"
};
var superGetIcon = this.getIcon;
this.getIcon = function()
{
var icon = iconMapping[this.type];
if(icon)
{
return proveit.STATIC_BASE + icon;
}
return superGetIcon.call(this);
};
},
/**
* A function for citation style refs.
* @class CitationReference
* @for proveit
* @constructor
* @extends AbstractReference
* @param {Object} argObj argument object with keys for each option
*/
CitationReference: function(argObj) {
proveit.AbstractReference.call(this, argObj);
// None currently required;
var requiredParams = {};
// These paramaters will be auto-suggested when editing.
var defaultParams =
{
web: [ "url", "author", "title", "date", "accessdate"],
news: [ "author", "title", "newspaper", "url", "publication-place", "volume", "issue", "date", "pages"],
encyclopedia: ["author", "editor", "contribution", "title", "publisher", "place", "year", "volume", "pages"],
book: ["author", "title", "publisher", "place", "year"],
journal: ["author", "title", "journal", "volume", "issue", "year", "pages"],
patent: ["inventor", "title", "issue-date", "patent-number", "country-code"]
};
/**
* Returns the sort index for a given parameter
* @param {String} param parameter name
* @return {Number} sort index if found, otherwise -1
*/
this.getSortIndex = function(param)
{
// This is the order fields will be displayed or outputted.
return $.inArray(param, [
"last",
"first",
"url",
"author",
"editor",
"contribution",
"author-link",
"last2",
"first2",
"author2-link",
"publication-date",
"inventor",
"title",
"issue-date",
"patent-number",
"country-code",
"journal",
"volume",
"newspaper",
"issue",
"date",
"publisher",
"place",
"year",
"edition",
"publication-place",
"series",
"version",
"pages",
"page",
"id",
"isbn",
"doi",
"oclc",
"accessdate"
]);
};
/**
* Returns this reference as a string.
* @return {String} reference as string
*/
this.toString = function()
{
return this.toStringInternal("Citation", false);
};
/**
* Return required parameters for this citation type.
* @return {Object} object with required parameters as keys and true as value; empty object for unknown type
*/
this.getRequiredParams = function()
{
return requiredParams;
};
/**
* Returns default parameters (to be suggested when editing) for current reference
* @return {Array} array of default parameter names; empty array if unknown
*/
this.getDefaultParams = function()
{
if(this.type)
{
return defaultParams[this.type];
}
else
{
return ["url", "title", "author", "date", "publisher"]; // Can't determine more specific defaults when editing a pre-existing Citation.
}
};
},
/**
* Constructor for RawReference type.
* @class RawReference
* @for proveit
* @constructor
* @extends AbstractReference
* @param {Object} argObj the argument object, with keys for each option
*/
RawReference: function(argObj)
{
proveit.AbstractReference.call(this, argObj);
this.type = 'raw';
/**
* Returns this reference as a string.
* @return {String} reference as string
*/
this.toString = function()
{
return this.orig;
};
this.params['title'] = this.orig;
this.getIcon = function()
{
return proveit.STATIC_BASE + 'raw.png';
};
this.getTypeForDisplay = function()
{
return proveit.getDescriptions()['raw'];
};
},
// TODO: This should be unified with changeRefFromEditPane
/**
* Convert the current contents of the add citation panel to a reference (i.e CiteReference(), CitationReference())
* @for proveit
* @param {Node} box typepane root of add GUI (pane for specific type, e.g. journal)
* @return {AbstractReference} ref or null if no panel exists yet.
*/
getRefFromAddPane: function(box)
{
var $box = $(box);
var type = $box.data('proveitRefType');
// get <ref> name
var refName = $('#addrefname').val();
var citeFunc = this.togglestyle ? this.CiteReference : this.CitationReference;
var ref = new citeFunc({"name": refName, "type": type});
var paramName, paramVal;
var paramList = $(".paramlist", box)[0];
var paramRows = $('div', paramList);
for (var i = 0; i < paramRows.length; i++)
{
var paramRow = paramRows[i];
var valueTextbox = $(".paramvalue", paramRow)[0];
if($(paramRow).hasClass("addedrow")) // Added with "Add another field"
{
paramName = $.trim($(".paramdesc", paramRow)[0].value);
}
else
{
paramName = valueTextbox.id.substring(this.NEW_PARAM_PREFIX.length);
}
paramVal = $.trim(valueTextbox.value);
if(paramName != "" && paramVal != "")
{ // Non-blank
ref.params[paramName] = paramVal;
}
}
ref.update();
return ref;
},
/**
* Called from the add citation panel, this is the function used to
* add the actual citation.
*
* @param {AbstractReference} ref reference being added
*/
addReference: function(ref) {
// get this working, lots of typing here.
this.addNewElement(ref);
ref.orig = ref.toString();
/*
* Cycle through the boxes and grab the id's versus the values, watch
* for the final box and make sure to grab the type as well
*/
this.insertRefIntoMWEditBox(ref, true); // true means insert full text here, regardless of global toggle.
ref.save = true;
ref.inMWEditBox = true;
},
/**
* Clear all rows of passed in add citation panes.
* @param {Node} citePanes raw DOM element
*/
clearCitePanes: function(citePanes)
{
if(citePanes.hasChildNodes())
{
citePanes.removeChild(citePanes.firstChild);
}
},
/**
* Add event handler to Delete Field button in Add/Edit Reference panes
* @param {Node} fieldRow the fieldRow DOM element to remove
*/
activateRemoveField: function(fieldRow)
{
$('.delete-field', fieldRow).click(function()
{
$(fieldRow).hide(
'highlight',{},'slow',
function() {
$(fieldRow).remove();
}
);
});
},
/**
* Changes the panel for the add reference panel to the correct type of entry
* @param {Node} menu Raw HTML menu element
*/
changeAddPane: function(menu) {
// Reset scroll
$('#add-fields').scrollTop(0);
$(menu.parentNode).show(); // cite/citation vbox.
var citePanes = $(".addpanes", menu.parentNode.parentNode).get(0);
this.clearCitePanes(citePanes);
var newRefType = menu.value;
var genPane = document.getElementById("dummyCitePane").cloneNode(true);
var $genPane = $(genPane).attr('id', '');
$genPane.data('proveitRefType', newRefType);
// name the ref-name-row
$('.ref-name-row', $genPane).children('input').attr('id','addrefname');
$('.ref-name-row', $genPane).children('label').attr('for','addrefname');
// Somewhat hackish. What's a better way?
var newRef;
if(menu.id == "citemenu")
{
newRef = new this.CiteReference({});
}
else
{
newRef = new this.CitationReference({});
}
newRef.type = newRefType;
var descs = this.getDescriptions();
var defaultParams = newRef.getDefaultParams().slice(0); // copy
defaultParams.sort(newRef.getSorter());
//var required = newRef.getRequiredParams();
// Possibly, Cite objects should automatically include default parameters in their param maps. That would seem to make this simpler.
for(var i = 0; i < defaultParams.length; i++)
{
newRef.params[defaultParams[i]] = "";
}
// Should there be a getParamKeys or similar function for this, or even getSortedParamKeys?
var newParams = [];
for(param in newRef.params)
{
newParams.push(param);
}
newParams.sort(newRef.getSorter());
var required = newRef.getRequiredParams();
var paramList = $(".paramlist", $genPane)[0];
for(var i = 0; i < newParams.length; i++)
{
var param = newParams[i];
var paramBox;
if(descs[param])
{
paramBox = document.getElementById("preloadedparamrow").cloneNode(true);
var label = $('.paramdesc', paramBox);
if(required[param])
{
label.addClass("required");
$('.delete-field', paramBox).remove(); // don't let people remove required fields
}
else
{
this.activateRemoveField(paramBox);
}
label.text(descs[param]);
// Basically the same code as nameHbox above
label.attr("for", this.NEW_PARAM_PREFIX + param);
if(param == 'accessdate')
$('.paramvalue', paramBox).val(this.dateFormatter.format(new Date));
}
else
{
// Throwing an error here doesn't make sense if user-added fields can be copied over.
// throw new Error("Undefined description for param: " + param);
paramBox = document.getElementById("addedparamrow").cloneNode(true);
var nameTextbox = $(".paramdesc", paramBox)[0];
nameTextbox.setAttribute("value", param);
}
paramBox.id = "";
this.activateRemoveField(paramBox);
$(".paramvalue", paramBox)[0].id = this.NEW_PARAM_PREFIX + param;
//paramBox.childNodes[2].value = newRef.params[param]; // Causes parameters to disappear. Why?
$(paramBox).show();
paramList.appendChild(paramBox);
}
$genPane.show();
$(citePanes).prepend($genPane);
},
/**
* Create ProveIt HTML GUI
*/
createGUI: function()
{
if(this.getGUI().length > 0)
{
// GUI already created
return false;
}
// more JqueryUI CSS: http://blog.jqueryui.com/2009/06/jquery-ui-172/
var gui = $('<div/>', {id: this.GUI_ID});
var tabs = $('<div/>', {id: 'tabs'});
var created = $('<h1/>');
var createdLink = $('<a/>', {title: 'Created by the ELC Lab at Georgia Tech',
href: 'http://proveit.cc.gatech.edu',
target: '_blank'});
// Main logo in upper-right
var logo = $('<img/>', {src: this.STATIC_BASE + 'logo.png', alt: 'ProveIt', height: 30, width: 118 });
createdLink.append(logo);
created.append(createdLink);
// Minimize/maximize button
var showHideButton = $('<button/>', {text: 'show/hide'});
created.append(showHideButton);
tabs.append(created);
var header = $('<ul/>');
var view = $('<li/>');
// View tab link
var viewLink = $('<a/>', {id: 'view-link', "class": 'tab-link', href: '#view-tab'});
viewLink.append('References (');
var numRefs = $('<span/>', {id: 'numRefs'}).
append('0');
viewLink.append(numRefs).
append(')');
view.append(viewLink);
header.append(view);
var add = $('<li/>');
// Add tab link
var addLink = $('<a/>', {id: 'add-link', "class": 'tab-link', href: '#add-tab'}).
append('Add a Reference');
add.append(addLink);
header.append(add);
tabs.append(header);
// View tab
var viewTab = $('<div/>', {id: 'view-tab', css: {display: 'none'}});
// View pane used for displaying references; within view tab
var viewPane = $('<div/>', {id: 'view-pane'});
var viewScroll = $('<div/>', {"class": 'scroll',
style: 'height: 210px;'});
// Ref list root element
var refTable = $('<table/>', {id: 'refs'});
var dummyRef = $('<tr/>', {id: 'dummyRef',
style: 'display: none;'});
dummyRef.append($('<td/>', {"class": 'number'})).
append($('<td/>', {"class": 'type'})).
append($('<td/>', {"class": 'title'}));
//append($('<td/>', {"class": 'details'}));
var editTd = $('<td/>', {"class": 'edit'}).
append($('<button/>', {text: 'edit'}));
dummyRef.append(editTd);
refTable.append(dummyRef);
viewScroll.append(refTable);
viewPane.append(viewScroll);
viewTab.append(viewPane);
// div#edit-pane, within view tab
var editPane = $('<div/>', {id: 'edit-pane', style: 'display: none'});
// div#edit-fields
var editFields = $('<div/>', {id: 'edit-fields',
"class": 'inputs scroll',
style: 'height: 170px',
tabindex: -1});
// div.ref-name-row
var refNameRow = $('<div/>', {"class": 'ref-name-row',
tabindex: -1});
var refLabel = $('<label/>', {'for': 'editrefname',
title: 'This is a unique identifier that can be used to refer to this reference elsewhere on the page.',
"class": 'paramdesc'}).
append('<ref> name');
refNameRow.append(refLabel);
refNameRow.append($('<input/>', {id: 'editrefname',
"class": 'paramvalue',
tabindex: 0}));
// div.paramlist
var paramList = $('<div/>', {"class": 'paramlist'});
editFields.append(refNameRow);
editFields.append(paramList);
editPane.append(editFields);
// div#edit-buttons, part of edit pane
var editButtons = $('<div/>', {id: 'edit-buttons'});
var addFieldButton = $('<button/>', {style: 'margin-right: 50px;'}).
append('add field');
editButtons.append(addFieldButton);
var reqSpan = $('<span/>', {"class": 'required',
text: 'bold'});
editButtons.append(reqSpan).
append(' = required field');
var saveButton = $('<button/>', {"class": 'right-side accept',
text: 'update edit form'});
editButtons.append(saveButton);
var cancelButton = $('<button/>', {"class": 'right-side cancel',
text: 'cancel'});
editButtons.append(cancelButton);
editPane.append(editButtons);
viewTab.append(editPane);
tabs.append(viewTab);
// dumy cite pane
var dummyCite = $('<div/>', {id: 'dummyCitePane',
"class": 'typepane',
style: 'display: none'});
var addRefNameRow = refNameRow.clone();
//$('input', addRefNameRow).attr('id', 'addrefname');
//$('label', addRefNameRow).attr('for', 'addrefname');
dummyCite.append(addRefNameRow);
dummyCite.append($('<div/>', {"class": 'paramlist'}));
tabs.append(dummyCite);
var preloadedparam = $('<div/>', {id: 'preloadedparamrow',
"class": 'preloadedrow input-row',
style: 'display: none'}).
append($('<label/>', {"class": 'paramdesc'}));
var paramvalue = $('<input/>', {"class": 'paramvalue',
tabindex: 0});
preloadedparam.append(paramvalue);
var deleteButton = $('<button/>', {"class": 'delete-field',
tabindex: -1}).
append('delete field');
preloadedparam.append(deleteButton);
tabs.append(preloadedparam);
var addedparam = $('<div/>', {id: 'addedparamrow',
"class": 'addedrow input-row',
style: 'display: none'}).
append($('<input/>', {"class": 'paramdesc',
tabindex: 0})).
append(paramvalue.clone()).
append(deleteButton.clone());
tabs.append(addedparam);
// Add tab
var addTab = $('<div/>', {id: 'add-tab', css: {display: 'none'}});
var addFields = $('<div/>', {id: 'add-fields',
"class": 'inputs scroll',
style: 'height: 170px',
tabindex: -1});
var cite = $('<div/>', {style: 'display: none',
id: 'cite',
"class": 'input-row'});
var refCiteTypeLabel = $('<label/>', {'for': 'citemenu',
"class": 'paramdesc required',
text: 'Reference type'});
cite.append(refCiteTypeLabel);
var citemenu = $('<select/>', {id: 'citemenu',
change: function()
{
proveit.changeAddPane(citemenu.get(0));
}});
var citeTypes = this.CiteReference.getTypes();
var descs = this.getDescriptions();
for(var i = 0; i < citeTypes.length; i++)
{
citemenu.append($('<option/>', {value: citeTypes[i],
text: descs[citeTypes[i]]}));
}
cite.append(citemenu);
addFields.append(cite);
addFields.append($('<div/>', {"class": 'addpanes',
id: 'citepanes',
tabindex: -1}));
var citation = $('<div/>', {style: 'display: none',
id: 'citation',
"class": 'input-row'});
var refCitationTypeLabel = refCiteTypeLabel.clone().attr('for', 'citationmenu');
citation.append(refCitationTypeLabel);
var citationmenu = $('<select/>', {id: 'citemenu',
change: function()
{
proveit.changeAddPane(citationmenu.get(0));
}});
var citationTypes = ['web', 'book', 'journal', 'encyclopedia', 'news', 'patent'];
for(var j = 0; j < citationTypes.length; j++)
{
citationmenu.append($('<option/>', {value: citationTypes[i],
text: descs[citationTypes[i]]}));
}
citation.append(citationmenu);
addFields.append(citation).
append($('<div/>', {"class": 'addpanes',
id: 'citationpanes', style: 'display: none;'}));
addTab.append(addFields);
// Add buttons, part of add tab
var addButtons = $('<div/>', {id: 'add-buttons'});
addButtons.append($('<button/>', {style: 'margin-right: 50px;',
text: 'add field'})).
append(reqSpan.clone()).
append(" = required").
append(saveButton.clone().text('insert into edit form')).
append(cancelButton.clone());
addTab.append(addButtons);
tabs.append(addTab);
gui.append(tabs);
$(document.body).prepend(gui);
var cancelEdit = function() {
$("#edit-pane").hide();
$("#view-pane").show();
};
// set up tabs
$("#tabs").tabs({
selected: 0,
show: function(event,ui)
{
switch(ui.index)
{
case 0: // view
//$('tr.selected').focus();
break;
case 1: // add
cancelEdit();
proveit.changeAddPane(document.getElementById(proveit.togglestyle ? 'citemenu' : 'citationmenu'));
break;
// case 1: // edit
// proveit.updateEditPane();
// $('tr.selected').dblclick();
//break;
default:
// nothing
}
}
});
// handle clicking on tabs
$(viewLink).click(function(){
if($(viewTab).is(":hidden"))
proveit.toggleViewAddVisibility();
else
cancelEdit(); // Edit and view are the same tab, so we handle this specially.
});
$(addLink).click(function(){
if($(addTab).is(":hidden"))
proveit.toggleViewAddVisibility();
});
// add panel buttons
$("#add-buttons button:first").button({
icons: {
primary: 'ui-icon-circle-plus'
}
}).click(function()
{
proveit.addPaneRow(document.getElementById("add-tab"));
})
.next().next().button({
icons: {
primary: 'ui-icon-circle-check',
secondary: 'ui-icon-circle-arrow-e'
}
}).click(function()
{
proveit.addReference(proveit.getRefFromAddPane($('#add-tab .typepane').get(0)));
$("#tabs").tabs( { selected: '#view-tab' } );
$("div.scroll, #view-pane").scrollTop(100000); // scroll to new ref
}).next().
button({
icons: {
primary: 'ui-icon-circle-close'
}
}).click(function()
{
$("#tabs").tabs( { selected: '#view-tab' } );
});
// cancel buttons
$("button.cancel").click(cancelEdit);
// edit panel buttons
$("#edit-buttons button:first").button({
icons: {
primary: 'ui-icon-circle-plus'
}
}).click(function()
{
proveit.addPaneRow($("#edit-pane"));
}).
next().next().
button({
icons: {
primary: 'ui-icon-circle-check'
}
}).next().button({
icons: {
primary: 'ui-icon-circle-close'
}
});
// delete field button
$(".delete-field").button({
icons: {
primary: 'ui-icon-close'
},
text: false
});
// create the minimize button
showHideButton.button({
icons: {
primary: 'ui-icon-triangle-1-n'
},
text: false
});
var viewAndAdd = $("#view-tab, #add-tab");
this.viewAndAddPanes = viewAndAdd;
function minimize()
{
viewAndAdd.hide();
showHideButton.button("option", "icons", { primary: 'ui-icon-triangle-1-n' } );
}
function maximize()
{
viewAndAdd.show();
showHideButton.button("option", "icons", { primary: 'ui-icon-triangle-1-s' } );
}
// set up the minimize button
showHideButton.toggle(
maximize,
minimize
);
this.toggleViewAddVisibility = function()
{
showHideButton.click();
};
this.scanForRefs();
$("#refs tr").eq(0).click().click(); // select first item in list. TODO: Why two .click?
// alternate row colors
$("#refs tr:even").addClass('light');
$("#refs tr:odd").addClass('dark');
},
/**
* A reference to the set containing two items, the view and add tabs. Will be initialized by createGUI, so it is non-null if ProveIt is visible
*
* @type {$NodeSet}
*/
viewAndAddPanes: null,
/*
* Gets jQuery set for ProveIt GUI, which will be empty if ProveIt has not initialized
*
* @return {$Node} root of ProveIt
*/
getGUI: function()
{
return $('#' + this.GUI_ID);
},
/**
* Hides ProveIt completely
*/
hide: function()
{
this.getGUI().hide();
},
/**
* Show ProveIt
*/
show: function()
{
this.createGUI();
this.getGUI().show();
},
/**
* Toggle overall visiblility. If currently hidden, go to minimized. If minimized, maximize. If maximize, hide
*/
toggleVisibility: function()
{
if(this.getGUI().is(':visible'))
{
if(this.viewAndAddPanes.is(':visible')) // maximized
{
this.hide();
}
/*
* If previously maximized, we minimize after hiding, so when we show, it will already be minimized.
* If minimized, we maximize
*/
this.toggleViewAddVisibility();
}
else
{
this.show();
}
},
/**
* Toggle visibility of view and add panes. Initialized by createGUI
*
* @method toggleViewAddVisibility
*/
toggleViewAddVisibility: null,
/**
* Generates refbox row and all children, to be used by addNewElement, and when updating
*
* @param {AbstractReference} ref reference to generate from
* @param {Boolean} isReplacement if true, this replaces another refbox item, so no number will be assigned, and the count will not be updated.
* @return {Node} new refbox row for refbox
*/
makeRefBoxRow: function(ref, isReplacement)
{
var refName = ref.name; //may be null or blank
//var refbox = this.getRefBox();
var newchild = $('<tr><td class="number"></td><td class="type"></td><td class="title"></td><td class="edit"></td></tr>').get(0);
// removed <span class="pointers"></span>
// removed <td class="details"></td>
if(!ref.isValid())
{
// Flag as invalid.
$(newchild).addClass('invalid');
}
// grab the nodes that need changed out of it
var neweditimage = $('.edit button', newchild).get(0);
var thisproveit = this;
var title = '';
var shortTitle = '';
if(ref.params['title'] != null)
{
title = ref.params['title'];
shortTitle = this.truncateTitle(title);
}
$('td.title', newchild).text(shortTitle);
$('td.title', newchild).attr('title', title);
// deal with variations of date info
var formattedYear = '';
if(ref.params['year'])
formattedYear = ref.params['year'];
else if (ref.params['date'])
{
var yearMatch = ref.params['date'].match(/^([12]\d{3})/);
if(yearMatch)
{
formattedYear = yearMatch[1];
}
}
//$('td.year', newchild).text(formattedYear);
// deal with variations of author info
var formattedAuthor = '';
if(ref.params['author'])
formattedAuthor = ref.params['author'];
else if (ref.params['last'])
{
// if(ref.params['first'])
// formattedAuthor = ref.params['last'] + ', ' + ref.params['first'];
// else
formattedAuthor = ref.params['last'];
}
if(ref.params['coauthors'] || ref.params['last2'])
formattedAuthor += ' <i>et al.</i>';
// build the "details" cell based on presence of author/year data
// var details = '';
// if (formattedYear != '' && formattedAuthor != '')
// details = '(' + formattedAuthor + ', ' + formattedYear + ')';
// else if (formattedYear != '')
// details = '(' + formattedYear + ')';
// else if (formattedAuthor != '')
// details = '(' + formattedAuthor + ')';
// $('td.details', newchild).html(details);
// generate a URL based on ref type
var icon = ref.getIcon(), url = '', refType = ref.type;
switch(refType)
{
case 'web':
url = ref.params['url'];
break;
case 'book':
if(ref.params['isbn'] != null)
url = wgServer + '/w/index.php?title=Special%3ABookSources&isbn=' + ref.params['isbn'];
break;
case 'journal':
case 'conference':
if(ref.params['doi'] != null)
url = 'http://dx.doi.org/' + ref.params['doi'];
break;
case 'news':
url = ref.params['url'];
break;
case 'episode':
url = 'http://www.imdb.com/find?s=ep&q=' + escape(ref.params['title']);
break;
}
$('td.type', newchild).css('background-image','url('+icon+')');
var authorByline = '', yearByline = '', refTypeByline = '';
if(formattedAuthor != '')
authorByline = 'By: <span class="author">' + formattedAuthor + '</span>';
if(formattedYear != '')
yearByline = 'Date: <span class="date">' + formattedYear + '</span>';
if(refType != null)
{
var displayType = ref.getTypeForDisplay(), formattedRefType = displayType;
$('td.type', newchild).attr('title', displayType);
if(url != '')
formattedRefType = '<a href="' + url + '" target="_blank">' + formattedRefType + '</a>';
refTypeByline = 'Type: <span class="type">' + formattedRefType + '</span>';
}
//alert("authorByline: " + authorByline + "\n yearByline: " + yearByline + "\n refTypeByline: " + refTypeByline);
var byline = '', separator = ' | ';
if(refType == 'raw')
{
byline = refTypeByline + separator + mw.html.escape(ref.toString());
}
else if(authorByline != '') // a??
{
if(yearByline != '') // ad?
{
if(refTypeByline != '') // adt
byline = authorByline + separator + yearByline + separator + refTypeByline;
else // ad-
byline = authorByline + separator + yearByline;
}
else // a-?
{
if(refTypeByline != '') // a-t
byline = authorByline + separator + refTypeByline;
else // a--
byline = authorByline;
}
}
else // -??
{
if(yearByline != '') // -d?
{
if(refTypeByline != '') // -dt
byline = yearByline + separator + refTypeByline;
else // -d-
byline = yearByline;
}
else // --?
{
if(refTypeByline != '') // --t
byline = refTypeByline;
// no need for ---
}
}
byline = '<p>' + byline + '</p>';
//alert(byline);
// create expanded <div>
var expanded = $('<div />',{
"class": 'expanded'
});
// append the infobar to the expanded info box
$(expanded).append(byline);
// append the expanded info box to the title <td>
$('td.title', newchild).append(expanded);
if(!isReplacement)
{
// get ref number by counting number of refs (this includes dummy ref, but not the one we're creating)
var numRefs = $('#refs tr').length;
$('td.number', newchild).text(numRefs);
$('#numRefs').text(numRefs); // update the number of refs in the view tab
}
// event handler for selecting a ref)
$(newchild).click(function() {
thisproveit.highlightTargetString(ref.orig);
//thisproveit.highlightTargetString(ref.orig);
$("#refs tr").removeClass('selected');
$(newchild).addClass('selected');
});
var doEdit = function() {
thisproveit.updateEditPane(ref);
$("#view-pane").hide();
$("#edit-pane").show();
};
var citationStrings = ref.getCitationStrings();
//var pointers = $('.pointers', newchild);
var allCitations = $('<span class="all-citations" />');
for(var i = 0; i < citationStrings.length; i++)
{
var dividend = i + 1;
var colName = "";
while(dividend > 0)
{
var mod = --dividend % 26;
colName = String.fromCharCode(97 + mod) + colName; // a = 97
dividend = Math.floor(dividend / 26);
}
var citationHolder = $('<a href="#">' + colName + '</a>');
// Bind i
var clickFunc = (function(i)
{
return function()
{
var last = 0, j = 0;
var text = proveit.getMWEditValue();
for(j = 0; j < i; j++)
{
last = text.indexOf(citationStrings[j], last);
// Shouldn't happen. Indicates citation strings are out of date.
if(last == -1)
{
proveit.log("citationStrings[" + j + "]: " + citationStrings[j] + " not found. Returning.");
return false;
}
last += citationStrings[j].length;
}
var startInd = text.indexOf(citationStrings[i], last);
if(startInd == -1)
{
proveit.log("citationStrings[" + i + "]: " + citationStrings[i] + " not found.");
}
else
{
proveit.highlightLengthAtIndex(startInd, citationStrings[i].length);
}
return false;
};
})(i);
citationHolder.click(clickFunc);
allCitations.append(citationHolder);
}
if(citationStrings.length > 1)
{
var newP = $('<p />');
newP.append('This reference is cited in the article <span class="num-citations">' + citationStrings.length + ' times</span>: ').append(allCitations);
expanded.append(newP);
}
// edit buttons
if(ref.type != 'raw')
{
// SMALL EDIT BUTTON
// create button
var smallEditBtn = $('<button />',{
text: 'edit'
});
// transform button
$(smallEditBtn).button({
icons: {
primary: 'ui-icon-pencil'
},
text: false
});
// button click event handler
smallEditBtn.click(doEdit);
// append button
$('.edit', newchild).append(smallEditBtn);
// LARGE EDIT BUTTON
// create button
var editBtn = $('<button />',{
"class": 'edit',
text: 'edit this reference'
});
// transform button
$(editBtn).button({
icons: {
primary: 'ui-icon-pencil'
},
text: true
});
// button click event handler
editBtn.click(doEdit);
// append button
expanded.append(editBtn);
// ROW EVENT HANDLER
$(newchild).dblclick(doEdit);
}
else
{
// needed to keep all rows the same height
$('.edit', newchild).append(' ');
}
// ibid button
if(citationStrings.length > 0)
{
// create button
var ibidBtn = $('<button />',{
"class": 'insert',
text: 'insert this reference at cursor'
});
// transform button
$(ibidBtn).button({
icons: {
primary: 'ui-icon-arrowthick-1-e'
},
text: true
});
// button click event handler
ibidBtn.click(function(){
thisproveit.insertRefIntoMWEditBox(ref, false);
return false;
});
// append button
expanded.append(ibidBtn);
}
return newchild;
},
/**
* Truncates title to fit ProveIt refbox row.
* @param {String} title title to truncate
* @return {String} truncated title
*/
truncateTitle: function(title)
{
var MAX_LENGTH = 86;
var truncated = title;
if(title.length > MAX_LENGTH)
{
truncated = truncated.substring(0, MAX_LENGTH);
var lastSpacePos = truncated.lastIndexOf(' ');
if(lastSpacePos != -1)
{
truncated = truncated.substr(0, lastSpacePos);
truncated += " ...";
}
}
return truncated;
},
/**
* Only to be used internally to add the citations to the list
*
* @param {AbstractReference} ref the reference to add
*/
addNewElement: function(ref)
{
var refbox = this.getRefBox();
$(refbox).append(this.makeRefBoxRow(ref, false));
}
}, window.proveit);
/**
* Static method. Returns valid Cite reference types
* @for CiteReference
* @static
* @return {Array} array of cite method types
*/
proveit.CiteReference.getTypes = function()
{
return ["web", "book", "journal", "conference", "encyclopedia", "news", "newsgroup", "press release", "interview", "episode", "AV media"];
};
proveit.split._compliantExecNpcg = /()??/.exec("")[1] === undefined; // NPCG: nonparticipating capturing group
proveit.split._nativeSplit = String.prototype.split;
proveit.setup();
}( mediaWiki, jQuery ) );
// Local Variables:
// js2-basic-offset: 8
// End:
9ca5eeb59e53123532e9c90b0ffdd36a5c97d9bf
115
2013-06-30T02:15:23Z
Superm401
0
Deploy commit c978344be3df of ProveIt.
javascript
text/javascript
/* _____________________________________________________________________________
* | |
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
* |_____________________________________________________________________________|
*/
/*
* Imported from Mercurial commit c978344be3df as of 2013-06-30 from http://code.google.com/p/proveit-js/
* Changes should be made through that Google Code project.
*/
/*
* ProveIt ([[User:ProveIt GT]]) is a powerful GUI tool for viewing, adding, editing, and inserting references on Wikipedia.
*
* Copyright 2008 - 2011
*
* Georgia Tech Research Corporation
*
* Atlanta, GA 30332-0415
*
* Copyright 2011 -
*
* Matthew Flaschen
*
* ALL RIGHTS RESERVED
*
* ProveIt is available under the GNU Free Documentation License (GFDL-1.3.txt), Creative Commons
* Attribution/Share-Alike License 3.0 (http://creativecommons.org/licenses/by-sa/3.0/), and the GNU
* General Public License 2 (GPL-2.txt)
*/
/**
* Electronic Learning Communities
* @module elc
*/
( function ( mw, $ ) {
/*
Second parameter (pre-existing proveit object, if any) passed to extend overrides first.
Gives users option to easily override initial constants, such as shouldAddSummary.
If proveit is unintentionally imported more than once, the first import will take precedence.
*/
/**
* Main class and namespace for ProveIt software. This is the only global variable.
* @class proveit
*/
var proveit = window.proveit = $.extend({
/**
* Approximately half the height of the edit box. Used in scrolling when highlighting text.
* @type Number
*/
HALF_EDIT_BOX_HEIGHT: 200,
// This could be preference-controlled, instead of hard-coded.
/**
* Language used for descriptions
* @type String
*/
LANG: "en",
/**
* Text before param name (e.g. url, title, etc.) in creation box, to avoid collisions with unrelated ids.
* @type String
*/
NEW_PARAM_PREFIX: "newparam",
/**
* Text before param name (e.g. url, title, etc.) in edit box, to avoid collisions with unrelated ids.
* @type String
*/
EDIT_PARAM_PREFIX: "editparam",
GUI_ID: "proveit",
/**
* Base URL used for static content
*
* This directory includes icons from the Silk set (http://www.famfamfam.com/lab/icons/silk/), by Mark James
* @type String
*/
STATIC_BASE: "//proveit-js.googlecode.com/hg/static/",
/* Used to map between keys, including citation parameter names, and human-readable text. It can be
* internationalized easily. Add descriptions.xx , where xx is
* the ISO 639-1 code for a language, then set proveit.LANG to "xx"
* to use the new descriptions.
*/
descriptions :
{
en :
{
agency: "Agency",
name: "Name",
author: "Author (L, F)",
author2: "Author two (L, F)",
author3: "Author three (L, F)",
author4: "Author four (L, F)",
author5: "Author five (L, F)",
author6: "Author six (L, F)",
author7: "Author seven (L, F)",
author8: "Author eight (L, F)",
author9: "Author nine (L, F)",
last: "Last name",
last2: "Last name (auth. two)",
last3: "Last name (auth. three)",
last4: "Last name (auth. four)",
last5: "Last name (auth. five)",
last6: "Last name (auth. six)",
last7: "Last name (auth. seven)",
last8: "Last name (auth. eight)",
last9: "Last name (auth. nine)",
first: "First name",
first2: "First name (auth. two)",
first3: "First name (auth. three)",
first4: "First name (auth. four)",
first5: "First name (auth. five)",
first6: "First name (auth. six)",
first7: "First name (auth. seven)",
first8: "First name (auth. eight)",
first9: "First name (auth. nine)",
authorlink: "Author article name",
title: "Title",
trans_title: "Title in English",
publisher: "Publisher",
year: "Year",
location: "Location",
place: "Location of work",
isbn: "ISBN",
id: "ID",
doi: "DOI",
page: "Page",
pages: "Pages",
quote: "Quote",
month: "Month",
journal: "Journal",
edition: "Edition",
volume: "Volume",
issue: "Issue",
url: "URL",
date: "Publication date",
accessdate: "Access date",
coauthors: "Co-authors",
booktitle: "Title of Proceedings",
contribution: "Contribution/Chapter",
encyclopedia: "Encyclopedia",
newsgroup: "Newsgroup",
version: "Version",
site: "Site",
newspaper: "Newspaper",
"publication-place": "Publication location",
editor: "Editor (L, F)",
article: "Article",
pubplace: "Publisher location",
pubyear: "Publication year",
inventor: "Inventor (L, F)",
"issue-date": "Issue date",
"patent-number": "Patent number",
"country-code": "Country code (XX)",
work: "Work",
format: "Format",
issn: "ISSN",
pmid: "PMID",
chapter: "Chapter",
web: "Web",
book: "Book",
conference: "Conference",
news: "News",
paper: "Paper",
"press release": "Press release",
interview: "Interview",
"AV media": "Audiovisual work",
subject: "Subject",
subjectlink: "Subject article name",
subject2: "Subject two",
subjectlink2: "Subject two article name",
subject3: "Subject three",
subjectlink3: "Subject three article name",
subject4: "Subject four",
interviewer: "Interviewer",
cointerviewers: "Co-interviewers",
type: "Type",
program: "Program",
callsign: "Call sign",
city: "City",
archiveurl: "Archive URL",
archivedate: "Date archived",
episode: "Episode",
episodelink: "Episode article name",
series: "Series",
serieslink: "Series article name",
credits: "Credits",
network: "Network",
station: "Station",
airdate: "Airdate",
began: "Start date",
ended: "End date",
season: "Season number",
seriesno: "Season number",
number: "Number",
minutes: "Minutes",
transcript: "Transcript",
transcripturl: "Transcript URL",
people: "People",
medium: "Production medium",
language: "Language",
time: "Time",
oclc: "OCLC",
ref: "Anchor ID",
deadurl: 'Dead URL?',
raw: 'Unknown format'
},
// Finnish translation by Olli (ollinpostit at gmail.com)
fi: {
agency: "Edustaja",
name: "Nimi",
author: "Tekijä",
author2: "Tekijä kaksi",
author3: "Tekijä kolme",
author4: "Tekijä neljä",
author5: "Tekijä viisi",
author6: "Tekijä kuusi",
author7: "Tekijä seitsemän",
author8: "Tekijä kahdeksan",
author9: "Tekijä yhdeksän",
last: "Sukunimi",
last2: "Sukunimi (tekijä 2)",
last3: "Sukunimi (tekijä 3)",
last4: "Sukunimi (tekijä 4)",
last5: "Sukunimi (tekijä 5)",
last6: "Sukunimi (tekijä 6)",
last7: "Sukunimi (tekijä 7)",
last8: "Sukunimi (tekijä 8)",
last9: "Sukunimi (tekijä 9)",
first: "Etunimi",
first2: "Etunimi (tekijä 2)",
first3: "Etunimi (tekijä 3)",
first4: "Etunimi (tekijä 4)",
first5: "Etunimi (tekijä 5)",
first6: "Etunimi (tekijä 6)",
first7: "Etunimi (tekijä 7)",
first8: "Etunimi (tekijä 8)",
first9: "Etunimi (tekijä 9)",
authorlink: "Tekijästä kertova sivu",
title: "Otsikko",
publisher: "Julkaisija",
year: "Vuosi",
location: "Paikka",
place: "Työn paikka",
isbn: "ISBN",
id: "ID",
doi: "DOI",
page: "Sivu",
pages: "Sivuja",
quote: "Lainaus",
month: "Kuukausi",
journal: "Aikakauslehti",
edition: "Painos",
volume: "Vuosikerta",
issue: "Numero",
url: "Osoite",
date: "Julkaisupäivä",
accessdate: "Luettu",
coauthors: "Muut tekijät",
booktitle: "Jatko-osien otsikko",
contribution: "Osallistuminen/yhteistyö",
encyclopedia: "Tietosanakirja",
newsgroup: "Uutisryhmä",
version: "Versio",
site: "Sivusto",
newspaper: "Sanomalehti",
"publication-place": "Julkaisupaikka",
editor: "Toimittaja",
article: "Artikkeli",
pubplace: "Julkaisijan paikka",
pubyear: "Julkaisuvuosi",
inventor: "Keksijä",
"issue-date": "Saatavilla päivänä",
"patent-number": "Patenttinumero",
"country-code": "Maakoodi (XX)",
work: "Työ",
format: "Muoto",
issn: "ISSN",
pmid: "PMID",
chapter: "Luku",
web: "Verkko",
book: "Kirja",
conference: "Kokous",
news: "Uutiset",
paper: "Lehti",
"press release": "Lehdistötiedote",
interview: "Haastattelu",
subject: "Otsikko",
subjectlink: "Artikkelin otsikko",
subject2: "Otsikko kaksi",
subjectlink2: "Artikkelin kaksi otsikko",
subject3: "Otsikko kolme",
subjectlink3: "Artikkelin kolme otsikko",
subject4: "Otsikko neljä",
interviewer: "Haastattelija",
cointerviewers: "Muut haastattelijat",
type: "Tyyppi",
program: "Ohjelma",
callsign: "Call sign",
city: "Kaupunki",
archiveurl: "Arkiston osoite",
archivedate: "Arkistointipäivämäärä",
episode: "Jakso",
episodelink: "Jakson sivun nimi",
series: "Sarja",
serieslink: "Sarjan sivun nimi",
credits: "Tekijät",
network: "Verkko",
station: "Asema",
airdate: "Lähetyspäivä",
began: "Aloituspäivä",
ended: "Lopetuspäivä",
season: "Kauden numero",
seriesno: "Kauden numero",
number: "Numero",
minutes: "Minuutit",
transcript: "Puhtaaksi kirjoitettu teksti",
transcripturl: "Puhtaaksikirjoitetun osoite",
video: "Video",
people: "Ihmiset",
medium: "Tuotantomedia",
language: "Kieli",
time: "Aika",
oclc: "OCLC",
ref: "Ankkurin ID-tunnus"
}
},
/**
* Optional preference to specify default date format for new references.
* If set, it overrides the general date preference from Special:Preferences.
*
* @type {String} supported date format string
*/
dateFormatString: null,
/**
* Singleton used to format dates according to user preference
*
* @type DateFormatter
*/
dateFormatter: null,
/**
* Gets the effective preference for date format. If there is no ProveIt-specific
* preference already at proveit.dateFormatString, it will determine the correct preference
* from MW user preferences. Then, it will store that value to proveit.dateFormatString
*
* @return {String} format string to use for dates
*/
getDatePreference: function () {
if (this.dateFormatString === null) {
this.dateFormatString = mw.user.options.get('date');
}
return this.dateFormatString;
},
/**
* Returns descriptions for the current language.
* @return {Object} descriptions
*/
getDescriptions: function()
{
//this could be made Cite-specific if needed.
return this.descriptions[proveit.LANG];
},
/**
* String added to logs for easy search
* @type String
*/
LOG_MARKER: "[ProveIt] ",
/**
* Convenience log function
* @param {...Object} var_args objects (including strings) to log
*/
log: function()
{
var args = Array.prototype.slice.call(arguments);
args.unshift(this.LOG_MARKER);
mw.log.apply(mw, args);
},
/**
* Log error object if possible, using error (preferable), or log, if available.
* @param {Error} ex error object
*/
logException: function(ex)
{
var args = [ex, ex.stack];
if(typeof(console) === "object" && $.isFunction(console.error))
{
args.unshift(this.LOG_MARKER);
console.error.apply(null, args);
}
else
{
this.log.apply(this, args);
}
},
/**
* Returns true if the page has an edit box
*
* @return {Boolean} true if the page has an edit box, false otherwise
*/
isEditPage: function()
{
return wgAction == 'edit' || wgAction == 'submit';
},
/**
* Returns true if the page is likely to contain references
* @return {Boolean} true if page is supported, false otherwise
*/
isSupportedPage: function()
{
// "Regular" article, userspace, or Wikipedia:Sandbox (exception for testing).
return (wgCanonicalNamespace == '' || wgCanonicalNamespace == 'User' || wgPageName == 'Wikipedia:Sandbox');
},
/**
* Convenience function. Returns the refbox element.
* @return {$Node} reference box
*/
getRefBox: function()
{
return $("#refs");
},
/**
* Provides the x (left) and y (top) offsets to a given element. From QuirksMode (http://www.quirksmode.org/js/findpos.html), a freely available site by Peter-Paul Koch
* @param {Node} node any HTML node
* @return {Object} offsets to node, as object with left and top properties.
*/
getPosition: function(node)
{
var left = 0, top = 0;
do
{
left += node.offsetLeft;
top += node.offsetTop;
} while (node = node.offsetParent);
return {"left": left, "top": top};
},
/**
* Highlights a given length of text, at a particular index.
* @param {Number} startInd start index in Wikipedia edit box
* @param {Number} length length of string to highlight
* @return {Boolean} always true
*/
highlightLengthAtIndex: function(startInd, length)
{
if(startInd < 0 || length < 0)
{
this.log("highlightStringAtIndex: invalid negative arguments");
}
var box = this.getMWEditBox();
var origText = box.value;
var editTop = this.getPosition(box).top;
box.value = origText.substring(0, startInd);
box.focus();
box.scrollTop = 1000000; //Larger than any real textarea (hopefully)
var curScrollTop = box.scrollTop;
box.value += origText.substring(startInd);
if(curScrollTop > 0)
{
box.scrollTop = curScrollTop + this.HALF_EDIT_BOX_HEIGHT;
}
$(box).focus().textSelection('setSelection',
{
start: startInd,
end: startInd + length
});
editTop = this.getPosition(box).top;
window.scroll(0, editTop);
return true;
},
/**
* Highlights the first instance of a given string in the MediaWiki edit box.
* @param {String} targetStr the string in the edit box to highlight
* @return {Boolean} true if successful, false otherwise
*/
highlightTargetString: function(targetStr)
{
var origText = this.getMWEditValue();
var startInd = origText.indexOf(targetStr);
if(startInd == -1)
{
this.log("Target string \"" + targetStr + "\" not found.");
return false;
}
return this.highlightLengthAtIndex(startInd, targetStr.length);
},
/**
* Convenience function. Returns the raw MediaWiki textarea element.
* @return {Node} the edit box element
*/
getMWEditBox: function()
{
return $("#wpTextbox1")[0];
},
/**
* Provides value of edit box with CR normalization
*
* @return {String} value of edit box with CRs stripped if document.selection exists
*/
getMWEditValue: function()
{
var box = this.getMWEditBox();
var value = box.value;
if(!box.selectionStart && document.selection) // IE 8-like behavior
{
value = value.replace(/\r\n/g, "\n");
}
return value;
},
/**
* Returns raw edit form element, which contains MWEditBox, among other things.
* @return {Node} the edit form element
*/
getMWEditForm: function()
{
return $("#editform")[0];
},
/**
* Runs a given function on submission of edit form
* @param {Function} subFunc function to run on submission
*/
addOnsubmit: function(subFunc)
{
var form = this.getMWEditForm();
if(!form)
{
throw new Error("No edit form, possibly due to protected page.");
}
form.addEventListener("submit", subFunc, false);
},
/**
* Returns the raw MW edit summary element
* @return {Node} the edit summary element
*/
getEditSummary: function()
{
return $("#wpSummary")[0];
},
/**
* Keep track of whether we have already added an onsubmit function to include ProveIt in the summary.
* This guarantees the function will not be run twice.
* @type Boolean
*/
summaryFunctionAdded: false,
/**
* Does the user want us to ever add "Edited by ProveIt" summary?
* @type Boolean
*/
shouldAddSummary: true,
/**
* ProveIt should be visible on load (rather than requiring toolbar button click) on supported edit pages
* @type Boolean
*/
loadVisible: true,
/**
* Maximize ProveIt when it first becomes visible. If false, it will start minimized. This has no effect on when it becomes visible.
* @type Boolean
*/
loadMaximized: false,
/**
* Specifies to include ProveIt edit summary on next save.
* Can be disabled by modifying shouldAddSummary
*/
includeProveItEditSummary: function()
{
if(this.shouldAddSummary && !this.summaryFunctionAdded)
{
try
{
var thisproveit = this;
this.addOnsubmit(function()
{
var summary = thisproveit.getEditSummary();
if(summary.value.indexOf("ProveIt") == -1)
{
summary.value += " (edited with [[User:ProveIt_GT|ProveIt]])";
}
});
this.summaryFunctionAdded = true;
}
catch(e)
{
this.log("Failed to add onsubmit handler. e.message: " + e.message);
}
}
},
/**
* Setup button so users can load ProveIt on demand
*/
setupButton: function()
{
var $box = $(this.getMWEditBox());
// Ensures wikiEditor is loaded
$box.bind('wikiEditor-toolbar-buildSection-main', function(event, section)
{
delete section.groups.insert.tools.reference;
section.groups.insert.tools.proveit = {
label: 'ProveIt',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/19/ProveIt_logo_for_user_boxes.svg/22px-ProveIt_logo_for_user_boxes.svg.png',
action: {
type: 'callback',
execute: function()
{
proveit.toggleVisibility();
}
}
};
});
},
/**
* Sets up ProveIt if we're on an edit page. This includes setting up the toolbar button. Depending on configuration and the current page, it may also call load to show ProveIt.
*/
setup: function()
{
if(this.isEditPage())
{
if(this.loadVisible && this.isSupportedPage())
{
this.load();
}
this.setupButton();
}
},
/**
* Loads dependencies and creates GUI
*/
load: function()
{
addOnloadHook(function()
{
var dependencies = ['jquery.ui.tabs', 'jquery.ui.button', 'jquery.effects.highlight', 'jquery.textSelection'];
var preference = proveit.getDatePreference();
proveit.dateFormatter = new proveit.DateFormatter(preference);
mw.loader.using(dependencies, function()
{
try
{
proveit.createGUI();
if(proveit.loadMaximized)
{
proveit.toggleViewAddVisibility();
}
}
catch(ex)
{
proveit.logException(ex);
}
}, function(ex, errorDependencies)
{
proveit.log('Failed to load one of: ', errorDependencies);
});
});
},
/**
* Clears the refBox of refBoxRows, except for dummy rows.
* @return {Boolean} false if refBox wasn't found
*/
clearRefBox: function()
{
var box = this.getRefBox();
if(box == null)
{
this.log("Ref box is not loaded yet.");
return false;
}
$("tr:not('tr#dummyRef')", box).remove();
return true;
},
/** Inserts ref text into MW edit box.
* @param {String} ref Reference text to insert
* @param {Boolean} full Insert the full reference text if true, citation otherwise.
* @return {Boolean} false if errors
*/
insertRefIntoMWEditBox: function(ref, full)
{
var txtarea = this.getMWEditBox();
if(!txtarea)
{
this.log("insertRefIntoMWEditBox: txtarea is null");
return false;
}
txtarea = $(txtarea);
var insertionText = ref.getInsertionText(full);
// Replace existing selection (if any), then scroll
txtarea.textSelection('encapsulateSelection',
{
peri: insertionText,
replace: true
});
var caretPos = txtarea.textSelection('getCaretPosition', {startAndEnd: true});
// This is slightly redundant. It is called primarily for the scrollig workaround
this.highlightLengthAtIndex(caretPos[0], caretPos[1] - caretPos[0]);
this.includeProveItEditSummary();
},
/**
* Modifies reference object from user-edited GUI. The reference object is mutated in place, so the return value is only for convenience.
*
* @param {Node} editPane the raw element of the editPane
* @param {AbstractReference} ref the original citation object we're modifying
*
* @return {AbstractReference} same ref that was passed in
*/
changeRefFromEditPane: function(ref, editPane)
{
var paramBoxes = $("div.input-row", editPane);
var refName = $('#editrefname').val();
ref.name = refName != "" ? refName : null; // Save blank names as null
// Clear old params
ref.params = {};
var paramName, paramVal;
for (var i = 0; i < paramBoxes.length; i++)
{
var paramRow = paramBoxes[i];
var valueTextbox = $(".paramvalue", paramRow)[0];
if($(paramRow).hasClass("addedrow")) // Added with "Add another field"
{
paramName = $.trim($(".paramdesc", paramRow)[0].value);
}
else
{
paramName = valueTextbox.id.substring(this.EDIT_PARAM_PREFIX.length);
}
this.log("paramName: " + paramName);
paramVal = $.trim(valueTextbox.value);
this.log("paramVal: " + paramVal);
if (paramName != "" && paramVal != "")
{
ref.params[paramName] = paramVal;
}
}
if (ref.toString() != ref.orig)
{
ref.save = false;
}
ref.update();
return ref;
},
/**
* Creates refBoxRow, updates numbering for all refBoxRows, replaces old refBoxRow with new one, and updates ref text in MWEditBox.
* @param {AbstractReference} ref the ref we want to save.
*/
saveRefFromEdit: function(ref)
{
if(!ref.save)
{
var newRichItem = this.makeRefBoxRow(ref, true);
var oldRichItem = $('.selected', this.getRefBox()).get(0);
var oldNumber = $('td.number',oldRichItem).text();
$('td.number',newRichItem).text(oldNumber); // preserve old numbering
oldRichItem.parentNode.replaceChild(newRichItem, oldRichItem);
$(newRichItem).addClass('selected');
ref.updateInText();
this.includeProveItEditSummary();
}
},
/**
* Updates the edit pane when you choose a reference to edit.
* @param {AbstractReference} ref the ref that was chosen.
*/
updateEditPane: function(ref)
{
$('#editrefname').val(ref.name || "");
// Don't contaminate actual object with junk params.
var tempParams = {};
for(var param in ref.params)
{
tempParams[param] = ref.params[param];
}
// Add default params with blank values.
var defaults = ref.getDefaultParams();
for(var i = 0; i < defaults.length; i++)
{
if(!tempParams[defaults[i]])
{
tempParams[defaults[i]] = "";
}
}
var required = ref.getRequiredParams();
var paramNames = new Array();
for(var item in tempParams) //First run through just to get names.
{
paramNames.push(item);
}
var sorter = ref.getSorter();
if(sorter)
{
paramNames.sort(sorter);
}
else
{
paramNames.sort();
}
/* Sort them to provide consistent interface. Uses custom sort order (which is easily tweaked)
where possible.
Javascript does destructive sorting, which in this case, is convenient...
*/
$('#edit-fields').children('.paramlist').children().remove('div:not(.hidden)'); // clear all fields in the edit box (except the hidden ones)
for(var j = 0; j < paramNames.length; j++)
{
this.addPaneRow($("#edit-pane").get(), tempParams, this.getDescriptions(), paramNames[j], required[paramNames[j]], true);
}
var acceptButton = $('#edit-buttons .accept');
var acceptEdit = function()
{
proveit.changeRefFromEditPane(ref, $("#edit-pane").get());
proveit.saveRefFromEdit(ref);
$("#edit-pane").hide();
$("#view-pane").show();
};
// Without setTimeout, scoll reset doesn't work in Firefox.
setTimeout(function()
{
// Reset scroll
$('#edit-fields').scrollTop(0);
}, 0);
acceptButton.unbind('click.proveit').bind('click.proveit', acceptEdit);
},
/**
* Add a row to an editPane or addPane.
* @param {Node} root root element for pane
* @param {Object} params the param object from the reference, or null for added rows.
* @param {Object} descs description object to use, or null for no description
* @param {String} item the current param name
* @param {Boolean} req true if current param name is required, otherwise not required.
* @param {Boolean} fieldType true for label, false for textbox.
*/
addPaneRow: function(root, params, descs, item, req, fieldType)
{
var id = fieldType ? "preloadedparamrow" : "addedparamrow";
var newline = $('#'+id).clone(); // clone the hidden row
$(newline).attr('id',''); // clear the ID (can't have two elements with same ID)
//this.activateRemoveField(newline);
var paramName = $('.paramdesc', newline).eq(0);
var paramValue = $('.paramvalue', newline).eq(0);
$('.paramlist', root).append(newline);
if(req) // if field is required...
{
$(paramName).addClass('required'); // visual indicator that label is required
$('.delete-field', newline).remove(); // don't let people remove required fields
}
else
{
this.activateRemoveField(newline);
}
if(fieldType) // the description/name is a label (not a textbox)
{
paramName.attr("for", this.EDIT_PARAM_PREFIX + item);
paramValue.attr('id',this.EDIT_PARAM_PREFIX + item);
var desc = descs[item];
if(!desc)
{
this.log("Undefined description for param: " + item + ". Using directly as description.");
desc = item;
}
$(paramName).text(desc);
$(paramName).attr('title',item);
$(paramValue).val(params[item]);
$(newline).show();
}
else
{
// added a new row, so make it fancy
$(newline).show('highlight',{},'slow');
$('.inputs', root).scrollTop(100000);
}
},
/*
* these are the current style and insert values to denote which one is
* currently active
*/
/**
* true signifies cite-style references, citation-style otherwise. Used when creating a reference.
* @type Boolean
*/
togglestyle: true,
// TODO: This should be eliminated if only name only inserts are allowed.
/** true signifies full references, name-only otherwise. Used when inserting.
* Note that new references are always inserted in full.
*
* @type Boolean
*/
toggleinsert: false,
/* Cross-Browser Split 1.0.1
(c) Steven Levithan <stevenlevithan.com>; MIT License
http://blog.stevenlevithan.com/archives/cross-browser-split
An ECMA-compliant, uniform cross-browser split method
*/
/**
* Cross-browser implementation of ECMAScript String.prototype.split function.
*
* @param {String} str input string to split
* @param separator separator to split on, as RegExp or String
* @param {Number} limit limit on number of splits. If the parameter is absent, no limit is imposed.
* @return {Array} array resulting from split
*/
split: function (str, separator, limit)
{
// if `separator` is not a regex, use the native `split`
if (Object.prototype.toString.call(separator) !== "[object RegExp]") {
return proveit.split._nativeSplit.call(str, separator, limit);
}
var output = [],
lastLastIndex = 0,
flags = (separator.ignoreCase ? "i" : "") +
(separator.multiline ? "m" : "") +
(separator.sticky ? "y" : ""),
separator = RegExp(separator.source, flags + "g"), // make `global` and avoid `lastIndex` issues by working with a copy
separator2, match, lastIndex, lastLength;
str = str + ""; // type conversion
if (!proveit.split._compliantExecNpcg) {
separator2 = RegExp("^" + separator.source + "$(?!\\s)", flags); // doesn't need /g or /y, but they don't hurt
}
/* behavior for `limit`: if it's...
- `undefined`: no limit.
- `NaN` or zero: return an empty array.
- a positive number: use `Math.floor(limit)`.
- a negative number: no limit.
- other: type-convert, then use the above rules. */
if (limit === undefined || +limit < 0) {
limit = Infinity;
} else {
limit = Math.floor(+limit);
if (!limit) {
return [];
}
}
while (match = separator.exec(str)) {
lastIndex = match.index + match[0].length; // `separator.lastIndex` is not reliable cross-browser
if (lastIndex > lastLastIndex) {
output.push(str.slice(lastLastIndex, match.index));
// fix browsers whose `exec` methods don't consistently return `undefined` for nonparticipating capturing groups
if (!proveit.split._compliantExecNpcg && match.length > 1) {
match[0].replace(separator2, function () {
for (var i = 1; i < arguments.length - 2; i++) {
if (arguments[i] === undefined) {
match[i] = undefined;
}
}
});
}
if (match.length > 1 && match.index < str.length) {
Array.prototype.push.apply(output, match.slice(1));
}
lastLength = match[0].length;
lastLastIndex = lastIndex;
if (output.length >= limit) {
break;
}
}
if (separator.lastIndex === match.index) {
separator.lastIndex++; // avoid an infinite loop
}
}
if (lastLastIndex === str.length) {
if (lastLength || !separator.test("")) {
output.push("");
}
} else {
output.push(str.slice(lastLastIndex));
}
return output.length > limit ? output.slice(0, limit) : output;
},
// TODO: Remove the split code, and just use a regular regex (with two main groups for name and val), iteratively. Regex.find? Make name and val indices match, and rework calling code as needed. Also, check how this was done in the original code.
/**
* Overly clever regex to parse template string (e.g. |last=Smith|first=John|title=My Life Story) into name and value pairs.
*
* names is an array of all names, and values is an array of all values. They have equal lengths.
*
* @param {String} workingString template string to parse.
* @return {Object} object with two properties, names and values.
*/
splitNameVals: function (workingString)
{
var split = {};
// The first component is "ordinary" text (no pipes), while the second is a correctly balanced wikilink, with optional pipe. Any combination of the two can appear.
split.names = proveit.split(workingString.substring(workingString.indexOf("|") + 1), /=(?:[^|]*?(?:\[\[[^|\]]*(?:\|(?:[^|\]]*))?\]\])?)+(?:\||\}\})/);
split.names.length--; // Remove single empty element at end
split.values = proveit.split(workingString.substring(workingString.indexOf("=") + 1, workingString.indexOf("}}")), /\|[^|=]*=/);
return split;
},
/**
* Scan for references in the MWEditBox, and create a reference object and refBoxRow for each.
*/
scanForRefs: function()
{
// these are strings used to allow the correct parsing of the ref
var workingstring;
var cutupstring;
this.clearRefBox();
var textValue = this.getMWEditValue();
// since we should pick the name out before we get to the reference type, here's a variable to hold it
var name;
// key - name
// value -
// object - key - "reference", value - reference obj . Avoids repeating same object in references array.
// key - "strings", value - array of orig strings
var citations = {};
// Array of reference objects. At end of function, addNewElement called on each.
var references = [];
// allRefs should count opening refs, but not ref citation (not <ref name="..."" />)
var allRefs = textValue.match(/<[\s]*ref[^\/>]*>/gi);
// currentScan holds the parsed (match objects) list of references. Regex matches full or name-only reference.
var currentScan = textValue.match(/<[\s]*ref[^>]*>(?:[^<]*<[\s]*\/[\s]*ref[\s]*>)?/gi); // [^<]* doesn't handle embedded HTML tags (or comments) correctly.
// if there are results,
if (currentScan)
{
for (var i = 0; i < currentScan.length; i++)
{
var reference = this.makeRef(currentScan[i]);
if(reference) // Full reference object
{
name = reference.name;
if(!name) // with no name, no possibility of repeat name.
{
references.push(reference);
}
}
else // Not full reference. Possibly citation.
{
var match = currentScan[i].match(this.REF_REGEX);
name = match && (match[1] || match[2] || match[3]);
}
if(name)
{
if(!citations[name])
{
// Create array of original reference strings
citations[name] = {};
if(!citations[name].strings)
{
citations[name].strings = [];
}
}
if(reference && !citations[name].reference) // reference, and not already one for this name
{
citations[name].reference = reference;
references.push(reference);
}
// Add to array
citations[name].strings.push(currentScan[i]);
}
}
}
for(var j = 0; j < references.length; j++)
{
if(references[j].name)
{
var citation = citations[references[j].name];
references[j].setCitationStrings(citation.strings);
}
this.addNewElement(references[j]);
}
},
/**
* Regex for parsing any reference text.
* @type RegExp
*/
REF_REGEX: /<[\s]*ref[\s]*name[\s]*=[\s]*(?:(?:\"(.*?)\")|(?:\'(.*?)\')|(?:(.*?)))[\s]*\/?[\s]*>/,
/**
* Factory function for references. Takes text of a reference, and returns instance of the appropriate class.
* @param {String} refText reference string
* @return {AbstractReference} null if refText isn't a ref, otherwise the reference object
*/
makeRef: function(refText)
{
var isReference = /<[\s]*ref[^>]*>[^<]*\S[^<]*<[\s]*\/[\s]*ref[\s]*>/.test(refText); // Tests for reference (non-citation);
if(!isReference)
{
return null;
}
var citeFunction = refText.match(/{{[\s]*cite/i) ? this.CiteReference : refText.match(/{{[\s]*Citation/i) ? this.CitationReference : this.RawReference;
if(citeFunction != this.RawReference)
{
var workingstring = refText.match(/{{[\s]*(cite|Citation)[\s\S]*?}}/i)[0];
var match = refText.match(this.REF_REGEX);
if(match && match != null)
{
var name = match[1] || match[2] || match[3]; // 3 possibilities, corresponding to above regex, are <ref name="foo">, <ref name='bar'>, and <ref name=baz>
}
var cutupstring = workingstring.split(/\|/g);
// This little hack relies on the fact that 'e' appears first as the last letter of 'cite', and the type is next.
if(citeFunction == this.CiteReference)
{
var beforeBar = cutupstring[0];
var typeStart = beforeBar.toLowerCase().indexOf('e');
// First end curly brace
var rightCurly = beforeBar.indexOf('}');
// Usually, rightCurly will be -1. But this takes into account empty references like <ref>{{cite web}}</ref>
var typeEnd = rightCurly != -1 ? rightCurly : beforeBar.length;
// grab the type, then trim it.
var type = $.trim(beforeBar.substring(typeStart + 1, typeEnd));
}
}
// type may be undefined, but that's okay.
var citation = new citeFunction({"name": name, "type": type, "save": true, "inMWEditBox": true, "orig": refText});
if(citeFunction != this.RawReference)
{
var split = this.splitNameVals(workingstring);
var names = split.names;
var values = split.values;
for (var j = 0; j < names.length; j++)
{
/* Drop blank space, and |'s without params, which are never correct for
citation templates.*/
var paramName = $.trim(names[j]).replace(/(?:\s*\|)*(.*)/, "$1");
var paramVal = $.trim(values[j]);
// Should there be a setParam function? It could handle empty values, and even drop (siliently or otherwise) invalid parameters. Alternatively, should params be passed in the constructor?
if (paramVal != "")
{
citation.params[paramName] = paramVal;
}
}
}
return citation;
},
// TODO: Use https://gerrit.wikimedia.org/r/#/c/67166/ when merged.
/**
* Date-formatting class
*
* @param {String} format one of the format strings supported by MW core.
* Currently, the supported values are 'default', 'mdy', 'dmy', 'ymd', and 'ISO 8601'.
* If an unknown value is passed, it will use wgDefaultDateFormat.
*/
DateFormatter: function (format) {
// 1-indexed (due to filler item at 0), in page content language.
var monthNames = mw.config.get('wgMonthNames');
var supportedFormats = ['mdy', 'dmy', 'ymd', 'ISO 8601'];
if($.inArray(format, supportedFormats) === -1) {
format = mw.config.get('wgDefaultDateFormat');
}
function getMonthName(date) {
return monthNames[date.getMonth() + 1];;
}
this.formatAsMdy = function(date) {
return getMonthName(date) + ' ' + date.getDate() + ', ' + date.getFullYear();
};
this.formatAsDmy = function(date) {
return date.getDate() + ' ' + getMonthName(date) + ' ' + date.getFullYear();
};
this.formatAsYmd = function(date) {
return date.getFullYear() + ' ' + getMonthName(date) + ' ' + date.getDate();
};
this.formatAsISO8601 = function(date) {
return date.getFullYear() + '-' +
(date.getMonth() < 9 ? '0' : '') + (date.getMonth() + 1) + '-' +
(date.getDate() < 10 ? '0' : '') + date.getDate();
};
var formatters =
{
mdy: this.formatAsMdy,
dmy: this.formatAsDmy,
ymd: this.formatAsYmd,
'ISO 8601': this.formatAsISO8601
};
/**
* Formats date according to stored preference
*
* @param {Date} date date to format
*
* @return {String} formatted date as String
*/
this.format = function(date)
{
return formatters[format](date);
};
},
/**
* Root reference type. Parent of RawReference, CiteReference, and CitationReference.
* @class AbstractReference
* @for proveit
* @constructor
* @param {Object} argObj argument object with keys for each option
*/
AbstractReference: function(argObj)
{
// CiteReference has a non-trivial override of this. This is defined early (and conditionally) because it is used in the constructor.
if(!this.setType)
{
/**
* @param {String} type type of reference
*/
this.setType = function(type)
{
this.type = type;
};
}
/**
* Update citation strings after changing reference. This runs after modifying a reference's fields (name, params), but before changing orig
*/
this.update = function()
{
var newCiteText = this.toString();
var strings = this.getCitationStrings();
/*
* Update main citation in strings list.
*
* TODO:
* Use strings array here to find and update citations that are not main references. As is, they are orphaned.
* Both array and textbox should be updated.
* It may be enough to just set all non-main citations in text and array to this.getInsertionText(false).
* However, if they remove the name entirely (not recommended), that would be a problem.
*/
if(strings.length > 0) // This implies there was a name before
{
for(var i = 0; i < strings.length; i++)
{
// If we find the full citation as a citation, update to the new text.
if(strings[i] == this.orig)
{
// this.orig itself is updated in updateInText
strings[i] = newCiteText;
}
}
}
else if(this.name != null) // They have added a name, so we should have a main citation.
{
// Now that it has a name, it is a citation to itself.
strings.push(newCiteText);
}
};
/**
* <ref name /> for reference
* @type String
*/
this.name = argObj.name != "" ? argObj.name : null; // Save blank names as null
/*
type of reference, e.g. cite web, cite news. Also used (including for CitationReference objects) to determine default fields.
*/
this.setType(argObj.type);
//TODO: Re-examine whether both (or indeed either) of save or inMWEditBox are really necessary. Can it be determined from context?
/**
* flag to determine whether citation must be saved. false indicates "dirty" citation that has yet to be updated in text and metadata.
* @type Boolean
*/
this.save = argObj.save;
/**
* true if and only if the ref is in the MW edit box with the same value as this object's orig.
* @type Boolean
*/
this.inMWEditBox = argObj.inMWEditBox;
/**
* original wikitext for reference
* @type String
*/
this.orig = argObj.orig;
/**
* mapping of parameter names to values
* @type Object
*/
this.params = {};
/**
* Convenience method. Returns sorter for parameters.
* @return {Function} sorter for parameters
*/
this.getSorter = function()
{
var thisCite = this; // Make closure work as intended.
// Sorter uses paramSortKey first, then falls back on alphabetical order.
return function(paramA, paramB)
{
var aInd = thisCite.getSortIndex(paramA);
var bInd = thisCite.getSortIndex(paramB);
if(aInd != -1 && bInd != -1)
{
return aInd - bInd;
}
else
{
proveit.log('Parameter missing from getSortIndex, which causes the sort to be invalid. paramA: ', paramA, ', aInd: ', aInd, ', paramB: ', paramB, ', bInd: ', bInd);
if(paramA < paramB)
{
return -1;
}
else if(paramA == paramB)
{
return 0;
}
else
{
return 1;
}
}
};
};
/**
* Returns true if this reference is valid, false otherwise.
* Assume all AbstractReference objects are valid. Can be overridden in subtypes.
* @return {Boolean} AbstractReference.isValid always returns true
*/
this.isValid = function(){return true;};
/**
* Generates label for reference using title, author, etc.
* @return {String} the label that was generated
*/
this.getLabel = function()
{
var label = "";
if (this.params.author)
{
label = this.params.author + "; ";
}
else if (this.params.last)
{
label = this.params.last;
if (this.params.first)
{
label += ", " + this.params.first;
}
label += "; ";
}
if (this.params.title)
{
label += this.params.title;
}
if(label == "")
{
var value;
for (value in this.params)
{
break;
}
if(value) // There could be no parameters
{
label = value;
}
}
return label;
};
/**
* Gets insertion text (for edit box).
*
* TODO: Generate a regex object instead (getInsertionRegExp), so highlighting would not fail due to trivial changes (e.g. spacing).
* @param {Boolean} full If true, insert full text, otherwise ref name only
* @return {String} insertion text
*/
this.getInsertionText = function(full)
{
if(full)
{
return this.toString();
}
else
{
if(this.name)
{
return "<ref name=\""
+ this.name + "\" />";
}
else
{
throw new Error("getInsertionText: ref.name is null");
}
}
};
/**
* Updates this reference in the edit box.
*/
this.updateInText = function()
{
var txtarea = proveit.getMWEditBox();
if (!txtarea || txtarea == null)
return;
txtarea.focus();
var text = proveit.getMWEditValue();
text = text.replace(this.orig, this.toString());
// Do replacement in textarea.
txtarea.value = text;
// Baseline for future modifications
this.orig = this.toString();
this.save = true;
proveit.highlightTargetString(this.toString());
};
/**
* Internal helper method for toString.
* @param {String} template template for ref (currently "cite" or "Citation"
* @param {Boolean} includeType true to include this.type, false otherwise
* @return {String} string for current reference
*/
this.toStringInternal = function(template, includeType)
{
if(this.name)
{
var returnstring = "<ref name=\"" + this.name + "\">";
}
else
{
var returnstring = "<ref>";
}
returnstring += "{{" + template + (includeType ? " " + this.type : "");
for (var name in this.params)
{
returnstring += " | " + name + "=" + this.params[name];
}
returnstring += "}}</ref>";
return returnstring;
};
/**
* Array of citation strings for this reference.
* @type Array
*/
this.citationStrings = [];
/**
* Sets citationStrings to an array
* @param {Array} strings array of citation strings, not null
*/
this.setCitationStrings = function(strings)
{
this.citationStrings = strings;
};
/**
* Gets array of citationStrings.
* @return {Array} (possibly empty) array of citation strings. Will not return null.
*/
this.getCitationStrings = function()
{
return this.citationStrings;
};
/**
* Get icon URL for reference
* @return {String} icon URL
*/
this.getIcon = function()
{
return proveit.STATIC_BASE + "page_white.png";
};
},
/**
* Constructor for CiteReference type.
* @class CiteReference
* @for proveit
* @constructor
* @extends AbstractReference
* @param {Object} argObj the argument object, with keys for each option
*/
CiteReference: function(argObj)
{
/* This is basically a fast representation of the template redirects, along with
* self-mappings.
*/
var typeNameMappings =
{
web: "web",
book: "book",
journal: "journal",
conference: "conference",
encyclopedia: "encyclopedia",
news: "news",
newsgroup: "newsgroup",
paper: "journal",
"press release": "press release",
"pressrelease": "press release",
interview: "interview",
episode: "episode",
"AV media": "AV media",
DVD: "AV media",
audio: "AV media",
"av media": "AV media",
cd: "AV media",
dvd: "AV media",
media: "AV media",
movie: "AV media",
"music video": "AV media",
video: "AV media",
visual: "AV media"
};
// Sets the type (e.g. web for cite web), applying the mappings. This is up top because it is used in AbstractReference constructor.
this.setType = function(rawType)
{
var mappedType = typeNameMappings[rawType];
if(mappedType != null)
this.type = mappedType;
else
this.type = rawType; // Use naive type as fallback.
};
/**
* Returns the type for display purposes, based on description messages. For example, for "AV media" it currently returns "Audiovisual work".
*
* @return {String} type for display
*/
this.getTypeForDisplay = function()
{
return proveit.getDescriptions()[this.type];
};
proveit.AbstractReference.call(this, argObj);
// TODO: Should CiteReference.getSortIndex and CitationReference.getSortIndex be merged into AbstractCitation? Less fine-grained, but simpler to maintain.
/**
* Returns the sort index for a given parameter
* @param {String} param parameter name
* @return {Number} sort index if found, otherwise -1
*/
this.getSortIndex = function(param)
{
// This is the order fields will be displayed or outputted.
return $.inArray(param, [
"url",
"title",
"trans_title",
"encyclopedia",
"publisher",
"work",
"date",
"agency",
"accessdate",
"author",
"last",
"first",
"subject",
"subjectlink",
"inventor",
"editor",
"author2",
"last2",
"first2",
"subject2",
"subjectlink2",
"author3",
"last3",
"first3",
"subject3",
"subjectlink3",
"author4",
"last4",
"first4",
"subject4",
"author5",
"last5",
"first5",
"author6",
"last6",
"first6",
"author7",
"last7",
"first7",
"author8",
"last8",
"first8",
"author9",
"last9",
"first9",
"authorlink",
"coauthors",
"interviewer",
"cointerviewers",
"type",
"newsgroup",
"journal",
"booktitle",
"program",
"episodelink",
"series",
"serieslink",
"credits",
"network",
"station",
"callsign",
"city",
"airdate",
"began",
"ended",
"season",
"seriesno",
"number",
"minutes",
"transcript",
"transcripturl",
"people",
"year",
"month",
"article",
"contribution",
"format",
"medium",
"newspaper",
"conference",
"volume",
"edition",
"issue",
"location",
"pages",
"page",
"language",
"isbn",
"issn",
"oclc",
"doi",
"pmid",
"id",
"archiveurl",
"archivedate",
"deadurl",
"time",
"quote",
"ref"
]);
};
/**
* Returns this reference as a string.
* @return {String} reference as string
*/
this.toString = function()
{
return this.toStringInternal("cite", true);
};
// References without these parameters will be flagged in red.
// True indicates required (null, or undefined, means not required)
var requiredParams =
{
web: { "url": true, "title": true},
book: { "title": true },
journal: { "title": true },
conference: { "title": true },
encyclopedia: { "title": true, "encyclopedia": true },
news: { "title": true, "work": true, "date": true },
newsgroup: { "title": true },
"press release" : { "title": true },
interview: { "last": true }, // TODO: Interview requires last *or* subject. Currently, we can't represent that.
episode: { "title": true },
"AV media": { "title": true }
};
/**
* Return required parameters for this citation type.
* @return {Object} object with required parameters as keys and true as value; empty object for unknown type
*/
this.getRequiredParams = function()
{
var curReq = requiredParams[this.type];
if(curReq)
return curReq;
else
return {}; // Return empty object rather than null to avoid dereferencing null.
};
// These paramaters will be auto-suggested when editing.
var defaultParams =
{
web: [ "url", "title", "author", "accessdate", "work", "publisher", "date", "pages"],
book: [ "title", "author", "authorlink", "year", "isbn", "publisher", "location", "pages", "url" ],
journal: [ "title", "author", "journal", "volume", "issue", "year", "month", "pages", "url", "doi" ],
conference: [ "conference", "title", "booktitle", "author", "editor", "year", "month", "url", "id", "accessdate", "location", "pages", "publisher" ],
encyclopedia: [ "title", "encyclopedia", "author", "editor", "accessdate", "edition", "year",
"publisher", "volume", "location", "pages" ],
news: [ "title", "author", "url", "work", "date", "accessdate", "pages", "location", "agency" ],
newsgroup: [ "title", "author", "date", "newsgroup", "id", "url", "accessdate" ],
"press release" : [ "title", "url", "publisher", "date", "accessdate" ],
interview: ["last", "first", "subjectlink", "interviewer", "title", "callsign", "city", "date", "program", "accessdate"],
episode: ["title", "series", "credits", "airdate", "city", "network", "season"],
"AV media": ["people", "date", "url", "title", "medium", "location", "publisher"]
};
/**
* Returns default parameters (to be suggested when editing) for current reference
* @return {Array} array of default parameter names; empty array if unknown
*/
this.getDefaultParams = function()
{
var curDefault = defaultParams[this.type];
if(curDefault)
return curDefault;
else
return []; // Return empty array rather than null to avoid dereferencing null.
};
this.isValid = function()
{
if(this.type == '')
{
return false;
}
var req = this.getRequiredParams();
var i = 0;
var allFound = true;
for(var reqParam in req)
{
/* Ignore parameters in req object that are null, undefined, or false.
They are not required. */
if(!req[reqParam])
continue;
allFound &= (reqParam in this.params);
if(!allFound)
break;
}
return allFound;
};
var iconMapping =
{
web: "page_white_world.png",
book: "book.png",
journal: "page_white_text.png",
news: "newspaper.png",
newsgroup: "comments.png",
"press release": "transmit_blue.png",
interview: "telephone.png",
episode: "television.png",
"AV media": "film.png"
};
var superGetIcon = this.getIcon;
this.getIcon = function()
{
var icon = iconMapping[this.type];
if(icon)
{
return proveit.STATIC_BASE + icon;
}
return superGetIcon.call(this);
};
},
/**
* A function for citation style refs.
* @class CitationReference
* @for proveit
* @constructor
* @extends AbstractReference
* @param {Object} argObj argument object with keys for each option
*/
CitationReference: function(argObj) {
proveit.AbstractReference.call(this, argObj);
// None currently required;
var requiredParams = {};
// These paramaters will be auto-suggested when editing.
var defaultParams =
{
web: [ "url", "author", "title", "date", "accessdate"],
news: [ "author", "title", "newspaper", "url", "publication-place", "volume", "issue", "date", "pages"],
encyclopedia: ["author", "editor", "contribution", "title", "publisher", "place", "year", "volume", "pages"],
book: ["author", "title", "publisher", "place", "year"],
journal: ["author", "title", "journal", "volume", "issue", "year", "pages"],
patent: ["inventor", "title", "issue-date", "patent-number", "country-code"]
};
/**
* Returns the sort index for a given parameter
* @param {String} param parameter name
* @return {Number} sort index if found, otherwise -1
*/
this.getSortIndex = function(param)
{
// This is the order fields will be displayed or outputted.
return $.inArray(param, [
"last",
"first",
"url",
"author",
"editor",
"contribution",
"author-link",
"last2",
"first2",
"author2-link",
"publication-date",
"inventor",
"title",
"issue-date",
"patent-number",
"country-code",
"journal",
"volume",
"newspaper",
"issue",
"date",
"publisher",
"place",
"year",
"edition",
"publication-place",
"series",
"version",
"pages",
"page",
"id",
"isbn",
"doi",
"oclc",
"accessdate"
]);
};
/**
* Returns this reference as a string.
* @return {String} reference as string
*/
this.toString = function()
{
return this.toStringInternal("Citation", false);
};
/**
* Return required parameters for this citation type.
* @return {Object} object with required parameters as keys and true as value; empty object for unknown type
*/
this.getRequiredParams = function()
{
return requiredParams;
};
/**
* Returns default parameters (to be suggested when editing) for current reference
* @return {Array} array of default parameter names; empty array if unknown
*/
this.getDefaultParams = function()
{
if(this.type)
{
return defaultParams[this.type];
}
else
{
return ["url", "title", "author", "date", "publisher"]; // Can't determine more specific defaults when editing a pre-existing Citation.
}
};
},
/**
* Constructor for RawReference type.
* @class RawReference
* @for proveit
* @constructor
* @extends AbstractReference
* @param {Object} argObj the argument object, with keys for each option
*/
RawReference: function(argObj)
{
proveit.AbstractReference.call(this, argObj);
this.type = 'raw';
/**
* Returns this reference as a string.
* @return {String} reference as string
*/
this.toString = function()
{
return this.orig;
};
this.params['title'] = this.orig;
this.getIcon = function()
{
return proveit.STATIC_BASE + 'raw.png';
};
this.getTypeForDisplay = function()
{
return proveit.getDescriptions()['raw'];
};
},
// TODO: This should be unified with changeRefFromEditPane
/**
* Convert the current contents of the add citation panel to a reference (i.e CiteReference(), CitationReference())
* @for proveit
* @param {Node} box typepane root of add GUI (pane for specific type, e.g. journal)
* @return {AbstractReference} ref or null if no panel exists yet.
*/
getRefFromAddPane: function(box)
{
var $box = $(box);
var type = $box.data('proveitRefType');
// get <ref> name
var refName = $('#addrefname').val();
var citeFunc = this.togglestyle ? this.CiteReference : this.CitationReference;
var ref = new citeFunc({"name": refName, "type": type});
var paramName, paramVal;
var paramList = $(".paramlist", box)[0];
var paramRows = $('div', paramList);
for (var i = 0; i < paramRows.length; i++)
{
var paramRow = paramRows[i];
var valueTextbox = $(".paramvalue", paramRow)[0];
if($(paramRow).hasClass("addedrow")) // Added with "Add another field"
{
paramName = $.trim($(".paramdesc", paramRow)[0].value);
}
else
{
paramName = valueTextbox.id.substring(this.NEW_PARAM_PREFIX.length);
}
paramVal = $.trim(valueTextbox.value);
if(paramName != "" && paramVal != "")
{ // Non-blank
ref.params[paramName] = paramVal;
}
}
ref.update();
return ref;
},
/**
* Called from the add citation panel, this is the function used to
* add the actual citation.
*
* @param {AbstractReference} ref reference being added
*/
addReference: function(ref) {
// get this working, lots of typing here.
this.addNewElement(ref);
ref.orig = ref.toString();
/*
* Cycle through the boxes and grab the id's versus the values, watch
* for the final box and make sure to grab the type as well
*/
this.insertRefIntoMWEditBox(ref, true); // true means insert full text here, regardless of global toggle.
ref.save = true;
ref.inMWEditBox = true;
},
/**
* Clear all rows of passed in add citation panes.
* @param {Node} citePanes raw DOM element
*/
clearCitePanes: function(citePanes)
{
if(citePanes.hasChildNodes())
{
citePanes.removeChild(citePanes.firstChild);
}
},
/**
* Add event handler to Delete Field button in Add/Edit Reference panes
* @param {Node} fieldRow the fieldRow DOM element to remove
*/
activateRemoveField: function(fieldRow)
{
$('.delete-field', fieldRow).click(function()
{
$(fieldRow).hide(
'highlight',{},'slow',
function() {
$(fieldRow).remove();
}
);
});
},
/**
* Changes the panel for the add reference panel to the correct type of entry
* @param {Node} menu Raw HTML menu element
*/
changeAddPane: function(menu) {
// Reset scroll
$('#add-fields').scrollTop(0);
$(menu.parentNode).show(); // cite/citation vbox.
var citePanes = $(".addpanes", menu.parentNode.parentNode).get(0);
this.clearCitePanes(citePanes);
var newRefType = menu.value;
var genPane = document.getElementById("dummyCitePane").cloneNode(true);
var $genPane = $(genPane).attr('id', '');
$genPane.data('proveitRefType', newRefType);
// name the ref-name-row
$('.ref-name-row', $genPane).children('input').attr('id','addrefname');
$('.ref-name-row', $genPane).children('label').attr('for','addrefname');
// Somewhat hackish. What's a better way?
var newRef;
if(menu.id == "citemenu")
{
newRef = new this.CiteReference({});
}
else
{
newRef = new this.CitationReference({});
}
newRef.type = newRefType;
var descs = this.getDescriptions();
var defaultParams = newRef.getDefaultParams().slice(0); // copy
defaultParams.sort(newRef.getSorter());
//var required = newRef.getRequiredParams();
// Possibly, Cite objects should automatically include default parameters in their param maps. That would seem to make this simpler.
for(var i = 0; i < defaultParams.length; i++)
{
newRef.params[defaultParams[i]] = "";
}
// Should there be a getParamKeys or similar function for this, or even getSortedParamKeys?
var newParams = [];
for(param in newRef.params)
{
newParams.push(param);
}
newParams.sort(newRef.getSorter());
var required = newRef.getRequiredParams();
var paramList = $(".paramlist", $genPane)[0];
for(var i = 0; i < newParams.length; i++)
{
var param = newParams[i];
var paramBox;
if(descs[param])
{
paramBox = document.getElementById("preloadedparamrow").cloneNode(true);
var label = $('.paramdesc', paramBox);
if(required[param])
{
label.addClass("required");
$('.delete-field', paramBox).remove(); // don't let people remove required fields
}
else
{
this.activateRemoveField(paramBox);
}
label.text(descs[param]);
// Basically the same code as nameHbox above
label.attr("for", this.NEW_PARAM_PREFIX + param);
if(param == 'accessdate')
$('.paramvalue', paramBox).val(this.dateFormatter.format(new Date));
}
else
{
// Throwing an error here doesn't make sense if user-added fields can be copied over.
// throw new Error("Undefined description for param: " + param);
paramBox = document.getElementById("addedparamrow").cloneNode(true);
var nameTextbox = $(".paramdesc", paramBox)[0];
nameTextbox.setAttribute("value", param);
}
paramBox.id = "";
this.activateRemoveField(paramBox);
$(".paramvalue", paramBox)[0].id = this.NEW_PARAM_PREFIX + param;
//paramBox.childNodes[2].value = newRef.params[param]; // Causes parameters to disappear. Why?
$(paramBox).show();
paramList.appendChild(paramBox);
}
$genPane.show();
$(citePanes).prepend($genPane);
},
/**
* Create ProveIt HTML GUI
*/
createGUI: function()
{
if(this.getGUI().length > 0)
{
// GUI already created
return false;
}
// more JqueryUI CSS: http://blog.jqueryui.com/2009/06/jquery-ui-172/
var gui = $('<div/>', {id: this.GUI_ID});
var tabs = $('<div/>', {id: 'tabs'});
var created = $('<h1/>');
var createdLink = $('<a/>', {title: 'Created by the ELC Lab at Georgia Tech',
href: 'http://proveit.cc.gatech.edu',
target: '_blank'});
// Main logo in upper-right
var logo = $('<img/>', {src: this.STATIC_BASE + 'logo.png', alt: 'ProveIt', height: 30, width: 118 });
createdLink.append(logo);
created.append(createdLink);
// Minimize/maximize button
var showHideButton = $('<button/>', {text: 'show/hide'});
created.append(showHideButton);
tabs.append(created);
var header = $('<ul/>');
var view = $('<li/>');
// View tab link
var viewLink = $('<a/>', {id: 'view-link', "class": 'tab-link', href: '#view-tab'});
viewLink.append('References (');
var numRefs = $('<span/>', {id: 'numRefs'}).
append('0');
viewLink.append(numRefs).
append(')');
view.append(viewLink);
header.append(view);
var add = $('<li/>');
// Add tab link
var addLink = $('<a/>', {id: 'add-link', "class": 'tab-link', href: '#add-tab'}).
append('Add a Reference');
add.append(addLink);
header.append(add);
tabs.append(header);
// View tab
var viewTab = $('<div/>', {id: 'view-tab', css: {display: 'none'}});
// View pane used for displaying references; within view tab
var viewPane = $('<div/>', {id: 'view-pane'});
var viewScroll = $('<div/>', {"class": 'scroll',
style: 'height: 210px;'});
// Ref list root element
var refTable = $('<table/>', {id: 'refs'});
var dummyRef = $('<tr/>', {id: 'dummyRef',
style: 'display: none;'});
dummyRef.append($('<td/>', {"class": 'number'})).
append($('<td/>', {"class": 'type'})).
append($('<td/>', {"class": 'title'}));
//append($('<td/>', {"class": 'details'}));
var editTd = $('<td/>', {"class": 'edit'}).
append($('<button/>', {text: 'edit'}));
dummyRef.append(editTd);
refTable.append(dummyRef);
viewScroll.append(refTable);
viewPane.append(viewScroll);
viewTab.append(viewPane);
// div#edit-pane, within view tab
var editPane = $('<div/>', {id: 'edit-pane', style: 'display: none'});
// div#edit-fields
var editFields = $('<div/>', {id: 'edit-fields',
"class": 'inputs scroll',
style: 'height: 170px',
tabindex: -1});
// div.ref-name-row
var refNameRow = $('<div/>', {"class": 'ref-name-row',
tabindex: -1});
var refLabel = $('<label/>', {'for': 'editrefname',
title: 'This is a unique identifier that can be used to refer to this reference elsewhere on the page.',
"class": 'paramdesc'}).
append('<ref> name');
refNameRow.append(refLabel);
refNameRow.append($('<input/>', {id: 'editrefname',
"class": 'paramvalue',
tabindex: 0}));
// div.paramlist
var paramList = $('<div/>', {"class": 'paramlist'});
editFields.append(refNameRow);
editFields.append(paramList);
editPane.append(editFields);
// div#edit-buttons, part of edit pane
var editButtons = $('<div/>', {id: 'edit-buttons'});
var addFieldButton = $('<button/>', {style: 'margin-right: 50px;'}).
append('add field');
editButtons.append(addFieldButton);
var reqSpan = $('<span/>', {"class": 'required',
text: 'bold'});
editButtons.append(reqSpan).
append(' = required field');
var saveButton = $('<button/>', {"class": 'right-side accept',
text: 'update edit form'});
editButtons.append(saveButton);
var cancelButton = $('<button/>', {"class": 'right-side cancel',
text: 'cancel'});
editButtons.append(cancelButton);
editPane.append(editButtons);
viewTab.append(editPane);
tabs.append(viewTab);
// dumy cite pane
var dummyCite = $('<div/>', {id: 'dummyCitePane',
"class": 'typepane',
style: 'display: none'});
var addRefNameRow = refNameRow.clone();
//$('input', addRefNameRow).attr('id', 'addrefname');
//$('label', addRefNameRow).attr('for', 'addrefname');
dummyCite.append(addRefNameRow);
dummyCite.append($('<div/>', {"class": 'paramlist'}));
tabs.append(dummyCite);
var preloadedparam = $('<div/>', {id: 'preloadedparamrow',
"class": 'preloadedrow input-row',
style: 'display: none'}).
append($('<label/>', {"class": 'paramdesc'}));
var paramvalue = $('<input/>', {"class": 'paramvalue',
tabindex: 0});
preloadedparam.append(paramvalue);
var deleteButton = $('<button/>', {"class": 'delete-field',
tabindex: -1}).
append('delete field');
preloadedparam.append(deleteButton);
tabs.append(preloadedparam);
var addedparam = $('<div/>', {id: 'addedparamrow',
"class": 'addedrow input-row',
style: 'display: none'}).
append($('<input/>', {"class": 'paramdesc',
tabindex: 0})).
append(paramvalue.clone()).
append(deleteButton.clone());
tabs.append(addedparam);
// Add tab
var addTab = $('<div/>', {id: 'add-tab', css: {display: 'none'}});
var addFields = $('<div/>', {id: 'add-fields',
"class": 'inputs scroll',
style: 'height: 170px',
tabindex: -1});
var cite = $('<div/>', {style: 'display: none',
id: 'cite',
"class": 'input-row'});
var refCiteTypeLabel = $('<label/>', {'for': 'citemenu',
"class": 'paramdesc required',
text: 'Reference type'});
cite.append(refCiteTypeLabel);
var citemenu = $('<select/>', {id: 'citemenu',
change: function()
{
proveit.changeAddPane(citemenu.get(0));
}});
var citeTypes = this.CiteReference.getTypes();
var descs = this.getDescriptions();
for(var i = 0; i < citeTypes.length; i++)
{
citemenu.append($('<option/>', {value: citeTypes[i],
text: descs[citeTypes[i]]}));
}
cite.append(citemenu);
addFields.append(cite);
addFields.append($('<div/>', {"class": 'addpanes',
id: 'citepanes',
tabindex: -1}));
var citation = $('<div/>', {style: 'display: none',
id: 'citation',
"class": 'input-row'});
var refCitationTypeLabel = refCiteTypeLabel.clone().attr('for', 'citationmenu');
citation.append(refCitationTypeLabel);
var citationmenu = $('<select/>', {id: 'citemenu',
change: function()
{
proveit.changeAddPane(citationmenu.get(0));
}});
var citationTypes = ['web', 'book', 'journal', 'encyclopedia', 'news', 'patent'];
for(var j = 0; j < citationTypes.length; j++)
{
citationmenu.append($('<option/>', {value: citationTypes[i],
text: descs[citationTypes[i]]}));
}
citation.append(citationmenu);
addFields.append(citation).
append($('<div/>', {"class": 'addpanes',
id: 'citationpanes', style: 'display: none;'}));
addTab.append(addFields);
// Add buttons, part of add tab
var addButtons = $('<div/>', {id: 'add-buttons'});
addButtons.append($('<button/>', {style: 'margin-right: 50px;',
text: 'add field'})).
append(reqSpan.clone()).
append(" = required").
append(saveButton.clone().text('insert into edit form')).
append(cancelButton.clone());
addTab.append(addButtons);
tabs.append(addTab);
gui.append(tabs);
$(document.body).prepend(gui);
var cancelEdit = function() {
$("#edit-pane").hide();
$("#view-pane").show();
};
// set up tabs
$("#tabs").tabs({
selected: 0,
show: function(event,ui)
{
switch(ui.index)
{
case 0: // view
//$('tr.selected').focus();
break;
case 1: // add
cancelEdit();
proveit.changeAddPane(document.getElementById(proveit.togglestyle ? 'citemenu' : 'citationmenu'));
break;
// case 1: // edit
// proveit.updateEditPane();
// $('tr.selected').dblclick();
//break;
default:
// nothing
}
}
});
// handle clicking on tabs
$(viewLink).click(function(){
if($(viewTab).is(":hidden"))
proveit.toggleViewAddVisibility();
else
cancelEdit(); // Edit and view are the same tab, so we handle this specially.
});
$(addLink).click(function(){
if($(addTab).is(":hidden"))
proveit.toggleViewAddVisibility();
});
// add panel buttons
$("#add-buttons button:first").button({
icons: {
primary: 'ui-icon-circle-plus'
}
}).click(function()
{
proveit.addPaneRow(document.getElementById("add-tab"));
})
.next().next().button({
icons: {
primary: 'ui-icon-circle-check',
secondary: 'ui-icon-circle-arrow-e'
}
}).click(function()
{
proveit.addReference(proveit.getRefFromAddPane($('#add-tab .typepane').get(0)));
$("#tabs").tabs( { selected: '#view-tab' } );
$("div.scroll, #view-pane").scrollTop(100000); // scroll to new ref
}).next().
button({
icons: {
primary: 'ui-icon-circle-close'
}
}).click(function()
{
$("#tabs").tabs( { selected: '#view-tab' } );
});
// cancel buttons
$("button.cancel").click(cancelEdit);
// edit panel buttons
$("#edit-buttons button:first").button({
icons: {
primary: 'ui-icon-circle-plus'
}
}).click(function()
{
proveit.addPaneRow($("#edit-pane"));
}).
next().next().
button({
icons: {
primary: 'ui-icon-circle-check'
}
}).next().button({
icons: {
primary: 'ui-icon-circle-close'
}
});
// delete field button
$(".delete-field").button({
icons: {
primary: 'ui-icon-close'
},
text: false
});
// create the minimize button
showHideButton.button({
icons: {
primary: 'ui-icon-triangle-1-n'
},
text: false
});
var viewAndAdd = $("#view-tab, #add-tab");
this.viewAndAddPanes = viewAndAdd;
function minimize()
{
viewAndAdd.hide();
showHideButton.button("option", "icons", { primary: 'ui-icon-triangle-1-n' } );
}
function maximize()
{
viewAndAdd.show();
showHideButton.button("option", "icons", { primary: 'ui-icon-triangle-1-s' } );
}
// set up the minimize button
showHideButton.toggle(
maximize,
minimize
);
this.toggleViewAddVisibility = function()
{
showHideButton.click();
};
this.scanForRefs();
$("#refs tr").eq(0).click().click(); // select first item in list. TODO: Why two .click?
// alternate row colors
$("#refs tr:even").addClass('light');
$("#refs tr:odd").addClass('dark');
},
/**
* A reference to the set containing two items, the view and add tabs. Will be initialized by createGUI, so it is non-null if ProveIt is visible
*
* @type {$NodeSet}
*/
viewAndAddPanes: null,
/*
* Gets jQuery set for ProveIt GUI, which will be empty if ProveIt has not initialized
*
* @return {$Node} root of ProveIt
*/
getGUI: function()
{
return $('#' + this.GUI_ID);
},
/**
* Hides ProveIt completely
*/
hide: function()
{
this.getGUI().hide();
},
/**
* Show ProveIt
*/
show: function()
{
this.createGUI();
this.getGUI().show();
},
/**
* Toggle overall visiblility. If currently hidden, go to minimized. If minimized, maximize. If maximize, hide
*/
toggleVisibility: function()
{
if(this.getGUI().is(':visible'))
{
if(this.viewAndAddPanes.is(':visible')) // maximized
{
this.hide();
}
/*
* If previously maximized, we minimize after hiding, so when we show, it will already be minimized.
* If minimized, we maximize
*/
this.toggleViewAddVisibility();
}
else
{
this.show();
}
},
/**
* Toggle visibility of view and add panes. Initialized by createGUI
*
* @method toggleViewAddVisibility
*/
toggleViewAddVisibility: null,
/**
* Generates refbox row and all children, to be used by addNewElement, and when updating
*
* @param {AbstractReference} ref reference to generate from
* @param {Boolean} isReplacement if true, this replaces another refbox item, so no number will be assigned, and the count will not be updated.
* @return {Node} new refbox row for refbox
*/
makeRefBoxRow: function(ref, isReplacement)
{
var refName = ref.name; //may be null or blank
//var refbox = this.getRefBox();
var newchild = $('<tr><td class="number"></td><td class="type"></td><td class="title"></td><td class="edit"></td></tr>').get(0);
// removed <span class="pointers"></span>
// removed <td class="details"></td>
if(!ref.isValid())
{
// Flag as invalid.
$(newchild).addClass('invalid');
}
// grab the nodes that need changed out of it
var neweditimage = $('.edit button', newchild).get(0);
var thisproveit = this;
var title = '';
var shortTitle = '';
if(ref.params['title'] != null)
{
title = ref.params['title'];
shortTitle = this.truncateTitle(title);
}
$('td.title', newchild).text(shortTitle);
$('td.title', newchild).attr('title', title);
// deal with variations of date info
var formattedYear = '';
if(ref.params['year'])
formattedYear = ref.params['year'];
else if (ref.params['date'])
{
var yearMatch = ref.params['date'].match(/^([12]\d{3})/);
if(yearMatch)
{
formattedYear = yearMatch[1];
}
}
//$('td.year', newchild).text(formattedYear);
// deal with variations of author info
var formattedAuthor = '';
if(ref.params['author'])
formattedAuthor = ref.params['author'];
else if (ref.params['last'])
{
// if(ref.params['first'])
// formattedAuthor = ref.params['last'] + ', ' + ref.params['first'];
// else
formattedAuthor = ref.params['last'];
}
if(ref.params['coauthors'] || ref.params['last2'])
formattedAuthor += ' <i>et al.</i>';
// build the "details" cell based on presence of author/year data
// var details = '';
// if (formattedYear != '' && formattedAuthor != '')
// details = '(' + formattedAuthor + ', ' + formattedYear + ')';
// else if (formattedYear != '')
// details = '(' + formattedYear + ')';
// else if (formattedAuthor != '')
// details = '(' + formattedAuthor + ')';
// $('td.details', newchild).html(details);
// generate a URL based on ref type
var icon = ref.getIcon(), url = '', refType = ref.type;
switch(refType)
{
case 'web':
url = ref.params['url'];
break;
case 'book':
if(ref.params['isbn'] != null)
url = wgServer + '/w/index.php?title=Special%3ABookSources&isbn=' + ref.params['isbn'];
break;
case 'journal':
case 'conference':
if(ref.params['doi'] != null)
url = 'http://dx.doi.org/' + ref.params['doi'];
break;
case 'news':
url = ref.params['url'];
break;
case 'episode':
url = 'http://www.imdb.com/find?s=ep&q=' + escape(ref.params['title']);
break;
}
$('td.type', newchild).css('background-image','url('+icon+')');
var authorByline = '', yearByline = '', refTypeByline = '';
if(formattedAuthor != '')
authorByline = 'By: <span class="author">' + formattedAuthor + '</span>';
if(formattedYear != '')
yearByline = 'Date: <span class="date">' + formattedYear + '</span>';
if(refType != null)
{
var displayType = ref.getTypeForDisplay(), formattedRefType = displayType;
$('td.type', newchild).attr('title', displayType);
if(url != '')
formattedRefType = '<a href="' + url + '" target="_blank">' + formattedRefType + '</a>';
refTypeByline = 'Type: <span class="type">' + formattedRefType + '</span>';
}
//alert("authorByline: " + authorByline + "\n yearByline: " + yearByline + "\n refTypeByline: " + refTypeByline);
var byline = '', separator = ' | ';
if(refType == 'raw')
{
byline = refTypeByline + separator + mw.html.escape(ref.toString());
}
else if(authorByline != '') // a??
{
if(yearByline != '') // ad?
{
if(refTypeByline != '') // adt
byline = authorByline + separator + yearByline + separator + refTypeByline;
else // ad-
byline = authorByline + separator + yearByline;
}
else // a-?
{
if(refTypeByline != '') // a-t
byline = authorByline + separator + refTypeByline;
else // a--
byline = authorByline;
}
}
else // -??
{
if(yearByline != '') // -d?
{
if(refTypeByline != '') // -dt
byline = yearByline + separator + refTypeByline;
else // -d-
byline = yearByline;
}
else // --?
{
if(refTypeByline != '') // --t
byline = refTypeByline;
// no need for ---
}
}
byline = '<p>' + byline + '</p>';
//alert(byline);
// create expanded <div>
var expanded = $('<div />',{
"class": 'expanded'
});
// append the infobar to the expanded info box
$(expanded).append(byline);
// append the expanded info box to the title <td>
$('td.title', newchild).append(expanded);
if(!isReplacement)
{
// get ref number by counting number of refs (this includes dummy ref, but not the one we're creating)
var numRefs = $('#refs tr').length;
$('td.number', newchild).text(numRefs);
$('#numRefs').text(numRefs); // update the number of refs in the view tab
}
// event handler for selecting a ref)
$(newchild).click(function() {
thisproveit.highlightTargetString(ref.orig);
//thisproveit.highlightTargetString(ref.orig);
$("#refs tr").removeClass('selected');
$(newchild).addClass('selected');
});
var doEdit = function() {
thisproveit.updateEditPane(ref);
$("#view-pane").hide();
$("#edit-pane").show();
};
var citationStrings = ref.getCitationStrings();
//var pointers = $('.pointers', newchild);
var allCitations = $('<span class="all-citations" />');
for(var i = 0; i < citationStrings.length; i++)
{
var dividend = i + 1;
var colName = "";
while(dividend > 0)
{
var mod = --dividend % 26;
colName = String.fromCharCode(97 + mod) + colName; // a = 97
dividend = Math.floor(dividend / 26);
}
var citationHolder = $('<a href="#">' + colName + '</a>');
// Bind i
var clickFunc = (function(i)
{
return function()
{
var last = 0, j = 0;
var text = proveit.getMWEditValue();
for(j = 0; j < i; j++)
{
last = text.indexOf(citationStrings[j], last);
// Shouldn't happen. Indicates citation strings are out of date.
if(last == -1)
{
proveit.log("citationStrings[" + j + "]: " + citationStrings[j] + " not found. Returning.");
return false;
}
last += citationStrings[j].length;
}
var startInd = text.indexOf(citationStrings[i], last);
if(startInd == -1)
{
proveit.log("citationStrings[" + i + "]: " + citationStrings[i] + " not found.");
}
else
{
proveit.highlightLengthAtIndex(startInd, citationStrings[i].length);
}
return false;
};
})(i);
citationHolder.click(clickFunc);
allCitations.append(citationHolder);
}
if(citationStrings.length > 1)
{
var newP = $('<p />');
newP.append('This reference is cited in the article <span class="num-citations">' + citationStrings.length + ' times</span>: ').append(allCitations);
expanded.append(newP);
}
// edit buttons
if(ref.type != 'raw')
{
// SMALL EDIT BUTTON
// create button
var smallEditBtn = $('<button />',{
text: 'edit'
});
// transform button
$(smallEditBtn).button({
icons: {
primary: 'ui-icon-pencil'
},
text: false
});
// button click event handler
smallEditBtn.click(doEdit);
// append button
$('.edit', newchild).append(smallEditBtn);
// LARGE EDIT BUTTON
// create button
var editBtn = $('<button />',{
"class": 'edit',
text: 'edit this reference'
});
// transform button
$(editBtn).button({
icons: {
primary: 'ui-icon-pencil'
},
text: true
});
// button click event handler
editBtn.click(doEdit);
// append button
expanded.append(editBtn);
// ROW EVENT HANDLER
$(newchild).dblclick(doEdit);
}
else
{
// needed to keep all rows the same height
$('.edit', newchild).append(' ');
}
// ibid button
if(citationStrings.length > 0)
{
// create button
var ibidBtn = $('<button />',{
"class": 'insert',
text: 'insert this reference at cursor'
});
// transform button
$(ibidBtn).button({
icons: {
primary: 'ui-icon-arrowthick-1-e'
},
text: true
});
// button click event handler
ibidBtn.click(function(){
thisproveit.insertRefIntoMWEditBox(ref, false);
return false;
});
// append button
expanded.append(ibidBtn);
}
return newchild;
},
/**
* Truncates title to fit ProveIt refbox row.
* @param {String} title title to truncate
* @return {String} truncated title
*/
truncateTitle: function(title)
{
var MAX_LENGTH = 86;
var truncated = title;
if(title.length > MAX_LENGTH)
{
truncated = truncated.substring(0, MAX_LENGTH);
var lastSpacePos = truncated.lastIndexOf(' ');
if(lastSpacePos != -1)
{
truncated = truncated.substr(0, lastSpacePos);
truncated += " ...";
}
}
return truncated;
},
/**
* Only to be used internally to add the citations to the list
*
* @param {AbstractReference} ref the reference to add
*/
addNewElement: function(ref)
{
var refbox = this.getRefBox();
$(refbox).append(this.makeRefBoxRow(ref, false));
}
}, window.proveit);
/**
* Static method. Returns valid Cite reference types
* @for CiteReference
* @static
* @return {Array} array of cite method types
*/
proveit.CiteReference.getTypes = function()
{
return ["web", "book", "journal", "conference", "encyclopedia", "news", "newsgroup", "press release", "interview", "episode", "AV media"];
};
proveit.split._compliantExecNpcg = /()??/.exec("")[1] === undefined; // NPCG: nonparticipating capturing group
proveit.split._nativeSplit = String.prototype.split;
proveit.setup();
}( mediaWiki, jQuery ) );
// Local Variables:
// js2-basic-offset: 8
// End:
9ca5eeb59e53123532e9c90b0ffdd36a5c97d9bf
MediaWiki:Gadget-ReferenceTooltips
8
88
227
226
2014-01-16T23:42:30Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
[[mw:Reference Tooltips|Podgląd przypisów (Reference Tooltips)]]: wyświetla tekst przypisu w dymku po najechaniu myszką na odnośnik, dzięki czemu nie trzeba się odrywać od treści artykułu.
7780fa807df198ba38568569a06f17f38c8f2630
226
2012-09-01T09:28:01Z
Matma Rex
0
przenosiny gadżetu z enwiki
wikitext
text/x-wiki
[[mw:Reference Tooltips|Podgląd przypisów (Reference Tooltips)]]: wyświetla tekst przypisu w dymku po najechaniu myszką na odnośnik, dzięki czemu nie trzeba się odrywać od treści artykułu.
7780fa807df198ba38568569a06f17f38c8f2630
MediaWiki:Gadget-ReferenceTooltips.css
8
90
231
230
2014-01-16T23:42:30Z
Ffkapa
2
1 wersja
css
text/css
/* See [[mw:Reference Tooltips]] */
/* kopia z https://en.wikipedia.org/wiki/MediaWiki:Gadget-ReferenceTooltips.css?oldid=502693597 */
.referencetooltip {
position: absolute;
list-style: none;
list-style-image: none;
opacity: 0;
font-size: 10px;
margin: 0;
z-index: 5;
padding: 0;
}
.referencetooltip li {
border: #080086 2px solid;
max-width: 260px;
padding: 10px 8px 13px 8px;
margin: 0px;
background-color: #F7F7F7;
box-shadow: 2px 4px 2px rgba(0,0,0,0.3);
-moz-box-shadow: 2px 4px 2px rgba(0,0,0,0.3);
-webkit-box-shadow: 2px 4px 2px rgba(0,0,0,0.3);
}
.referencetooltip li+li {
margin-left: 7px;
margin-top: -2px;
border: 0;
padding: 0;
height: 3px;
width: 0px;
background-color: transparent;
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
border-top: 12px #080086 solid;
border-right: 7px transparent solid;
border-left: 7px transparent solid;
}
.referencetooltip>li+li::after {
content: '';
border-top: 8px #F7F7F7 solid;
border-right: 5px transparent solid;
border-left: 5px transparent solid;
margin-top: -12px;
margin-left: -5px;
z-index: 1;
height: 0px;
width: 0px;
display: block;
}
.client-js .referencetooltip li ul li {
border: none;
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
height: auto;
width: auto;
margin: auto;
padding: 0;
position: static;
}
.RTflipped {
padding-top: 13px;
}
.referencetooltip.RTflipped li+li {
position: absolute;
top: 2px;
border-top: 0;
border-bottom: 12px #080086 solid;
}
.referencetooltip.RTflipped li+li::after {
border-top: 0;
border-bottom: 8px #F7F7F7 solid;
position: absolute;
margin-top: 7px;
}
.RTsettings{
float: right;
height: 16px;
width: 16px;
cursor: pointer;
background-image: url(//upload.wikimedia.org/wikipedia/commons/e/ed/Cog.png);
margin-top: -9px;
margin-right: -7px;
-webkit-transition: opacity 0.15s;
-moz-transition: opacity 0.15s;
-o-transition: opacity 0.15s;
-ms-transition: opacity 0.15s;
transition: opacity 0.15s;
opacity: 0.6;
filter: alpha(opacity=60);
}
.RTsettings:hover{
opacity: 1;
filter: alpha(opacity=100);
}
d3ad3e1d55b5157303e023131d138cb4ea523854
230
2012-09-01T09:22:35Z
Matma Rex
0
przenosiny gadżetu z enwiki
css
text/css
/* See [[mw:Reference Tooltips]] */
/* kopia z https://en.wikipedia.org/wiki/MediaWiki:Gadget-ReferenceTooltips.css?oldid=502693597 */
.referencetooltip {
position: absolute;
list-style: none;
list-style-image: none;
opacity: 0;
font-size: 10px;
margin: 0;
z-index: 5;
padding: 0;
}
.referencetooltip li {
border: #080086 2px solid;
max-width: 260px;
padding: 10px 8px 13px 8px;
margin: 0px;
background-color: #F7F7F7;
box-shadow: 2px 4px 2px rgba(0,0,0,0.3);
-moz-box-shadow: 2px 4px 2px rgba(0,0,0,0.3);
-webkit-box-shadow: 2px 4px 2px rgba(0,0,0,0.3);
}
.referencetooltip li+li {
margin-left: 7px;
margin-top: -2px;
border: 0;
padding: 0;
height: 3px;
width: 0px;
background-color: transparent;
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
border-top: 12px #080086 solid;
border-right: 7px transparent solid;
border-left: 7px transparent solid;
}
.referencetooltip>li+li::after {
content: '';
border-top: 8px #F7F7F7 solid;
border-right: 5px transparent solid;
border-left: 5px transparent solid;
margin-top: -12px;
margin-left: -5px;
z-index: 1;
height: 0px;
width: 0px;
display: block;
}
.client-js .referencetooltip li ul li {
border: none;
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
height: auto;
width: auto;
margin: auto;
padding: 0;
position: static;
}
.RTflipped {
padding-top: 13px;
}
.referencetooltip.RTflipped li+li {
position: absolute;
top: 2px;
border-top: 0;
border-bottom: 12px #080086 solid;
}
.referencetooltip.RTflipped li+li::after {
border-top: 0;
border-bottom: 8px #F7F7F7 solid;
position: absolute;
margin-top: 7px;
}
.RTsettings{
float: right;
height: 16px;
width: 16px;
cursor: pointer;
background-image: url(//upload.wikimedia.org/wikipedia/commons/e/ed/Cog.png);
margin-top: -9px;
margin-right: -7px;
-webkit-transition: opacity 0.15s;
-moz-transition: opacity 0.15s;
-o-transition: opacity 0.15s;
-ms-transition: opacity 0.15s;
transition: opacity 0.15s;
opacity: 0.6;
filter: alpha(opacity=60);
}
.RTsettings:hover{
opacity: 1;
filter: alpha(opacity=100);
}
d3ad3e1d55b5157303e023131d138cb4ea523854
MediaWiki:Gadget-ReferenceTooltips.js
8
89
229
228
2014-01-16T23:42:30Z
Ffkapa
2
1 wersja
javascript
text/javascript
// See [[mw:Reference Tooltips]]
// kopia z https://en.wikipedia.org/wiki/MediaWiki:Gadget-ReferenceTooltips.js?oldid=508635914
// tłumaczenie: [[User:Vinne2]]
window.pg || $(document).ready( function($) {
// Make sure we are in article, project, or help namespace
// if ( wgCanonicalNamespace === '' || wgCanonicalNamespace === 'Project' || wgCanonicalNamespace === 'Help' ) {
// Enable in all namespaces for pl.wikipedia per verious discussions
if ( true ) {
function toggleRT(o){
mw.loader.using("jquery.cookie",function(){
$.cookie("RTsettings",o+"|"+ settings[1] + "|" + settings[2], {path:"/",expires:90});
location.reload();
})
}
var settings = document.cookie.split("RTsettings=")[1];
settings = settings ? settings.split(";")[0].split("%7C") : [1, 200, +("ontouchstart" in document.documentElement)];
if( settings[0] == 0 ) {
var footer = $("#footer-places, #f-list");
if( footer.length === 0 ) {
footer = $("#footer li").parent();
}
footer.append($("<li>").append($("<a>").text("Włącz podgląd przypisów").attr("href","javascript:(function(){})()").click(function(){toggleRT(1)})));
return;
}
var isTouchscreen = +settings[2],
timerLength = isTouchscreen ? 0 : +settings[1],
settingsMenu;
$(".reference").each( function() {
var tooltipNode, hideTimer, showTimer, checkFlip = false;
function findRef( h ){
h = h.firstChild.getAttribute("href"); h = h && h.split("#"); h = h && h[1];
h = h && document.getElementById( h );
h = h && h.nodeName == "LI" && h;
return h;
}
function hide( refLink ){
if( tooltipNode && tooltipNode.parentNode == document.body ) {
hideTimer = setTimeout( function() {
$(tooltipNode).animate({opacity: 0}, 100, function(){ document.body.removeChild( tooltipNode ) })
}, isTouchscreen ? 16 : 100)
} else {
var h = findRef( refLink );
h && (h.style.border = "");
}
}
function show(){
if( !tooltipNode.parentNode || tooltipNode.parentNode.nodeType === 11 ){
document.body.appendChild( tooltipNode );
checkFlip = true;
}
$(tooltipNode).stop().animate({opacity: 1}, 100)
clearTimeout( hideTimer );
}
function openSettingsMenu(){
if( settingsMenu ) {
settingsMenu.dialog( "open" );
} else {
settingsMenu = $("<form>").append(
$("<button>").css("width","100%").text("Wyłącz tymczasowo podgląd przypisów").button().click(function(){toggleRT(0)}),
$("<br>"),
$("<small>").text("Po wyłączeniu można włączyć podgląd przypisów ponownie, klikając w link na dole strony."),
$("<hr>"),
$("<label>").text("Opóźnienie/czas, po którym pojawi się dymek (w milisekundach): ").append($("<input>").attr({"type":"number","value":settings[1],step:50,min:0,max:5000})),
$("<br>"),
$("<span>").text("Dymek aktywowany jest przez:"),
$("<label>").append(
$("<input>").attr({"type":"radio", "name":"RTActivate", "checked":settings[2]==0&&"checked", "disabled":"ontouchstart" in document.documentElement&&"disabled"}),
"wskazanie"
),
$("<label>").append(
$("<input>").attr({"type":"radio", "name":"RTActivate", "checked":settings[2]==1&&"checked"}),
"kliknięcie"
)
).submit(function(e){e.preventDefault()}).dialog({modal:true,width:500,title:"Ustawienia podglądu przypisów",buttons:{"Zapisz ustawienia":function(){
var a = this.getElementsByTagName("input"),
b = +a[0].value;
$.cookie("RTsettings","1|"+ (b > -1 && b < 5001 ? b : settings[1]) + (a[1].checked ? "|0" : "|1"), {path:"/",expires:90});
location.reload();
}}});
}
}
$(this)[ isTouchscreen ? 'click' : 'hover' ](function( e ){
var _this = this;
if( isTouchscreen ) {
e.preventDefault();
(tooltipNode && tooltipNode.parentNode == document.body) || setTimeout( function(){
$( document.body ).on("click touchstart", function( e ) {
e = e || event;
e = e.target || e.srcElement;
for( ; e && !$( e ).hasClass( "referencetooltip" ) ; )
e = e.parentNode;
if( !e ){
clearTimeout( showTimer );
hide( _this );
$(document.body).off("click touchstart", arguments.callee)
}
})
}, 0);
}
showTimer && clearTimeout( showTimer );
showTimer = setTimeout( function() {
var h = findRef( _this );
if( !h ){return};
if( !isTouchscreen && ( window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 ) + $(window).height() > $( h ).offset().top + h.offsetHeight ) {
h.style.border = "#080086 2px solid";
return;
}
if(!tooltipNode){
tooltipNode = document.createElement("ul");
tooltipNode.className = "referencetooltip";
var c = tooltipNode.appendChild( h.cloneNode( true ) );
try {
if( c.firstChild.nodeName != "A" ) {
while( c.childNodes[1].nodeName == "A" && c.childNodes[1].getAttribute( "href" ).indexOf("#cite_ref-") !== -1 ) {
do { c.removeChild( c.childNodes[1] ) } while ( c.childNodes[1].nodeValue == " " );
}
}
} catch (e) { mw.log(e) }
c.removeChild( c.firstChild );
$( tooltipNode.firstChild.insertBefore( document.createElement( "span" ), tooltipNode.firstChild.firstChild ) ).addClass("RTsettings").attr("title", "Ustawienia podglądu przypisów").click(function(){
mw.loader.using(["jquery.cookie","jquery.ui.dialog"], openSettingsMenu);
})
tooltipNode.appendChild( document.createElement( "li" ) );
isTouchscreen || $(tooltipNode).hover(show, hide);
}
show();
var o = $(_this).offset(), oH = tooltipNode.offsetHeight;
$(tooltipNode).css({top: o.top - oH, left: o.left - 7 });
if( tooltipNode.offsetHeight > oH ) { // is it squished against the right side of the page?
$(tooltipNode).css({left:'auto',right:0});
tooltipNode.lastChild.style.marginLeft = (o.left - tooltipNode.offsetLeft) + "px";
}
if( checkFlip ) {
if( o.top < tooltipNode.offsetHeight + ( window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 ) ) { // is part of it above the top of the screen?
$(tooltipNode).addClass("RTflipped").css({top: o.top + 12});
} else if( tooltipNode.className === "referencetooltip RTflipped" ) { // cancel previous
$(tooltipNode).removeClass("RTflipped");
}
checkFlip = false;
}
}, timerLength);
}, isTouchscreen ? undefined : function(){clearTimeout(showTimer); hide(this); } )
} );
}
} );
627b47ddb88e640c85ead19e3e360f4409efe83e
228
2012-11-28T14:43:33Z
Matma Rex
0
we wszystkich przestrzeniach
javascript
text/javascript
// See [[mw:Reference Tooltips]]
// kopia z https://en.wikipedia.org/wiki/MediaWiki:Gadget-ReferenceTooltips.js?oldid=508635914
// tłumaczenie: [[User:Vinne2]]
window.pg || $(document).ready( function($) {
// Make sure we are in article, project, or help namespace
// if ( wgCanonicalNamespace === '' || wgCanonicalNamespace === 'Project' || wgCanonicalNamespace === 'Help' ) {
// Enable in all namespaces for pl.wikipedia per verious discussions
if ( true ) {
function toggleRT(o){
mw.loader.using("jquery.cookie",function(){
$.cookie("RTsettings",o+"|"+ settings[1] + "|" + settings[2], {path:"/",expires:90});
location.reload();
})
}
var settings = document.cookie.split("RTsettings=")[1];
settings = settings ? settings.split(";")[0].split("%7C") : [1, 200, +("ontouchstart" in document.documentElement)];
if( settings[0] == 0 ) {
var footer = $("#footer-places, #f-list");
if( footer.length === 0 ) {
footer = $("#footer li").parent();
}
footer.append($("<li>").append($("<a>").text("Włącz podgląd przypisów").attr("href","javascript:(function(){})()").click(function(){toggleRT(1)})));
return;
}
var isTouchscreen = +settings[2],
timerLength = isTouchscreen ? 0 : +settings[1],
settingsMenu;
$(".reference").each( function() {
var tooltipNode, hideTimer, showTimer, checkFlip = false;
function findRef( h ){
h = h.firstChild.getAttribute("href"); h = h && h.split("#"); h = h && h[1];
h = h && document.getElementById( h );
h = h && h.nodeName == "LI" && h;
return h;
}
function hide( refLink ){
if( tooltipNode && tooltipNode.parentNode == document.body ) {
hideTimer = setTimeout( function() {
$(tooltipNode).animate({opacity: 0}, 100, function(){ document.body.removeChild( tooltipNode ) })
}, isTouchscreen ? 16 : 100)
} else {
var h = findRef( refLink );
h && (h.style.border = "");
}
}
function show(){
if( !tooltipNode.parentNode || tooltipNode.parentNode.nodeType === 11 ){
document.body.appendChild( tooltipNode );
checkFlip = true;
}
$(tooltipNode).stop().animate({opacity: 1}, 100)
clearTimeout( hideTimer );
}
function openSettingsMenu(){
if( settingsMenu ) {
settingsMenu.dialog( "open" );
} else {
settingsMenu = $("<form>").append(
$("<button>").css("width","100%").text("Wyłącz tymczasowo podgląd przypisów").button().click(function(){toggleRT(0)}),
$("<br>"),
$("<small>").text("Po wyłączeniu można włączyć podgląd przypisów ponownie, klikając w link na dole strony."),
$("<hr>"),
$("<label>").text("Opóźnienie/czas, po którym pojawi się dymek (w milisekundach): ").append($("<input>").attr({"type":"number","value":settings[1],step:50,min:0,max:5000})),
$("<br>"),
$("<span>").text("Dymek aktywowany jest przez:"),
$("<label>").append(
$("<input>").attr({"type":"radio", "name":"RTActivate", "checked":settings[2]==0&&"checked", "disabled":"ontouchstart" in document.documentElement&&"disabled"}),
"wskazanie"
),
$("<label>").append(
$("<input>").attr({"type":"radio", "name":"RTActivate", "checked":settings[2]==1&&"checked"}),
"kliknięcie"
)
).submit(function(e){e.preventDefault()}).dialog({modal:true,width:500,title:"Ustawienia podglądu przypisów",buttons:{"Zapisz ustawienia":function(){
var a = this.getElementsByTagName("input"),
b = +a[0].value;
$.cookie("RTsettings","1|"+ (b > -1 && b < 5001 ? b : settings[1]) + (a[1].checked ? "|0" : "|1"), {path:"/",expires:90});
location.reload();
}}});
}
}
$(this)[ isTouchscreen ? 'click' : 'hover' ](function( e ){
var _this = this;
if( isTouchscreen ) {
e.preventDefault();
(tooltipNode && tooltipNode.parentNode == document.body) || setTimeout( function(){
$( document.body ).on("click touchstart", function( e ) {
e = e || event;
e = e.target || e.srcElement;
for( ; e && !$( e ).hasClass( "referencetooltip" ) ; )
e = e.parentNode;
if( !e ){
clearTimeout( showTimer );
hide( _this );
$(document.body).off("click touchstart", arguments.callee)
}
})
}, 0);
}
showTimer && clearTimeout( showTimer );
showTimer = setTimeout( function() {
var h = findRef( _this );
if( !h ){return};
if( !isTouchscreen && ( window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 ) + $(window).height() > $( h ).offset().top + h.offsetHeight ) {
h.style.border = "#080086 2px solid";
return;
}
if(!tooltipNode){
tooltipNode = document.createElement("ul");
tooltipNode.className = "referencetooltip";
var c = tooltipNode.appendChild( h.cloneNode( true ) );
try {
if( c.firstChild.nodeName != "A" ) {
while( c.childNodes[1].nodeName == "A" && c.childNodes[1].getAttribute( "href" ).indexOf("#cite_ref-") !== -1 ) {
do { c.removeChild( c.childNodes[1] ) } while ( c.childNodes[1].nodeValue == " " );
}
}
} catch (e) { mw.log(e) }
c.removeChild( c.firstChild );
$( tooltipNode.firstChild.insertBefore( document.createElement( "span" ), tooltipNode.firstChild.firstChild ) ).addClass("RTsettings").attr("title", "Ustawienia podglądu przypisów").click(function(){
mw.loader.using(["jquery.cookie","jquery.ui.dialog"], openSettingsMenu);
})
tooltipNode.appendChild( document.createElement( "li" ) );
isTouchscreen || $(tooltipNode).hover(show, hide);
}
show();
var o = $(_this).offset(), oH = tooltipNode.offsetHeight;
$(tooltipNode).css({top: o.top - oH, left: o.left - 7 });
if( tooltipNode.offsetHeight > oH ) { // is it squished against the right side of the page?
$(tooltipNode).css({left:'auto',right:0});
tooltipNode.lastChild.style.marginLeft = (o.left - tooltipNode.offsetLeft) + "px";
}
if( checkFlip ) {
if( o.top < tooltipNode.offsetHeight + ( window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 ) ) { // is part of it above the top of the screen?
$(tooltipNode).addClass("RTflipped").css({top: o.top + 12});
} else if( tooltipNode.className === "referencetooltip RTflipped" ) { // cancel previous
$(tooltipNode).removeClass("RTflipped");
}
checkFlip = false;
}
}, timerLength);
}, isTouchscreen ? undefined : function(){clearTimeout(showTimer); hide(this); } )
} );
}
} );
627b47ddb88e640c85ead19e3e360f4409efe83e
MediaWiki:Gadget-Twinkle
8
114
298
297
2014-01-17T00:43:56Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
[[Wikipedia:Twinkle|Twinkle]], a set of tools that automates common tasks such as reporting vandalism, warning vandals, requesting deletion, welcoming users, and tagging articles. ([[Wikipedia:Twinkle/Preferences|Preferences panel]])
a4c7f58ff1fc706fdb86ed5c80b241f66a092b8b
297
2013-12-19T17:30:55Z
John Reaves
0
add preferences link
wikitext
text/x-wiki
[[Wikipedia:Twinkle|Twinkle]], a set of tools that automates common tasks such as reporting vandalism, warning vandals, requesting deletion, welcoming users, and tagging articles. ([[Wikipedia:Twinkle/Preferences|Preferences panel]])
a4c7f58ff1fc706fdb86ed5c80b241f66a092b8b
MediaWiki:Gadget-Twinkle.js
8
117
304
303
2014-01-17T00:43:56Z
Ffkapa
2
1 wersja
javascript
text/javascript
/**
* +-------------------------------------------------------------------------+
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes at [[WT:TW]] before editing. |
* +-------------------------------------------------------------------------+
*
* Imported from github [https://github.com/azatoth/twinkle].
* All changes should be made in the repository, otherwise they will be lost.
*
* To update this script from github, you must have a local repository set up. Then
* follow the instructions at [https://github.com/azatoth/twinkle/blob/master/README.md].
*
* ----------
*
* This is AzaToth's Twinkle, the popular script sidekick for newbies, admins, and
* every Wikipedian in between. Visit [[WP:TW]] for more information.
*/
//<nowiki>
( function ( window, document, $, undefined ) { // Wrap with anonymous function
var Twinkle = {};
window.Twinkle = Twinkle; // allow global access
// Check if account is experienced enough to use Twinkle
Twinkle.userAuthorized = Morebits.userIsInGroup( "autoconfirmed" ) || Morebits.userIsInGroup( "confirmed" );
// for use by custom modules (normally empty)
Twinkle.initCallbacks = [];
Twinkle.addInitCallback = function twinkleAddInitCallback( func ) {
Twinkle.initCallbacks.push( func );
};
Twinkle.defaultConfig = {};
/**
* Twinkle.defaultConfig.twinkle and Twinkle.defaultConfig.friendly
*
* This holds the default set of preferences used by Twinkle. (The |friendly| object holds preferences stored in the FriendlyConfig object.)
* It is important that all new preferences added here, especially admin-only ones, are also added to
* |Twinkle.config.sections| in twinkleconfig.js, so they are configurable via the Twinkle preferences panel.
* For help on the actual preferences, see the comments in twinkleconfig.js.
*/
Twinkle.defaultConfig.twinkle = {
// General
summaryAd: " ([[WP:TW|TW]])",
deletionSummaryAd: " ([[WP:TW|TW]])",
protectionSummaryAd: " ([[WP:TW|TW]])",
userTalkPageMode: "window",
dialogLargeFont: false,
// ARV
spiWatchReport: "yes",
// Fluff (revert and rollback)
openTalkPage: [ "agf", "norm", "vand" ],
openTalkPageOnAutoRevert: false,
markRevertedPagesAsMinor: [ "vand" ],
watchRevertedPages: [ "agf", "norm", "vand", "torev" ],
offerReasonOnNormalRevert: true,
confirmOnFluff: false,
showRollbackLinks: [ "diff", "others" ],
// DI (twinkleimage)
notifyUserOnDeli: true,
deliWatchPage: "default",
deliWatchUser: "default",
// PROD
watchProdPages: true,
prodReasonDefault: "",
logProdPages: false,
prodLogPageName: "PROD log",
// CSD
speedySelectionStyle: "buttonClick",
watchSpeedyPages: [ "g3", "g5", "g10", "g11", "g12" ],
markSpeedyPagesAsPatrolled: true,
// these next two should probably be identical by default
notifyUserOnSpeedyDeletionNomination: [ "db", "g1", "g2", "g3", "g4", "g6", "g10", "g11", "g12", "g13", "a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11", "f1", "f2", "f3", "f7", "f9", "f10", "u3", "t2", "t3", "p1", "p2" ],
welcomeUserOnSpeedyDeletionNotification: [ "db", "g1", "g2", "g3", "g4", "g6", "g10", "g11", "g12", "g13", "a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11", "f1", "f2", "f3", "f7", "f9", "f10", "u3", "t2", "t3", "p1", "p2" ],
promptForSpeedyDeletionSummary: [ "db", "g1", "g2", "g3", "g4", "g6", "g7", "g8", "g10", "g11", "g12", "a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11", "f2", "f4", "f7", "f8", "f10", "t2", "t3", "p1", "p2" ],
openUserTalkPageOnSpeedyDelete: [ "db", "g1", "g2", "g3", "g4", "g5", "g10", "g11", "g12", "a1", "a3", "a7", "a9", "a10", "a11", "f3", "f7", "f9", "u3", "t2", "p1" ],
deleteTalkPageOnDelete: false,
deleteRedirectsOnDelete: true,
deleteSysopDefaultToTag: false,
speedyWindowHeight: 500,
speedyWindowWidth: 800,
logSpeedyNominations: false,
speedyLogPageName: "CSD log",
noLogOnSpeedyNomination: [ "u1" ],
// Unlink
unlinkNamespaces: [ "0", "100" ],
// Warn
defaultWarningGroup: "1",
showSharedIPNotice: true,
watchWarnings: true,
blankTalkpageOnIndefBlock: false,
customWarningList: [],
// XfD
xfdWatchDiscussion: "default",
xfdWatchList: "no",
xfdWatchPage: "default",
xfdWatchUser: "default",
// Hidden preferences
revertMaxRevisions: 50,
batchdeleteChunks: 50,
batchDeleteMinCutOff: 5,
batchMax: 5000,
batchProtectChunks: 50,
batchProtectMinCutOff: 5,
batchundeleteChunks: 50,
batchUndeleteMinCutOff: 5,
deliChunks: 500,
deliMax: 5000,
proddeleteChunks: 50
};
// now some skin dependent config.
if ( mw.config.get( "skin" ) === "vector" ) {
Twinkle.defaultConfig.twinkle.portletArea = "right-navigation";
Twinkle.defaultConfig.twinkle.portletId = "p-twinkle";
Twinkle.defaultConfig.twinkle.portletName = "TW";
Twinkle.defaultConfig.twinkle.portletType = "menu";
Twinkle.defaultConfig.twinkle.portletNext = "p-search";
} else {
Twinkle.defaultConfig.twinkle.portletArea = null;
Twinkle.defaultConfig.twinkle.portletId = "p-cactions";
Twinkle.defaultConfig.twinkle.portletName = null;
Twinkle.defaultConfig.twinkle.portletType = null;
Twinkle.defaultConfig.twinkle.portletNext = null;
}
Twinkle.defaultConfig.friendly = {
// Tag
groupByDefault: true,
watchTaggedPages: true,
watchMergeDiscussions: true,
markTaggedPagesAsMinor: false,
markTaggedPagesAsPatrolled: true,
tagArticleSortOrder: "cat",
customTagList: [],
// Welcome
topWelcomes: false,
watchWelcomes: true,
welcomeHeading: "Welcome",
insertHeadings: true,
insertUsername: true,
insertSignature: true, // sign welcome templates, where appropriate
quickWelcomeMode: "norm",
quickWelcomeTemplate: "welcome",
customWelcomeList: [],
customWelcomeSignature: true,
// Talkback
markTalkbackAsMinor: true,
insertTalkbackSignature: true, // always sign talkback templates
talkbackHeading: "Talkback",
adminNoticeHeading: "Notice",
mailHeading: "You've got mail!",
// Shared
markSharedIPAsMinor: true
};
Twinkle.getPref = function twinkleGetPref( name ) {
var result;
if ( typeof Twinkle.prefs === "object" && typeof Twinkle.prefs.twinkle === "object" ) {
// look in Twinkle.prefs (twinkleoptions.js)
result = Twinkle.prefs.twinkle[name];
} else if ( typeof window.TwinkleConfig === "object" ) {
// look in TwinkleConfig
result = window.TwinkleConfig[name];
}
if ( result === undefined ) {
return Twinkle.defaultConfig.twinkle[name];
}
return result;
};
Twinkle.getFriendlyPref = function twinkleGetFriendlyPref(name) {
var result;
if ( typeof Twinkle.prefs === "object" && typeof Twinkle.prefs.friendly === "object" ) {
// look in Twinkle.prefs (twinkleoptions.js)
result = Twinkle.prefs.friendly[ name ];
} else if ( typeof window.FriendlyConfig === "object" ) {
// look in FriendlyConfig
result = window.FriendlyConfig[ name ];
}
if ( result === undefined ) {
return Twinkle.defaultConfig.friendly[ name ];
}
return result;
};
/**
* **************** Twinkle.addPortlet() ****************
*
* Adds a portlet menu to one of the navigation areas on the page.
* This is necessarily quite a hack since skins, navigation areas, and
* portlet menu types all work slightly different.
*
* Available navigation areas depend on the skin used.
* Monobook:
* "column-one", outer div class "portlet", inner div class "pBody". Existing portlets: "p-cactions", "p-personal", "p-logo", "p-navigation", "p-search", "p-interaction", "p-tb", "p-coll-print_export"
* Special layout of p-cactions and p-personal through specialized styles.
* Vector:
* "mw-panel", outer div class "portal", inner div class "body". Existing portlets/elements: "p-logo", "p-navigation", "p-interaction", "p-tb", "p-coll-print_export"
* "left-navigation", outer div class "vectorTabs" or "vectorMenu", inner div class "" or "menu". Existing portlets: "p-namespaces", "p-variants" (menu)
* "right-navigation", outer div class "vectorTabs" or "vectorMenu", inner div class "" or "menu". Existing portlets: "p-views", "p-cactions" (menu), "p-search"
* Special layout of p-personal portlet (part of "head") through specialized styles.
* Modern:
* "mw_contentwrapper" (top nav), outer div class "portlet", inner div class "pBody". Existing portlets or elements: "p-cactions", "mw_content"
* "mw_portlets" (sidebar), outer div class "portlet", inner div class "pBody". Existing portlets: "p-navigation", "p-search", "p-interaction", "p-tb", "p-coll-print_export"
*
* @param String navigation -- id of the target navigation area (skin dependant, on vector either of "left-navigation", "right-navigation", or "mw-panel")
* @param String id -- id of the portlet menu to create, preferably start with "p-".
* @param String text -- name of the portlet menu to create. Visibility depends on the class used.
* @param String type -- type of portlet. Currently only used for the vector non-sidebar portlets, pass "menu" to make this portlet a drop down menu.
* @param Node nextnodeid -- the id of the node before which the new item should be added, should be another item in the same list, or undefined to place it at the end.
*
* @return Node -- the DOM node of the new item (a DIV element) or null
*/
Twinkle.addPortlet = function( navigation, id, text, type, nextnodeid )
{
//sanity checks, and get required DOM nodes
var root = document.getElementById( navigation );
if ( !root ) {
return null;
}
var item = document.getElementById( id );
if ( item ) {
if ( item.parentNode && item.parentNode === root ) {
return item;
}
return null;
}
var nextnode;
if ( nextnodeid ) {
nextnode = document.getElementById(nextnodeid);
}
//verify/normalize input
type = ( skin === "vector" && type === "menu" && ( navigation === "left-navigation" || navigation === "right-navigation" )) ? "menu" : "";
var outerDivClass;
var innerDivClass;
switch ( skin )
{
case "vector":
if ( navigation !== "portal" && navigation !== "left-navigation" && navigation !== "right-navigation" ) {
navigation = "mw-panel";
}
outerDivClass = ( navigation === "mw-panel" ) ? "portal" : ( type === "menu" ? "vectorMenu extraMenu" : "vectorTabs extraMenu" );
innerDivClass = ( navigation === "mw-panel" ) ? "body" : ( type === "menu" ? "menu" : "" );
break;
case "modern":
if ( navigation !== "mw_portlets" && navigation !== "mw_contentwrapper" ) {
navigation = "mw_portlets";
}
outerDivClass = "portlet";
innerDivClass = "pBody";
break;
default:
navigation = "column-one";
outerDivClass = "portlet";
innerDivClass = "pBody";
break;
}
// Build the DOM elements.
var outerDiv = document.createElement( "div" );
outerDiv.className = outerDivClass + " emptyPortlet";
outerDiv.id = id;
if ( type === "menu" ) {
// Fix drop-down arrow image in Vector skin
outerDiv.style.backgroundImage = 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAQCAMAAAAlM38UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA9QTFRFsbGxmpqa3d3deXl58/n79CzHcQAAAAV0Uk5T/////wD7tg5TAAAAMklEQVR42mJgwQoYBkqYiZEZAhiZUFRDxWGicEPA4nBRhNlAcYQokpVMDEwD6kuAAAMAyGMFQVv5ldcAAAAASUVORK5CYII=")';
outerDiv.style.backgroundPosition = "right 60%";
}
if ( nextnode && nextnode.parentNode === root ) {
root.insertBefore( outerDiv, nextnode );
} else {
root.appendChild( outerDiv );
}
var h5 = document.createElement( "h3" );
if ( type === "menu" ) {
var span = document.createElement( "span" );
span.appendChild( document.createTextNode( text ) );
h5.appendChild( span );
var a = document.createElement( "a" );
a.href = "#";
$( a ).click(function ( e ) {
e.preventDefault();
if ( !Twinkle.userAuthorized ) {
alert("Sorry, your account is too new to use Twinkle.");
}
});
span = document.createElement( "span" );
span.appendChild( document.createTextNode( text ) );
a.appendChild( span );
h5.appendChild( a );
} else {
h5.appendChild( document.createTextNode( text ) );
}
outerDiv.appendChild( h5 );
var innerDiv = document.createElement( "div" ); // Not strictly necessary with type vectorTabs, or other skins.
innerDiv.className = innerDivClass;
outerDiv.appendChild(innerDiv);
var ul = document.createElement( "ul" );
innerDiv.appendChild( ul );
return outerDiv;
};
/**
* **************** Twinkle.addPortletLink() ****************
* Builds a portlet menu if it doesn't exist yet, and add the portlet link.
* @param task: Either a URL for the portlet link or a function to execute.
*/
Twinkle.addPortletLink = function( task, text, id, tooltip )
{
if ( Twinkle.getPref("portletArea") !== null ) {
Twinkle.addPortlet( Twinkle.getPref( "portletArea" ), Twinkle.getPref( "portletId" ), Twinkle.getPref( "portletName" ), Twinkle.getPref( "portletType" ), Twinkle.getPref( "portletNext" ));
}
var link = mw.util.addPortletLink( Twinkle.getPref( "portletId" ), typeof task === "string" ? task : "#", text, id, tooltip );
if ( $.isFunction( task ) ) {
$( link ).click(function ( ev ) {
task();
ev.preventDefault();
});
}
return link;
};
/**
* **************** General initialization code ****************
*/
var scriptpathbefore = mw.util.wikiScript( "index" ) + "?title=",
scriptpathafter = "&action=raw&ctype=text/javascript&happy=yes";
// Retrieve the user's Twinkle preferences
$.ajax({
url: scriptpathbefore + "User:" + encodeURIComponent( mw.config.get("wgUserName")) + "/twinkleoptions.js" + scriptpathafter,
dataType: "text"
})
.fail(function () { mw.util.jsMessage( "Could not load twinkleoptions.js" ); })
.done(function ( optionsText ) {
// Quick pass if user has no options
if ( optionsText === "" ) {
return;
}
// Twinkle options are basically a JSON object with some comments. Strip those:
optionsText = optionsText.replace( /(?:^(?:\/\/[^\n]*\n)*\n*|(?:\/\/[^\n]*(?:\n|$))*$)/g, "" );
// First version of options had some boilerplate code to make it eval-able -- strip that too. This part may become obsolete down the line.
if ( optionsText.lastIndexOf( "window.Twinkle.prefs = ", 0 ) === 0 ) {
optionsText = optionsText.replace( /(?:^window.Twinkle.prefs = |;\n*$)/g, "" );
}
try {
var options = $.parseJSON( optionsText );
// Assuming that our options evolve, we will want to transform older versions:
//if ( options.optionsVersion === undefined ) {
// ...
// options.optionsVersion = 1;
//}
//if ( options.optionsVersion === 1 ) {
// ...
// options.optionsVersion = 2;
//}
// At the same time, twinkleconfig.js needs to be adapted to write a higher version number into the options.
if ( options ) {
Twinkle.prefs = options;
}
}
catch ( e ) {
mw.util.jsMessage("Could not parse twinkleoptions.js");
}
})
.always(function () {
$( Twinkle.load );
});
// Developers: you can import custom Twinkle modules here
// For example, mw.loader.load(scriptpathbefore + "User:UncleDouggie/morebits-test.js" + scriptpathafter);
Twinkle.load = function () {
// Don't activate on special pages other than "Contributions" so that they load faster, especially the watchlist.
var isSpecialPage = ( mw.config.get('wgNamespaceNumber') === -1
&& mw.config.get('wgCanonicalSpecialPageName') !== "Contributions"
&& mw.config.get('wgCanonicalSpecialPageName') !== "Prefixindex" ),
// Also, Twinkle is incompatible with Internet Explorer versions 8 or lower, so don't load there either.
isOldIE = ( $.client.profile().name === 'msie' && $.client.profile().versionNumber < 9 );
// Prevent users that are not autoconfirmed from loading Twinkle as well.
if ( isSpecialPage || isOldIE || !Twinkle.userAuthorized ) {
return;
}
// Load the modules in the order that the tabs should appears
// User/user talk-related
Twinkle.arv();
Twinkle.warn();
Twinkle.welcome();
Twinkle.shared();
Twinkle.talkback();
// Deletion
Twinkle.speedy();
Twinkle.prod();
Twinkle.xfd();
Twinkle.image();
// Maintenance
Twinkle.protect();
Twinkle.tag();
// Misc. ones last
Twinkle.diff();
Twinkle.unlink();
Twinkle.config.init();
Twinkle.fluff.init();
if ( Morebits.userIsInGroup('sysop') ) {
Twinkle.delimages();
Twinkle.deprod();
Twinkle.batchdelete();
Twinkle.batchprotect();
Twinkle.batchundelete();
}
// Run the initialization callbacks for any custom modules
$( Twinkle.initCallbacks ).each(function ( k, v ) { v(); });
Twinkle.addInitCallback = function ( func ) { func(); };
// Increases text size in Twinkle dialogs, if so configured
if ( Twinkle.getPref( "dialogLargeFont" ) ) {
mw.util.addCSS( ".morebits-dialog-content, .morebits-dialog-footerlinks { font-size: 100% !important; } " +
".morebits-dialog input, .morebits-dialog select, .morebits-dialog-content button { font-size: inherit !important; }" );
}
};
} ( window, document, jQuery )); // End wrap with anonymous function
// </nowiki>
87327316ca8ba8a5f186c87eec65cc0bfd85266c
303
2013-12-15T12:25:06Z
Amalthea
0
v2.0-662-g5d477ae: protect: Adjust weightings per comment at [[WT:TW]]; protect: Improve protection weighting logic; ffd: Make NFCR more palatable in article space; Remove unused pref speedyPromptOnG7; morebits: Add style attribute
javascript
text/javascript
/**
* +-------------------------------------------------------------------------+
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes at [[WT:TW]] before editing. |
* +-------------------------------------------------------------------------+
*
* Imported from github [https://github.com/azatoth/twinkle].
* All changes should be made in the repository, otherwise they will be lost.
*
* To update this script from github, you must have a local repository set up. Then
* follow the instructions at [https://github.com/azatoth/twinkle/blob/master/README.md].
*
* ----------
*
* This is AzaToth's Twinkle, the popular script sidekick for newbies, admins, and
* every Wikipedian in between. Visit [[WP:TW]] for more information.
*/
//<nowiki>
( function ( window, document, $, undefined ) { // Wrap with anonymous function
var Twinkle = {};
window.Twinkle = Twinkle; // allow global access
// Check if account is experienced enough to use Twinkle
Twinkle.userAuthorized = Morebits.userIsInGroup( "autoconfirmed" ) || Morebits.userIsInGroup( "confirmed" );
// for use by custom modules (normally empty)
Twinkle.initCallbacks = [];
Twinkle.addInitCallback = function twinkleAddInitCallback( func ) {
Twinkle.initCallbacks.push( func );
};
Twinkle.defaultConfig = {};
/**
* Twinkle.defaultConfig.twinkle and Twinkle.defaultConfig.friendly
*
* This holds the default set of preferences used by Twinkle. (The |friendly| object holds preferences stored in the FriendlyConfig object.)
* It is important that all new preferences added here, especially admin-only ones, are also added to
* |Twinkle.config.sections| in twinkleconfig.js, so they are configurable via the Twinkle preferences panel.
* For help on the actual preferences, see the comments in twinkleconfig.js.
*/
Twinkle.defaultConfig.twinkle = {
// General
summaryAd: " ([[WP:TW|TW]])",
deletionSummaryAd: " ([[WP:TW|TW]])",
protectionSummaryAd: " ([[WP:TW|TW]])",
userTalkPageMode: "window",
dialogLargeFont: false,
// ARV
spiWatchReport: "yes",
// Fluff (revert and rollback)
openTalkPage: [ "agf", "norm", "vand" ],
openTalkPageOnAutoRevert: false,
markRevertedPagesAsMinor: [ "vand" ],
watchRevertedPages: [ "agf", "norm", "vand", "torev" ],
offerReasonOnNormalRevert: true,
confirmOnFluff: false,
showRollbackLinks: [ "diff", "others" ],
// DI (twinkleimage)
notifyUserOnDeli: true,
deliWatchPage: "default",
deliWatchUser: "default",
// PROD
watchProdPages: true,
prodReasonDefault: "",
logProdPages: false,
prodLogPageName: "PROD log",
// CSD
speedySelectionStyle: "buttonClick",
watchSpeedyPages: [ "g3", "g5", "g10", "g11", "g12" ],
markSpeedyPagesAsPatrolled: true,
// these next two should probably be identical by default
notifyUserOnSpeedyDeletionNomination: [ "db", "g1", "g2", "g3", "g4", "g6", "g10", "g11", "g12", "g13", "a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11", "f1", "f2", "f3", "f7", "f9", "f10", "u3", "t2", "t3", "p1", "p2" ],
welcomeUserOnSpeedyDeletionNotification: [ "db", "g1", "g2", "g3", "g4", "g6", "g10", "g11", "g12", "g13", "a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11", "f1", "f2", "f3", "f7", "f9", "f10", "u3", "t2", "t3", "p1", "p2" ],
promptForSpeedyDeletionSummary: [ "db", "g1", "g2", "g3", "g4", "g6", "g7", "g8", "g10", "g11", "g12", "a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11", "f2", "f4", "f7", "f8", "f10", "t2", "t3", "p1", "p2" ],
openUserTalkPageOnSpeedyDelete: [ "db", "g1", "g2", "g3", "g4", "g5", "g10", "g11", "g12", "a1", "a3", "a7", "a9", "a10", "a11", "f3", "f7", "f9", "u3", "t2", "p1" ],
deleteTalkPageOnDelete: false,
deleteRedirectsOnDelete: true,
deleteSysopDefaultToTag: false,
speedyWindowHeight: 500,
speedyWindowWidth: 800,
logSpeedyNominations: false,
speedyLogPageName: "CSD log",
noLogOnSpeedyNomination: [ "u1" ],
// Unlink
unlinkNamespaces: [ "0", "100" ],
// Warn
defaultWarningGroup: "1",
showSharedIPNotice: true,
watchWarnings: true,
blankTalkpageOnIndefBlock: false,
customWarningList: [],
// XfD
xfdWatchDiscussion: "default",
xfdWatchList: "no",
xfdWatchPage: "default",
xfdWatchUser: "default",
// Hidden preferences
revertMaxRevisions: 50,
batchdeleteChunks: 50,
batchDeleteMinCutOff: 5,
batchMax: 5000,
batchProtectChunks: 50,
batchProtectMinCutOff: 5,
batchundeleteChunks: 50,
batchUndeleteMinCutOff: 5,
deliChunks: 500,
deliMax: 5000,
proddeleteChunks: 50
};
// now some skin dependent config.
if ( mw.config.get( "skin" ) === "vector" ) {
Twinkle.defaultConfig.twinkle.portletArea = "right-navigation";
Twinkle.defaultConfig.twinkle.portletId = "p-twinkle";
Twinkle.defaultConfig.twinkle.portletName = "TW";
Twinkle.defaultConfig.twinkle.portletType = "menu";
Twinkle.defaultConfig.twinkle.portletNext = "p-search";
} else {
Twinkle.defaultConfig.twinkle.portletArea = null;
Twinkle.defaultConfig.twinkle.portletId = "p-cactions";
Twinkle.defaultConfig.twinkle.portletName = null;
Twinkle.defaultConfig.twinkle.portletType = null;
Twinkle.defaultConfig.twinkle.portletNext = null;
}
Twinkle.defaultConfig.friendly = {
// Tag
groupByDefault: true,
watchTaggedPages: true,
watchMergeDiscussions: true,
markTaggedPagesAsMinor: false,
markTaggedPagesAsPatrolled: true,
tagArticleSortOrder: "cat",
customTagList: [],
// Welcome
topWelcomes: false,
watchWelcomes: true,
welcomeHeading: "Welcome",
insertHeadings: true,
insertUsername: true,
insertSignature: true, // sign welcome templates, where appropriate
quickWelcomeMode: "norm",
quickWelcomeTemplate: "welcome",
customWelcomeList: [],
customWelcomeSignature: true,
// Talkback
markTalkbackAsMinor: true,
insertTalkbackSignature: true, // always sign talkback templates
talkbackHeading: "Talkback",
adminNoticeHeading: "Notice",
mailHeading: "You've got mail!",
// Shared
markSharedIPAsMinor: true
};
Twinkle.getPref = function twinkleGetPref( name ) {
var result;
if ( typeof Twinkle.prefs === "object" && typeof Twinkle.prefs.twinkle === "object" ) {
// look in Twinkle.prefs (twinkleoptions.js)
result = Twinkle.prefs.twinkle[name];
} else if ( typeof window.TwinkleConfig === "object" ) {
// look in TwinkleConfig
result = window.TwinkleConfig[name];
}
if ( result === undefined ) {
return Twinkle.defaultConfig.twinkle[name];
}
return result;
};
Twinkle.getFriendlyPref = function twinkleGetFriendlyPref(name) {
var result;
if ( typeof Twinkle.prefs === "object" && typeof Twinkle.prefs.friendly === "object" ) {
// look in Twinkle.prefs (twinkleoptions.js)
result = Twinkle.prefs.friendly[ name ];
} else if ( typeof window.FriendlyConfig === "object" ) {
// look in FriendlyConfig
result = window.FriendlyConfig[ name ];
}
if ( result === undefined ) {
return Twinkle.defaultConfig.friendly[ name ];
}
return result;
};
/**
* **************** Twinkle.addPortlet() ****************
*
* Adds a portlet menu to one of the navigation areas on the page.
* This is necessarily quite a hack since skins, navigation areas, and
* portlet menu types all work slightly different.
*
* Available navigation areas depend on the skin used.
* Monobook:
* "column-one", outer div class "portlet", inner div class "pBody". Existing portlets: "p-cactions", "p-personal", "p-logo", "p-navigation", "p-search", "p-interaction", "p-tb", "p-coll-print_export"
* Special layout of p-cactions and p-personal through specialized styles.
* Vector:
* "mw-panel", outer div class "portal", inner div class "body". Existing portlets/elements: "p-logo", "p-navigation", "p-interaction", "p-tb", "p-coll-print_export"
* "left-navigation", outer div class "vectorTabs" or "vectorMenu", inner div class "" or "menu". Existing portlets: "p-namespaces", "p-variants" (menu)
* "right-navigation", outer div class "vectorTabs" or "vectorMenu", inner div class "" or "menu". Existing portlets: "p-views", "p-cactions" (menu), "p-search"
* Special layout of p-personal portlet (part of "head") through specialized styles.
* Modern:
* "mw_contentwrapper" (top nav), outer div class "portlet", inner div class "pBody". Existing portlets or elements: "p-cactions", "mw_content"
* "mw_portlets" (sidebar), outer div class "portlet", inner div class "pBody". Existing portlets: "p-navigation", "p-search", "p-interaction", "p-tb", "p-coll-print_export"
*
* @param String navigation -- id of the target navigation area (skin dependant, on vector either of "left-navigation", "right-navigation", or "mw-panel")
* @param String id -- id of the portlet menu to create, preferably start with "p-".
* @param String text -- name of the portlet menu to create. Visibility depends on the class used.
* @param String type -- type of portlet. Currently only used for the vector non-sidebar portlets, pass "menu" to make this portlet a drop down menu.
* @param Node nextnodeid -- the id of the node before which the new item should be added, should be another item in the same list, or undefined to place it at the end.
*
* @return Node -- the DOM node of the new item (a DIV element) or null
*/
Twinkle.addPortlet = function( navigation, id, text, type, nextnodeid )
{
//sanity checks, and get required DOM nodes
var root = document.getElementById( navigation );
if ( !root ) {
return null;
}
var item = document.getElementById( id );
if ( item ) {
if ( item.parentNode && item.parentNode === root ) {
return item;
}
return null;
}
var nextnode;
if ( nextnodeid ) {
nextnode = document.getElementById(nextnodeid);
}
//verify/normalize input
type = ( skin === "vector" && type === "menu" && ( navigation === "left-navigation" || navigation === "right-navigation" )) ? "menu" : "";
var outerDivClass;
var innerDivClass;
switch ( skin )
{
case "vector":
if ( navigation !== "portal" && navigation !== "left-navigation" && navigation !== "right-navigation" ) {
navigation = "mw-panel";
}
outerDivClass = ( navigation === "mw-panel" ) ? "portal" : ( type === "menu" ? "vectorMenu extraMenu" : "vectorTabs extraMenu" );
innerDivClass = ( navigation === "mw-panel" ) ? "body" : ( type === "menu" ? "menu" : "" );
break;
case "modern":
if ( navigation !== "mw_portlets" && navigation !== "mw_contentwrapper" ) {
navigation = "mw_portlets";
}
outerDivClass = "portlet";
innerDivClass = "pBody";
break;
default:
navigation = "column-one";
outerDivClass = "portlet";
innerDivClass = "pBody";
break;
}
// Build the DOM elements.
var outerDiv = document.createElement( "div" );
outerDiv.className = outerDivClass + " emptyPortlet";
outerDiv.id = id;
if ( type === "menu" ) {
// Fix drop-down arrow image in Vector skin
outerDiv.style.backgroundImage = 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAQCAMAAAAlM38UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA9QTFRFsbGxmpqa3d3deXl58/n79CzHcQAAAAV0Uk5T/////wD7tg5TAAAAMklEQVR42mJgwQoYBkqYiZEZAhiZUFRDxWGicEPA4nBRhNlAcYQokpVMDEwD6kuAAAMAyGMFQVv5ldcAAAAASUVORK5CYII=")';
outerDiv.style.backgroundPosition = "right 60%";
}
if ( nextnode && nextnode.parentNode === root ) {
root.insertBefore( outerDiv, nextnode );
} else {
root.appendChild( outerDiv );
}
var h5 = document.createElement( "h3" );
if ( type === "menu" ) {
var span = document.createElement( "span" );
span.appendChild( document.createTextNode( text ) );
h5.appendChild( span );
var a = document.createElement( "a" );
a.href = "#";
$( a ).click(function ( e ) {
e.preventDefault();
if ( !Twinkle.userAuthorized ) {
alert("Sorry, your account is too new to use Twinkle.");
}
});
span = document.createElement( "span" );
span.appendChild( document.createTextNode( text ) );
a.appendChild( span );
h5.appendChild( a );
} else {
h5.appendChild( document.createTextNode( text ) );
}
outerDiv.appendChild( h5 );
var innerDiv = document.createElement( "div" ); // Not strictly necessary with type vectorTabs, or other skins.
innerDiv.className = innerDivClass;
outerDiv.appendChild(innerDiv);
var ul = document.createElement( "ul" );
innerDiv.appendChild( ul );
return outerDiv;
};
/**
* **************** Twinkle.addPortletLink() ****************
* Builds a portlet menu if it doesn't exist yet, and add the portlet link.
* @param task: Either a URL for the portlet link or a function to execute.
*/
Twinkle.addPortletLink = function( task, text, id, tooltip )
{
if ( Twinkle.getPref("portletArea") !== null ) {
Twinkle.addPortlet( Twinkle.getPref( "portletArea" ), Twinkle.getPref( "portletId" ), Twinkle.getPref( "portletName" ), Twinkle.getPref( "portletType" ), Twinkle.getPref( "portletNext" ));
}
var link = mw.util.addPortletLink( Twinkle.getPref( "portletId" ), typeof task === "string" ? task : "#", text, id, tooltip );
if ( $.isFunction( task ) ) {
$( link ).click(function ( ev ) {
task();
ev.preventDefault();
});
}
return link;
};
/**
* **************** General initialization code ****************
*/
var scriptpathbefore = mw.util.wikiScript( "index" ) + "?title=",
scriptpathafter = "&action=raw&ctype=text/javascript&happy=yes";
// Retrieve the user's Twinkle preferences
$.ajax({
url: scriptpathbefore + "User:" + encodeURIComponent( mw.config.get("wgUserName")) + "/twinkleoptions.js" + scriptpathafter,
dataType: "text"
})
.fail(function () { mw.util.jsMessage( "Could not load twinkleoptions.js" ); })
.done(function ( optionsText ) {
// Quick pass if user has no options
if ( optionsText === "" ) {
return;
}
// Twinkle options are basically a JSON object with some comments. Strip those:
optionsText = optionsText.replace( /(?:^(?:\/\/[^\n]*\n)*\n*|(?:\/\/[^\n]*(?:\n|$))*$)/g, "" );
// First version of options had some boilerplate code to make it eval-able -- strip that too. This part may become obsolete down the line.
if ( optionsText.lastIndexOf( "window.Twinkle.prefs = ", 0 ) === 0 ) {
optionsText = optionsText.replace( /(?:^window.Twinkle.prefs = |;\n*$)/g, "" );
}
try {
var options = $.parseJSON( optionsText );
// Assuming that our options evolve, we will want to transform older versions:
//if ( options.optionsVersion === undefined ) {
// ...
// options.optionsVersion = 1;
//}
//if ( options.optionsVersion === 1 ) {
// ...
// options.optionsVersion = 2;
//}
// At the same time, twinkleconfig.js needs to be adapted to write a higher version number into the options.
if ( options ) {
Twinkle.prefs = options;
}
}
catch ( e ) {
mw.util.jsMessage("Could not parse twinkleoptions.js");
}
})
.always(function () {
$( Twinkle.load );
});
// Developers: you can import custom Twinkle modules here
// For example, mw.loader.load(scriptpathbefore + "User:UncleDouggie/morebits-test.js" + scriptpathafter);
Twinkle.load = function () {
// Don't activate on special pages other than "Contributions" so that they load faster, especially the watchlist.
var isSpecialPage = ( mw.config.get('wgNamespaceNumber') === -1
&& mw.config.get('wgCanonicalSpecialPageName') !== "Contributions"
&& mw.config.get('wgCanonicalSpecialPageName') !== "Prefixindex" ),
// Also, Twinkle is incompatible with Internet Explorer versions 8 or lower, so don't load there either.
isOldIE = ( $.client.profile().name === 'msie' && $.client.profile().versionNumber < 9 );
// Prevent users that are not autoconfirmed from loading Twinkle as well.
if ( isSpecialPage || isOldIE || !Twinkle.userAuthorized ) {
return;
}
// Load the modules in the order that the tabs should appears
// User/user talk-related
Twinkle.arv();
Twinkle.warn();
Twinkle.welcome();
Twinkle.shared();
Twinkle.talkback();
// Deletion
Twinkle.speedy();
Twinkle.prod();
Twinkle.xfd();
Twinkle.image();
// Maintenance
Twinkle.protect();
Twinkle.tag();
// Misc. ones last
Twinkle.diff();
Twinkle.unlink();
Twinkle.config.init();
Twinkle.fluff.init();
if ( Morebits.userIsInGroup('sysop') ) {
Twinkle.delimages();
Twinkle.deprod();
Twinkle.batchdelete();
Twinkle.batchprotect();
Twinkle.batchundelete();
}
// Run the initialization callbacks for any custom modules
$( Twinkle.initCallbacks ).each(function ( k, v ) { v(); });
Twinkle.addInitCallback = function ( func ) { func(); };
// Increases text size in Twinkle dialogs, if so configured
if ( Twinkle.getPref( "dialogLargeFont" ) ) {
mw.util.addCSS( ".morebits-dialog-content, .morebits-dialog-footerlinks { font-size: 100% !important; } " +
".morebits-dialog input, .morebits-dialog select, .morebits-dialog-content button { font-size: inherit !important; }" );
}
};
} ( window, document, jQuery )); // End wrap with anonymous function
// </nowiki>
87327316ca8ba8a5f186c87eec65cc0bfd85266c
MediaWiki:Gadget-UTCLiveClock
8
59
152
151
2014-01-16T15:56:32Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Add a clock in the personal toolbar that displays the current time in [[UTC]] (which also provides a link to [[Wikipedia:Purge|purge]] the current page).
aee3daedbe305c8ce5aaa420ad579d9949515ff4
151
2009-04-05T07:57:50Z
Mentifisto
0
better punctuation
wikitext
text/x-wiki
Add a clock in the personal toolbar that displays the current time in [[UTC]] (which also provides a link to [[Wikipedia:Purge|purge]] the current page).
aee3daedbe305c8ce5aaa420ad579d9949515ff4
MediaWiki:Gadget-UTCLiveClock.js
8
60
154
153
2014-01-16T15:56:32Z
Ffkapa
2
1 wersja
javascript
text/javascript
mw.loader.load( '//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-UTCLiveClock.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400' );
e85105645bc4a2ac54268c19518ff64a83e2bc2c
153
2011-10-01T12:01:58Z
TheDJ
0
load protocol relative
javascript
text/javascript
mw.loader.load( '//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-UTCLiveClock.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400' );
e85105645bc4a2ac54268c19518ff64a83e2bc2c
MediaWiki:Gadget-afchelper
8
52
138
137
2014-01-16T15:45:00Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
[[Wikipedia:WikiProject Articles for creation/Helper script|Yet Another AFC Helper Script]]: easily review [[WP:AFC|Articles for creation]] submissions, [[WP:FFU|Files for Upload]], [[WP:AFC/R|redirect and category]] requests
dd8ee8074c848f35cccb91d67c33804cafd067d8
137
2013-09-27T22:24:41Z
Legoktm
0
update per mabdul, more links + FFU
wikitext
text/x-wiki
[[Wikipedia:WikiProject Articles for creation/Helper script|Yet Another AFC Helper Script]]: easily review [[WP:AFC|Articles for creation]] submissions, [[WP:FFU|Files for Upload]], [[WP:AFC/R|redirect and category]] requests
dd8ee8074c848f35cccb91d67c33804cafd067d8
MediaWiki:Gadget-afchelper.js
8
53
140
139
2014-01-16T15:45:01Z
Ffkapa
2
1 wersja
javascript
text/javascript
/* Uploaded from https://github.com/WPAFC/afch, commit: cd26d7c483b787a54555e5348065f8c05b214374 (master) */
////////////////////////////////////////////
// Yet another AfC helper script
////////////////////////////////////////////
// Home page and documentation: <http://en.wikipedia.org/wiki/Wikipedia:WikiProject_Articles_for_creation/Helper_script>
// Development: <https://github.com/WikiProject-Articles-for-creation/afch>
////////////////////////////////////////////
//<nowiki>
if ((wgPageName.indexOf('Wikipedia:Articles_for_creation') !== -1) || (wgPageName.indexOf('Wikipedia_talk:Articles_for_creation') !== -1) || (wgPageName.indexOf('Wikipedia:Files_for_upload') !== -1) || (wgPageName.indexOf('User:') !== -1)) {
var afchelper_baseurl = mw.config.get('wgServer') + '/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-afchelper.js';
importScriptURI(afchelper_baseurl + '/core.js');
}
//</nowiki>
546ed4b5c6709d32371707177c5f0c6770426301
139
2013-08-30T05:34:30Z
Legoktm
0
Auto-updating to cd26d7c483b787a54555e5348065f8c05b214374 (master)
javascript
text/javascript
/* Uploaded from https://github.com/WPAFC/afch, commit: cd26d7c483b787a54555e5348065f8c05b214374 (master) */
////////////////////////////////////////////
// Yet another AfC helper script
////////////////////////////////////////////
// Home page and documentation: <http://en.wikipedia.org/wiki/Wikipedia:WikiProject_Articles_for_creation/Helper_script>
// Development: <https://github.com/WikiProject-Articles-for-creation/afch>
////////////////////////////////////////////
//<nowiki>
if ((wgPageName.indexOf('Wikipedia:Articles_for_creation') !== -1) || (wgPageName.indexOf('Wikipedia_talk:Articles_for_creation') !== -1) || (wgPageName.indexOf('Wikipedia:Files_for_upload') !== -1) || (wgPageName.indexOf('User:') !== -1)) {
var afchelper_baseurl = mw.config.get('wgServer') + '/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-afchelper.js';
importScriptURI(afchelper_baseurl + '/core.js');
}
//</nowiki>
546ed4b5c6709d32371707177c5f0c6770426301
MediaWiki:Gadget-charinsert
8
47
128
127
2014-01-16T15:38:43Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
[[mw:extension:CharInsert|CharInsert]], adds a toolbar under the edit window for quickly inserting wiki markup and special characters
e86483d1d9be7b57ccb81d59e25d331cfa32718d
127
2012-09-25T00:30:51Z
MBisanz
0
+
wikitext
text/x-wiki
[[mw:extension:CharInsert|CharInsert]], adds a toolbar under the edit window for quickly inserting wiki markup and special characters
e86483d1d9be7b57ccb81d59e25d331cfa32718d
MediaWiki:Gadget-charinsert.css
8
49
132
131
2014-01-16T15:38:43Z
Ffkapa
2
1 wersja
css
text/css
/* _____________________________________________________________________________
* | |
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
* |_____________________________________________________________________________|
*
*/
div#editpage-specialchars {
display: block;
margin-top: .5em;
border: 1px solid #c0c0c0;
padding: .3em;
}
fe057423f3b8220eeff6510288a1f8dd7a8ac9ff
131
2012-09-25T15:51:32Z
MSGJ
0
tweaks per [[User:Isarra]]
css
text/css
/* _____________________________________________________________________________
* | |
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
* |_____________________________________________________________________________|
*
*/
div#editpage-specialchars {
display: block;
margin-top: .5em;
border: 1px solid #c0c0c0;
padding: .3em;
}
fe057423f3b8220eeff6510288a1f8dd7a8ac9ff
MediaWiki:Gadget-charinsert.js
8
48
130
129
2014-01-16T15:38:43Z
Ffkapa
2
1 wersja
javascript
text/javascript
// copied from [[mw:User:Alex Smotrov/edittools.js]], modified for use on the English Wikipedia.
// enableForAllFields() feature from [[commons:MediaWiki:Edittools.js]]
// combined and modified by [[User:Ilmari Karonen]]
// Configuration (to be set from [[Special:MyPage/common.js]]):
// window.charinsertCustom – Object. Merged into the default charinsert list. For example, setting
// this to { Symbols: '‽' } will add the interrobang to the end of the Symbols section.
// window.editToolsRecall – Boolean. Set true to create a recall switch.
// window.charinsertDontMove – Boolean. Set true to leave the box in its default position, rather
// than moving it above the edit summary.
// window.updateEditTools() – Function. Call after updating window.charinsertCustom to regenerate the
// EditTools window.
window.updateEditTools = function () {
};
jQuery( document ).ready( function ( $ ) {
var EditTools = {
// Entries prefixed with ␥ (U+2425 SYMBOL FOR DELETE FORM TWO) will not appear in the article namespace (namespace 0).
// Please make any changes to [[MediaWiki:Edittools]] as well, however, instead of using the ␥ symbol, use {{#ifeq:{{NAMESPACE}}|{{ns:0}}| | }}.
charinsert: {
'Insert': ' – — ° ″ ′ ≈ ≠ ≤ ≥ ± − × ÷ ← → · § ␥Sign_your_posts_on_talk_pages: ␥~~\~~ Cite_your_sources: <ref>+</ref>',
'Wiki markup': 'Insert: – — ° ″ ′ ≈ ≠ ≤ ≥ ± − × ÷ ← → · § ␥~~\~~ <ref>+</ref> Wiki_markup: {\{+}} {\{\{+}}} | [+] [\[+]] [\[Category:+]] #REDIRECT.[\[+]] &nb'+'sp; <s>+</s> <sup>+</sup> <sub>+</sub> <code>+</code> <pre>+</pre> <blockquote>+</blockquote> <ref.name="+"_/> {\{#tag:ref|+|group="nb"|name=""}} {\{Reflist}} <references./> <includeonly>+</includeonly> <noinclude>+</noinclude> {\{DEFAULTSORT:+}} <nowiki>+</nowiki> <!--.+_--> <span.class="plainlinks">+</span>',
'Symbols': '~ | ¡¿†‡↔↑↓•¶#∞ ‘+’ “+” ‹+› «+» ⟨+⟩ ¤₳฿₵¢₡₢$₫₯€₠₣ƒ₴₭₤ℳ₥₦№₧₰£៛₨₪৳₮₩¥ ♠♣♥♦ ♭♯♮ ©®™ ◌ {\{Unicode|+}}',
'Latin': 'A a Á á À à  â Ä ä Ǎ ǎ Ă ă Ā ā à ã Å å Ą ą Æ æ Ǣ ǣ B b C c Ć ć Ċ ċ Ĉ ĉ Č č Ç ç D d Ď ď Đ đ Ḍ ḍ Ð ð E e É é È è Ė ė Ê ê Ë ë Ě ě Ĕ ĕ Ē ē Ẽ ẽ Ę ę Ẹ ẹ Ɛ ɛ Ə ə F f G g Ġ ġ Ĝ ĝ Ğ ğ Ģ ģ H h Ĥ ĥ Ħ ħ Ḥ ḥ I i İ ı Í í Ì ì Î î Ï ï Ǐ ǐ Ĭ ĭ Ī ī Ĩ ĩ Į į Ị ị J j Ĵ ĵ K k Ķ ķ L l Ĺ ĺ Ŀ ŀ Ľ ľ Ļ ļ Ł ł Ḷ ḷ Ḹ ḹ M m Ṃ ṃ N n Ń ń Ň ň Ñ ñ Ņ ņ Ṇ ṇ Ŋ ŋ O o Ó ó Ò ò Ô ô Ö ö Ǒ ǒ Ŏ ŏ Ō ō Õ õ Ǫ ǫ Ọ ọ Ő ő Ø ø Œ œ Ɔ ɔ P p Q q R r Ŕ ŕ Ř ř Ŗ ŗ Ṛ ṛ Ṝ ṝ S s Ś ś Ŝ ŝ Š š Ş ş Ș ș Ṣ ṣ ß T t Ť ť Ţ ţ Ț ț Ṭ ṭ Þ þ U u Ú ú Ù ù Û û Ü ü Ǔ ǔ Ŭ ŭ Ū ū Ũ ũ Ů ů Ų ų Ụ ụ Ű ű Ǘ ǘ Ǜ ǜ Ǚ ǚ Ǖ ǖ V v W w Ŵ ŵ X x Y y Ý ý Ŷ ŷ Ÿ ÿ Ỹ ỹ Ȳ ȳ Z z Ź ź Ż ż Ž ž ß Ð ð Þ þ Ŋ ŋ Ə ə {\{Unicode|+}}',
'Greek': 'ΆάΈέΉήΊίΌόΎύΏώ ΑαΒβΓγΔδ ΕεΖζΗηΘθ ΙιΚκΛλΜμ ΝνΞξΟοΠπ ΡρΣσςΤτΥυ ΦφΧχΨψΩω ᾼᾳᾴᾺὰᾲᾶᾷἈἀᾈᾀἉἁᾉᾁἌἄᾌᾄἊἂᾊᾂἎἆᾎᾆἍἅᾍᾅἋἃᾋᾃἏἇᾏᾇ ῈὲἘἐἙἑἜἔἚἒἝἕἛἓ ῌῃῄῊὴῂῆῇἨἠᾘᾐἩἡᾙᾑἬἤᾜᾔἪἢᾚᾒἮἦᾞᾖἭἥᾝᾕἫἣᾛᾓἯἧᾟᾗ ῚὶῖἸἰἹἱἼἴἺἲἾἶἽἵἻἳἿἷ ῸὸὈὀὉὁὌὄὊὂὍὅὋὃ ῤῬῥ ῪὺῦὐὙὑὔὒὖὝὕὛὓὟὗ ῼῳῴῺὼῲῶῷὨὠᾨᾠὩὡᾩᾡὬὤᾬᾤὪὢᾪᾢὮὦᾮᾦὭὥᾭᾥὫὣᾫᾣὯὧᾯᾧ {\{Polytonic|+}}',
'Cyrillic': 'АаБбВвГг ҐґЃѓДдЂђ ЕеЁёЄєЖж ЗзЅѕИиІі ЇїЙйЈјКк ЌќЛлЉљМм НнЊњОоПп РрСсТтЋћ УуЎўФфХх ЦцЧчЏџШш ЩщЪъЫыЬь ЭэЮюЯя ӘәӨөҒғҖҗ ҚқҜҝҢңҮү ҰұҲҳҸҹҺһ ҔҕӢӣӮӯҘҙ ҠҡҤҥҪҫӐӑ ӒӓӔӕӖӗӰӱ ӲӳӸӹӀ ҞҟҦҧҨҩҬҭ ҴҵҶҷҼҽҾҿ ӁӂӃӄӇӈӋӌ ӚӛӜӝӞӟӠӡ ӤӥӦӧӪӫӴӵ ́',
'Hebrew': 'אבגדהוזחטיךכלםמןנסעףפץצקרשת ׳ ״ װױײ',
'Arabic': ' Transcription: ʾ ṯ ḥ ḫ ẖ ḏ š ṣ ḍ ṭ ẓ ʿ ġ ẗ ا ﺁ ب ت ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع غ ف ق ك ل م ن ه ة و ي ى ء أ إ ؤ ئ',
'IPA (English)': 'ˈ ˌ ŋ ɡ tʃ dʒ ʃ ʒ θ ð ʔ iː ɪ uː ʊ ʌ ɜr eɪ ɛ æ oʊ ɒ ɔː ɔɪ ɔr ɑː ɑr aɪ aʊ ə ər ɨ ɵ ʉ ⟨+⟩ {\{IPAc-en|+}} {\{IPA-en|+}} {\{IPA|/+/}}',
'IPA': 't̪ d̪ ʈɖɟɡɢʡʔ ɸβθðʃʒɕʑʂʐçʝɣχʁħʕʜʢɦ ɱɳɲŋɴ ʋɹɻɰ ʙⱱʀɾɽ ɫɬɮɺɭʎʟ ʍɥɧ ʼ ɓɗʄɠʛ ʘǀǃǂǁ ɨʉɯ ɪʏʊ øɘɵɤ ə ɚ ɛœɜɝɞʌɔ æ ɐɶɑɒ ʰʱʷʲˠˤˀ ᵊ k̚ ⁿˡ ˈˌːˑ t̪ d̪ s̺ s̻ θ̼ s̬ n̥ ŋ̊ a̤ a̰ β̞ ˕ r̝ ˔ o˞ ɚ ɝ e̘ e̙ u̟ i̠ ɪ̈ e̽ ɔ̹ ɔ̜ n̩ ə̆ ə̯ ə̃ ȷ̃ ɫ z̴ ə̋ ə́ ə̄ ə̀ ə̏ ə̌ ə̂ ə᷄ ə᷅ ə᷇ ə᷆ ə᷈ ə᷉ t͡ʃ d͡ʒ t͜ɬ ‿ ˥ ˦ ˧ ˨ ˩ ꜛ ꜜ | ‖ ↗ ↘ k͈ s͎ {\{IPA|+}}',
'Math and logic': '− × ÷ ⋅ ° ∗ ∘ ± ∓ ≤ ≥ ≠ ≡ ≅ ≜ ≝ ≐ ≃ ≈ ⊕ ⊗ ⇐ ⇔ ⇒ ∞ ← ↔ → ≪ ≫ ∝ √ ∤ ≀ ◅ ▻ ⋉ ⋊ ⋈ ∴ ∵ ↦ ¬ ∧ ∨ ⊻ ∀ ∃ ∈ ∉ ∋ ⊆ ⊈ ⊊ ⊂ ⊄ ⊇ ⊉ ⊋ ⊃ ⊅ ∪ ∩ ∑ ∏ ∐ ′ ∫ ∬ ∭ ∮ ∇ ∂ ∆ ∅ ℂ ℍ ℕ ℙ ℚ ℝ ℤ ℵ ⌊ ⌋ ⌈ ⌉ ⊤ ⊥ ⊢ ⊣ ⊧ □ ∠ ⟨ ⟩ {\{frac|+|}} &nb'+'sp; − <math>+</math> {\{math|+}}'
},
charinsertDivider: "\240",
cookieName: 'edittoolscharsubset',
createEditTools: function ( placeholder ) {
var sel, id;
var box = document.createElement( "div" );
var prevSubset = 0, curSubset = 0;
box.id = "editpage-specialchars";
box.title = 'Click on the character or tag to insert it into the edit window';
// append user-defined sets
if ( window.charinsertCustom ) {
for ( id in charinsertCustom ) {
if ( !EditTools.charinsert[id] ) {
EditTools.charinsert[id] = '';
}
}
}
// create drop-down select
sel = document.createElement( 'select' );
for ( id in EditTools.charinsert ) {
sel.options[sel.options.length] = new Option( id, id );
}
sel.selectedIndex = 0;
sel.style.marginRight = '.3em';
sel.title = 'Choose character subset';
sel.onchange = sel.onkeyup = selectSubset;
box.appendChild( sel );
// create "recall" switch
if ( window.editToolsRecall ) {
var recall = document.createElement( 'span' );
recall.appendChild( document.createTextNode( '↕' ) ); // ↔
recall.onclick = function() {
sel.selectedIndex = prevSubset;
selectSubset();
}
with ( recall.style ) {
cssFloat = styleFloat = 'left';
marginRight = '5px';
cursor = 'pointer';
}
box.appendChild( recall );
}
// load latest selection from cookies
try {
var cookieRe = new RegExp( "(?:^|;)\\s*" + EditTools.cookieName + "=(\\d+)\\s*(?:;|$)" );
var m = cookieRe.exec( document.cookie );
if ( m && m.length > 1 && parseInt( m[1] ) < sel.options.length ) {
sel.selectedIndex = parseInt( m[1] );
}
} catch ( err ) {
// ignore
}
placeholder.parentNode.replaceChild( box, placeholder );
selectSubset();
return;
function selectSubset() {
// remember previous (for "recall" button)
prevSubset = curSubset;
curSubset = sel.selectedIndex;
//save into cookies for persistence
try {
var expires = new Date();
expires.setTime( expires.getTime() + 30 * 24 * 60 * 60 * 1000 ); // + 30 days
document.cookie = EditTools.cookieName + "=" + curSubset + ";path=/;expires=" + expires.toUTCString();
} catch ( err ) {
// ignore
}
//hide other subsets
var pp = box.getElementsByTagName( 'p' ) ;
for ( var i = 0; i < pp.length; i++ ) {
pp[i].style.display = 'none';
}
//show/create current subset
var id = sel.options[curSubset].value;
var p = document.getElementById( id );
if ( !p ) {
p = document.createElement( 'p' );
p.id = id;
if ( id == 'Arabic' || id == 'Hebrew' ) {
p.style.fontSize = '120%';
p.dir = 'rtl';
}
var tokens = EditTools.charinsert[id];
if ( window.charinsertCustom && charinsertCustom[id] ) {
if ( tokens.length > 0 ) {
tokens += ' ';
}
tokens += charinsertCustom[id];
}
EditTools.createTokens( p, tokens );
box.appendChild( p );
}
p.style.display = 'inline';
}
},
createTokens: function ( paragraph, str ) {
var tokens = str.split( ' ' ), token, i, n;
for ( i = 0; i < tokens.length; i++ ) {
token = tokens[i];
n = token.indexOf( '+' );
if ( token.charAt( 0 ) === '␥' ) {
if ( token.length > 1 && mw.config.get( 'wgNamespaceNumber' ) === 0 ) {
continue;
} else {
token = token.substring( 1 );
}
}
if ( token == '' || token == '_' ) {
addText( EditTools.charinsertDivider + ' ' );
} else if ( token == '\n' ) {
paragraph.appendChild( document.createElement( 'br' ) );
} else if ( token == '___' ) {
paragraph.appendChild( document.createElement( 'hr' ) );
} else if ( token.charAt( token.length-1 ) == ':' ) { // : at the end means just text
addBold( token );
} else if ( n == 0 ) { // +<tag> -> <tag>+</tag>
addLink( token.substring( 1 ), '</' + token.substring( 2 ), token.substring( 1 ) );
} else if ( n > 0 ) { // <tag>+</tag>
addLink( token.substring( 0, n ), token.substring( n+1 ) );
} else if ( token.length > 2 && token.charCodeAt( 0 ) > 127 ) { // a string of insertable characters
for ( var j = 0; j < token.length; j++ ) {
addLink( token.charAt( j ), '' );
}
} else {
addLink( token, '' );
}
}
return;
function addLink( tagOpen, tagClose, name ) {
var handler;
var dle = tagOpen.indexOf( '\x10' );
if ( dle > 0 ) {
var path = tagOpen.substring( dle + 1 ).split( '.' );
tagOpen = tagOpen.substring( 0, dle );
var handler = window;
for ( var i = 0; i < path.length; i++ ) {
handler = handler[path[i]];
}
} else {
tagOpen = tagOpen.replace( /\./g,' ' );
tagClose = tagClose ? tagClose.replace( /_/g,' ' ) : '';
handler = new Function(
"evt",
"insertTags('" + tagOpen + "', '" + tagClose + "', ''); evt.preventDefault(); return false;"
);
}
var a = document.createElement( 'a' );
name = name || tagOpen + tagClose;
name = name.replace( /\\n/g,'' );
a.appendChild( document.createTextNode( name ) );
a.href = "#";
$( a ).click( handler );
paragraph.appendChild( a );
addText( ' ' );
}
function addBold( text ) {
var b = document.createElement( 'b' );
b.appendChild( document.createTextNode( text.replace( /_/g,' ' ) ) );
paragraph.appendChild( b );
addText( ' ' );
}
function addText( txt ) {
paragraph.appendChild( document.createTextNode( txt ) );
}
},
enableForAllFields: function () {
if ( typeof( insertTags ) != 'function' || window.WikEdInsertTags ) {
return;
}
// insertTags from the site-wide /skins-1.5/common/edit.js just inserts in the first
// textarea in the document. Evidently, that's not good if we have multiple textareas.
// My first idea was to simply add a hidden textarea as the first one, and redefine
// insertTags such that it copied first the last active textareas contents over to that hidden
// field, set the cursor or selection there, let the standard insertTags do its thing, and
// then copy the hidden field's text, cursor position and selection back to the currently
// active field. Unfortunately, that is just as complex as simply copying the whole code
// from wikibits to here and let it work on the right text field in the first place.
var texts = document.getElementsByTagName( 'textarea' );
for ( var i = 0; i < texts.length; i++ ) {
$( texts[i] ).focus( EditTools.registerTextField );
}
// While we're at it, also enable it for input fields
texts = document.getElementsByTagName( 'input' );
for ( var i = 0; i < texts.length; i++ ) {
if ( texts[i].type == 'text' ) {
$( texts[i] ).focus( EditTools.registerTextField );
}
}
insertTags = EditTools.insertTags; // Redefine the global insertTags
},
last_active_textfield: null,
registerTextField: function ( evt ) {
var e = evt || window.event;
var node = e.target || e.srcElement;
if ( !node ) {
return;
}
EditTools.last_active_textfield = node.id;
return true;
},
getTextArea: function () {
var txtarea = null;
if ( EditTools.last_active_textfield && EditTools.last_active_textfield != "" )
txtarea = document.getElementById( EditTools.last_active_textfield );
if ( !txtarea ) {
// Fallback option: old behaviour
if ( document.editform ) {
txtarea = document.editform.wpTextbox1;
} else {
// Some alternate form? Take the first one we can find
txtarea = document.getElementsByTagName( 'textarea' );
if ( txtarea.length > 0 ) {
txtarea = txtarea[0];
} else {
txtarea = null;
}
}
}
return txtarea;
},
insertTags: function ( tagOpen, tagClose, sampleText ) {
var txtarea = EditTools.getTextArea();
if ( !txtarea ) {
return;
}
/* Usability initiative compatibility */
if ( typeof $j != 'undefined' && typeof $j.fn.textSelection != 'undefined' ) {
$j( txtarea ).textSelection(
'encapsulateSelection',
{ 'pre': tagOpen, 'peri': sampleText, 'post': tagClose }
);
return;
}
var selText, isSample = false;
function checkSelectedText() {
if ( !selText ) {
selText = sampleText;
isSample = true;
} else if ( selText.charAt( selText.length - 1 ) == ' ' ) { // Exclude ending space char
selText = selText.substring( 0, selText.length - 1 );
tagClose += ' ';
}
}
if ( document.selection && document.selection.createRange ) { // IE/Opera
// Save window scroll position
var winScroll = 0;
if ( document.documentElement && document.documentElement.scrollTop ) {
winScroll = document.documentElement.scrollTop;
} else if ( document.body ) {
winScroll = document.body.scrollTop;
}
// Get current selection
txtarea.focus();
var range = document.selection.createRange();
selText = range.text;
// Insert tags
checkSelectedText();
range.text = tagOpen + selText + tagClose;
// Mark sample text as selected
if ( isSample && range.moveStart ) {
if ( window.opera ) {
tagClose = tagClose.replace( /\n/g, "" );
}
range.moveStart( 'character', - tagClose.length - selText.length );
range.moveEnd( 'character', - tagClose.length );
}
range.select();
// Restore window scroll position
if ( document.documentElement && document.documentElement.scrollTop ) {
document.documentElement.scrollTop = winScroll;
} else if ( document.body ) {
document.body.scrollTop = winScroll;
}
} else if ( txtarea.selectionStart || txtarea.selectionStart == '0' ) { // Mozilla
// Save textarea scroll position
var textScroll = txtarea.scrollTop;
// Get current selection
txtarea.focus();
var startPos = txtarea.selectionStart;
var endPos = txtarea.selectionEnd;
selText = txtarea.value.substring( startPos, endPos );
// Insert tags
checkSelectedText();
txtarea.value = txtarea.value.substring( 0, startPos ) + tagOpen + selText
+ tagClose + txtarea.value.substring( endPos );
// Set new selection
if ( isSample ) {
txtarea.selectionStart = startPos + tagOpen.length;
txtarea.selectionEnd = startPos + tagOpen.length + selText.length;
} else {
txtarea.selectionStart = startPos + tagOpen.length + selText.length + tagClose.length;
txtarea.selectionEnd = txtarea.selectionStart;
}
// Restore textarea scroll position
txtarea.scrollTop = textScroll;
}
}, // end insertTags
setup: function () {
var placeholder;
if ( $( '#editpage-specialchars' ).length ) {
placeholder = $( '#editpage-specialchars' )[0];
} else {
placeholder = $( '<div id="editpage-specialchars"> </div>' ).prependTo( '.mw-editTools' )[0];
}
if ( !placeholder ) {
return;
}
if ( !window.charinsertDontMove ) {
$( '.editOptions' ).before( placeholder );
}
EditTools.createEditTools( placeholder );
EditTools.enableForAllFields();
window.updateEditTools = function () {
EditTools.createEditTools( $( '#editpage-specialchars' )[0] );
};
}
}; // end EditTools
EditTools.setup();
} );
2260b782d9ed330c14c358ee408cbe248d0ee561
129
2013-11-08T20:51:26Z
Anomie
0
Replace killEvt with jQuery event.preventDefault
javascript
text/javascript
// copied from [[mw:User:Alex Smotrov/edittools.js]], modified for use on the English Wikipedia.
// enableForAllFields() feature from [[commons:MediaWiki:Edittools.js]]
// combined and modified by [[User:Ilmari Karonen]]
// Configuration (to be set from [[Special:MyPage/common.js]]):
// window.charinsertCustom – Object. Merged into the default charinsert list. For example, setting
// this to { Symbols: '‽' } will add the interrobang to the end of the Symbols section.
// window.editToolsRecall – Boolean. Set true to create a recall switch.
// window.charinsertDontMove – Boolean. Set true to leave the box in its default position, rather
// than moving it above the edit summary.
// window.updateEditTools() – Function. Call after updating window.charinsertCustom to regenerate the
// EditTools window.
window.updateEditTools = function () {
};
jQuery( document ).ready( function ( $ ) {
var EditTools = {
// Entries prefixed with ␥ (U+2425 SYMBOL FOR DELETE FORM TWO) will not appear in the article namespace (namespace 0).
// Please make any changes to [[MediaWiki:Edittools]] as well, however, instead of using the ␥ symbol, use {{#ifeq:{{NAMESPACE}}|{{ns:0}}| | }}.
charinsert: {
'Insert': ' – — ° ″ ′ ≈ ≠ ≤ ≥ ± − × ÷ ← → · § ␥Sign_your_posts_on_talk_pages: ␥~~\~~ Cite_your_sources: <ref>+</ref>',
'Wiki markup': 'Insert: – — ° ″ ′ ≈ ≠ ≤ ≥ ± − × ÷ ← → · § ␥~~\~~ <ref>+</ref> Wiki_markup: {\{+}} {\{\{+}}} | [+] [\[+]] [\[Category:+]] #REDIRECT.[\[+]] &nb'+'sp; <s>+</s> <sup>+</sup> <sub>+</sub> <code>+</code> <pre>+</pre> <blockquote>+</blockquote> <ref.name="+"_/> {\{#tag:ref|+|group="nb"|name=""}} {\{Reflist}} <references./> <includeonly>+</includeonly> <noinclude>+</noinclude> {\{DEFAULTSORT:+}} <nowiki>+</nowiki> <!--.+_--> <span.class="plainlinks">+</span>',
'Symbols': '~ | ¡¿†‡↔↑↓•¶#∞ ‘+’ “+” ‹+› «+» ⟨+⟩ ¤₳฿₵¢₡₢$₫₯€₠₣ƒ₴₭₤ℳ₥₦№₧₰£៛₨₪৳₮₩¥ ♠♣♥♦ ♭♯♮ ©®™ ◌ {\{Unicode|+}}',
'Latin': 'A a Á á À à  â Ä ä Ǎ ǎ Ă ă Ā ā à ã Å å Ą ą Æ æ Ǣ ǣ B b C c Ć ć Ċ ċ Ĉ ĉ Č č Ç ç D d Ď ď Đ đ Ḍ ḍ Ð ð E e É é È è Ė ė Ê ê Ë ë Ě ě Ĕ ĕ Ē ē Ẽ ẽ Ę ę Ẹ ẹ Ɛ ɛ Ə ə F f G g Ġ ġ Ĝ ĝ Ğ ğ Ģ ģ H h Ĥ ĥ Ħ ħ Ḥ ḥ I i İ ı Í í Ì ì Î î Ï ï Ǐ ǐ Ĭ ĭ Ī ī Ĩ ĩ Į į Ị ị J j Ĵ ĵ K k Ķ ķ L l Ĺ ĺ Ŀ ŀ Ľ ľ Ļ ļ Ł ł Ḷ ḷ Ḹ ḹ M m Ṃ ṃ N n Ń ń Ň ň Ñ ñ Ņ ņ Ṇ ṇ Ŋ ŋ O o Ó ó Ò ò Ô ô Ö ö Ǒ ǒ Ŏ ŏ Ō ō Õ õ Ǫ ǫ Ọ ọ Ő ő Ø ø Œ œ Ɔ ɔ P p Q q R r Ŕ ŕ Ř ř Ŗ ŗ Ṛ ṛ Ṝ ṝ S s Ś ś Ŝ ŝ Š š Ş ş Ș ș Ṣ ṣ ß T t Ť ť Ţ ţ Ț ț Ṭ ṭ Þ þ U u Ú ú Ù ù Û û Ü ü Ǔ ǔ Ŭ ŭ Ū ū Ũ ũ Ů ů Ų ų Ụ ụ Ű ű Ǘ ǘ Ǜ ǜ Ǚ ǚ Ǖ ǖ V v W w Ŵ ŵ X x Y y Ý ý Ŷ ŷ Ÿ ÿ Ỹ ỹ Ȳ ȳ Z z Ź ź Ż ż Ž ž ß Ð ð Þ þ Ŋ ŋ Ə ə {\{Unicode|+}}',
'Greek': 'ΆάΈέΉήΊίΌόΎύΏώ ΑαΒβΓγΔδ ΕεΖζΗηΘθ ΙιΚκΛλΜμ ΝνΞξΟοΠπ ΡρΣσςΤτΥυ ΦφΧχΨψΩω ᾼᾳᾴᾺὰᾲᾶᾷἈἀᾈᾀἉἁᾉᾁἌἄᾌᾄἊἂᾊᾂἎἆᾎᾆἍἅᾍᾅἋἃᾋᾃἏἇᾏᾇ ῈὲἘἐἙἑἜἔἚἒἝἕἛἓ ῌῃῄῊὴῂῆῇἨἠᾘᾐἩἡᾙᾑἬἤᾜᾔἪἢᾚᾒἮἦᾞᾖἭἥᾝᾕἫἣᾛᾓἯἧᾟᾗ ῚὶῖἸἰἹἱἼἴἺἲἾἶἽἵἻἳἿἷ ῸὸὈὀὉὁὌὄὊὂὍὅὋὃ ῤῬῥ ῪὺῦὐὙὑὔὒὖὝὕὛὓὟὗ ῼῳῴῺὼῲῶῷὨὠᾨᾠὩὡᾩᾡὬὤᾬᾤὪὢᾪᾢὮὦᾮᾦὭὥᾭᾥὫὣᾫᾣὯὧᾯᾧ {\{Polytonic|+}}',
'Cyrillic': 'АаБбВвГг ҐґЃѓДдЂђ ЕеЁёЄєЖж ЗзЅѕИиІі ЇїЙйЈјКк ЌќЛлЉљМм НнЊњОоПп РрСсТтЋћ УуЎўФфХх ЦцЧчЏџШш ЩщЪъЫыЬь ЭэЮюЯя ӘәӨөҒғҖҗ ҚқҜҝҢңҮү ҰұҲҳҸҹҺһ ҔҕӢӣӮӯҘҙ ҠҡҤҥҪҫӐӑ ӒӓӔӕӖӗӰӱ ӲӳӸӹӀ ҞҟҦҧҨҩҬҭ ҴҵҶҷҼҽҾҿ ӁӂӃӄӇӈӋӌ ӚӛӜӝӞӟӠӡ ӤӥӦӧӪӫӴӵ ́',
'Hebrew': 'אבגדהוזחטיךכלםמןנסעףפץצקרשת ׳ ״ װױײ',
'Arabic': ' Transcription: ʾ ṯ ḥ ḫ ẖ ḏ š ṣ ḍ ṭ ẓ ʿ ġ ẗ ا ﺁ ب ت ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع غ ف ق ك ل م ن ه ة و ي ى ء أ إ ؤ ئ',
'IPA (English)': 'ˈ ˌ ŋ ɡ tʃ dʒ ʃ ʒ θ ð ʔ iː ɪ uː ʊ ʌ ɜr eɪ ɛ æ oʊ ɒ ɔː ɔɪ ɔr ɑː ɑr aɪ aʊ ə ər ɨ ɵ ʉ ⟨+⟩ {\{IPAc-en|+}} {\{IPA-en|+}} {\{IPA|/+/}}',
'IPA': 't̪ d̪ ʈɖɟɡɢʡʔ ɸβθðʃʒɕʑʂʐçʝɣχʁħʕʜʢɦ ɱɳɲŋɴ ʋɹɻɰ ʙⱱʀɾɽ ɫɬɮɺɭʎʟ ʍɥɧ ʼ ɓɗʄɠʛ ʘǀǃǂǁ ɨʉɯ ɪʏʊ øɘɵɤ ə ɚ ɛœɜɝɞʌɔ æ ɐɶɑɒ ʰʱʷʲˠˤˀ ᵊ k̚ ⁿˡ ˈˌːˑ t̪ d̪ s̺ s̻ θ̼ s̬ n̥ ŋ̊ a̤ a̰ β̞ ˕ r̝ ˔ o˞ ɚ ɝ e̘ e̙ u̟ i̠ ɪ̈ e̽ ɔ̹ ɔ̜ n̩ ə̆ ə̯ ə̃ ȷ̃ ɫ z̴ ə̋ ə́ ə̄ ə̀ ə̏ ə̌ ə̂ ə᷄ ə᷅ ə᷇ ə᷆ ə᷈ ə᷉ t͡ʃ d͡ʒ t͜ɬ ‿ ˥ ˦ ˧ ˨ ˩ ꜛ ꜜ | ‖ ↗ ↘ k͈ s͎ {\{IPA|+}}',
'Math and logic': '− × ÷ ⋅ ° ∗ ∘ ± ∓ ≤ ≥ ≠ ≡ ≅ ≜ ≝ ≐ ≃ ≈ ⊕ ⊗ ⇐ ⇔ ⇒ ∞ ← ↔ → ≪ ≫ ∝ √ ∤ ≀ ◅ ▻ ⋉ ⋊ ⋈ ∴ ∵ ↦ ¬ ∧ ∨ ⊻ ∀ ∃ ∈ ∉ ∋ ⊆ ⊈ ⊊ ⊂ ⊄ ⊇ ⊉ ⊋ ⊃ ⊅ ∪ ∩ ∑ ∏ ∐ ′ ∫ ∬ ∭ ∮ ∇ ∂ ∆ ∅ ℂ ℍ ℕ ℙ ℚ ℝ ℤ ℵ ⌊ ⌋ ⌈ ⌉ ⊤ ⊥ ⊢ ⊣ ⊧ □ ∠ ⟨ ⟩ {\{frac|+|}} &nb'+'sp; − <math>+</math> {\{math|+}}'
},
charinsertDivider: "\240",
cookieName: 'edittoolscharsubset',
createEditTools: function ( placeholder ) {
var sel, id;
var box = document.createElement( "div" );
var prevSubset = 0, curSubset = 0;
box.id = "editpage-specialchars";
box.title = 'Click on the character or tag to insert it into the edit window';
// append user-defined sets
if ( window.charinsertCustom ) {
for ( id in charinsertCustom ) {
if ( !EditTools.charinsert[id] ) {
EditTools.charinsert[id] = '';
}
}
}
// create drop-down select
sel = document.createElement( 'select' );
for ( id in EditTools.charinsert ) {
sel.options[sel.options.length] = new Option( id, id );
}
sel.selectedIndex = 0;
sel.style.marginRight = '.3em';
sel.title = 'Choose character subset';
sel.onchange = sel.onkeyup = selectSubset;
box.appendChild( sel );
// create "recall" switch
if ( window.editToolsRecall ) {
var recall = document.createElement( 'span' );
recall.appendChild( document.createTextNode( '↕' ) ); // ↔
recall.onclick = function() {
sel.selectedIndex = prevSubset;
selectSubset();
}
with ( recall.style ) {
cssFloat = styleFloat = 'left';
marginRight = '5px';
cursor = 'pointer';
}
box.appendChild( recall );
}
// load latest selection from cookies
try {
var cookieRe = new RegExp( "(?:^|;)\\s*" + EditTools.cookieName + "=(\\d+)\\s*(?:;|$)" );
var m = cookieRe.exec( document.cookie );
if ( m && m.length > 1 && parseInt( m[1] ) < sel.options.length ) {
sel.selectedIndex = parseInt( m[1] );
}
} catch ( err ) {
// ignore
}
placeholder.parentNode.replaceChild( box, placeholder );
selectSubset();
return;
function selectSubset() {
// remember previous (for "recall" button)
prevSubset = curSubset;
curSubset = sel.selectedIndex;
//save into cookies for persistence
try {
var expires = new Date();
expires.setTime( expires.getTime() + 30 * 24 * 60 * 60 * 1000 ); // + 30 days
document.cookie = EditTools.cookieName + "=" + curSubset + ";path=/;expires=" + expires.toUTCString();
} catch ( err ) {
// ignore
}
//hide other subsets
var pp = box.getElementsByTagName( 'p' ) ;
for ( var i = 0; i < pp.length; i++ ) {
pp[i].style.display = 'none';
}
//show/create current subset
var id = sel.options[curSubset].value;
var p = document.getElementById( id );
if ( !p ) {
p = document.createElement( 'p' );
p.id = id;
if ( id == 'Arabic' || id == 'Hebrew' ) {
p.style.fontSize = '120%';
p.dir = 'rtl';
}
var tokens = EditTools.charinsert[id];
if ( window.charinsertCustom && charinsertCustom[id] ) {
if ( tokens.length > 0 ) {
tokens += ' ';
}
tokens += charinsertCustom[id];
}
EditTools.createTokens( p, tokens );
box.appendChild( p );
}
p.style.display = 'inline';
}
},
createTokens: function ( paragraph, str ) {
var tokens = str.split( ' ' ), token, i, n;
for ( i = 0; i < tokens.length; i++ ) {
token = tokens[i];
n = token.indexOf( '+' );
if ( token.charAt( 0 ) === '␥' ) {
if ( token.length > 1 && mw.config.get( 'wgNamespaceNumber' ) === 0 ) {
continue;
} else {
token = token.substring( 1 );
}
}
if ( token == '' || token == '_' ) {
addText( EditTools.charinsertDivider + ' ' );
} else if ( token == '\n' ) {
paragraph.appendChild( document.createElement( 'br' ) );
} else if ( token == '___' ) {
paragraph.appendChild( document.createElement( 'hr' ) );
} else if ( token.charAt( token.length-1 ) == ':' ) { // : at the end means just text
addBold( token );
} else if ( n == 0 ) { // +<tag> -> <tag>+</tag>
addLink( token.substring( 1 ), '</' + token.substring( 2 ), token.substring( 1 ) );
} else if ( n > 0 ) { // <tag>+</tag>
addLink( token.substring( 0, n ), token.substring( n+1 ) );
} else if ( token.length > 2 && token.charCodeAt( 0 ) > 127 ) { // a string of insertable characters
for ( var j = 0; j < token.length; j++ ) {
addLink( token.charAt( j ), '' );
}
} else {
addLink( token, '' );
}
}
return;
function addLink( tagOpen, tagClose, name ) {
var handler;
var dle = tagOpen.indexOf( '\x10' );
if ( dle > 0 ) {
var path = tagOpen.substring( dle + 1 ).split( '.' );
tagOpen = tagOpen.substring( 0, dle );
var handler = window;
for ( var i = 0; i < path.length; i++ ) {
handler = handler[path[i]];
}
} else {
tagOpen = tagOpen.replace( /\./g,' ' );
tagClose = tagClose ? tagClose.replace( /_/g,' ' ) : '';
handler = new Function(
"evt",
"insertTags('" + tagOpen + "', '" + tagClose + "', ''); evt.preventDefault(); return false;"
);
}
var a = document.createElement( 'a' );
name = name || tagOpen + tagClose;
name = name.replace( /\\n/g,'' );
a.appendChild( document.createTextNode( name ) );
a.href = "#";
$( a ).click( handler );
paragraph.appendChild( a );
addText( ' ' );
}
function addBold( text ) {
var b = document.createElement( 'b' );
b.appendChild( document.createTextNode( text.replace( /_/g,' ' ) ) );
paragraph.appendChild( b );
addText( ' ' );
}
function addText( txt ) {
paragraph.appendChild( document.createTextNode( txt ) );
}
},
enableForAllFields: function () {
if ( typeof( insertTags ) != 'function' || window.WikEdInsertTags ) {
return;
}
// insertTags from the site-wide /skins-1.5/common/edit.js just inserts in the first
// textarea in the document. Evidently, that's not good if we have multiple textareas.
// My first idea was to simply add a hidden textarea as the first one, and redefine
// insertTags such that it copied first the last active textareas contents over to that hidden
// field, set the cursor or selection there, let the standard insertTags do its thing, and
// then copy the hidden field's text, cursor position and selection back to the currently
// active field. Unfortunately, that is just as complex as simply copying the whole code
// from wikibits to here and let it work on the right text field in the first place.
var texts = document.getElementsByTagName( 'textarea' );
for ( var i = 0; i < texts.length; i++ ) {
$( texts[i] ).focus( EditTools.registerTextField );
}
// While we're at it, also enable it for input fields
texts = document.getElementsByTagName( 'input' );
for ( var i = 0; i < texts.length; i++ ) {
if ( texts[i].type == 'text' ) {
$( texts[i] ).focus( EditTools.registerTextField );
}
}
insertTags = EditTools.insertTags; // Redefine the global insertTags
},
last_active_textfield: null,
registerTextField: function ( evt ) {
var e = evt || window.event;
var node = e.target || e.srcElement;
if ( !node ) {
return;
}
EditTools.last_active_textfield = node.id;
return true;
},
getTextArea: function () {
var txtarea = null;
if ( EditTools.last_active_textfield && EditTools.last_active_textfield != "" )
txtarea = document.getElementById( EditTools.last_active_textfield );
if ( !txtarea ) {
// Fallback option: old behaviour
if ( document.editform ) {
txtarea = document.editform.wpTextbox1;
} else {
// Some alternate form? Take the first one we can find
txtarea = document.getElementsByTagName( 'textarea' );
if ( txtarea.length > 0 ) {
txtarea = txtarea[0];
} else {
txtarea = null;
}
}
}
return txtarea;
},
insertTags: function ( tagOpen, tagClose, sampleText ) {
var txtarea = EditTools.getTextArea();
if ( !txtarea ) {
return;
}
/* Usability initiative compatibility */
if ( typeof $j != 'undefined' && typeof $j.fn.textSelection != 'undefined' ) {
$j( txtarea ).textSelection(
'encapsulateSelection',
{ 'pre': tagOpen, 'peri': sampleText, 'post': tagClose }
);
return;
}
var selText, isSample = false;
function checkSelectedText() {
if ( !selText ) {
selText = sampleText;
isSample = true;
} else if ( selText.charAt( selText.length - 1 ) == ' ' ) { // Exclude ending space char
selText = selText.substring( 0, selText.length - 1 );
tagClose += ' ';
}
}
if ( document.selection && document.selection.createRange ) { // IE/Opera
// Save window scroll position
var winScroll = 0;
if ( document.documentElement && document.documentElement.scrollTop ) {
winScroll = document.documentElement.scrollTop;
} else if ( document.body ) {
winScroll = document.body.scrollTop;
}
// Get current selection
txtarea.focus();
var range = document.selection.createRange();
selText = range.text;
// Insert tags
checkSelectedText();
range.text = tagOpen + selText + tagClose;
// Mark sample text as selected
if ( isSample && range.moveStart ) {
if ( window.opera ) {
tagClose = tagClose.replace( /\n/g, "" );
}
range.moveStart( 'character', - tagClose.length - selText.length );
range.moveEnd( 'character', - tagClose.length );
}
range.select();
// Restore window scroll position
if ( document.documentElement && document.documentElement.scrollTop ) {
document.documentElement.scrollTop = winScroll;
} else if ( document.body ) {
document.body.scrollTop = winScroll;
}
} else if ( txtarea.selectionStart || txtarea.selectionStart == '0' ) { // Mozilla
// Save textarea scroll position
var textScroll = txtarea.scrollTop;
// Get current selection
txtarea.focus();
var startPos = txtarea.selectionStart;
var endPos = txtarea.selectionEnd;
selText = txtarea.value.substring( startPos, endPos );
// Insert tags
checkSelectedText();
txtarea.value = txtarea.value.substring( 0, startPos ) + tagOpen + selText
+ tagClose + txtarea.value.substring( endPos );
// Set new selection
if ( isSample ) {
txtarea.selectionStart = startPos + tagOpen.length;
txtarea.selectionEnd = startPos + tagOpen.length + selText.length;
} else {
txtarea.selectionStart = startPos + tagOpen.length + selText.length + tagClose.length;
txtarea.selectionEnd = txtarea.selectionStart;
}
// Restore textarea scroll position
txtarea.scrollTop = textScroll;
}
}, // end insertTags
setup: function () {
var placeholder;
if ( $( '#editpage-specialchars' ).length ) {
placeholder = $( '#editpage-specialchars' )[0];
} else {
placeholder = $( '<div id="editpage-specialchars"> </div>' ).prependTo( '.mw-editTools' )[0];
}
if ( !placeholder ) {
return;
}
if ( !window.charinsertDontMove ) {
$( '.editOptions' ).before( placeholder );
}
EditTools.createEditTools( placeholder );
EditTools.enableForAllFields();
window.updateEditTools = function () {
EditTools.createEditTools( $( '#editpage-specialchars' )[0] );
};
}
}; // end EditTools
EditTools.setup();
} );
2260b782d9ed330c14c358ee408cbe248d0ee561
MediaWiki:Gadget-delete
8
104
271
270
2014-01-17T00:04:12Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
[[Wikipedia:Narzędzia/Gadżety administratora#Usuń|Usuń]] – dodanie nowych możliwości do strony ''usuń''.
0ea6458649773ba55afbe93c3d711b9fad8d7d84
270
2009-06-20T18:51:25Z
Karol007
0
typografia (kosmetyka)
wikitext
text/x-wiki
[[Wikipedia:Narzędzia/Gadżety administratora#Usuń|Usuń]] – dodanie nowych możliwości do strony ''usuń''.
0ea6458649773ba55afbe93c3d711b9fad8d7d84
MediaWiki:Gadget-delete-local.js
8
105
273
272
2014-01-17T00:04:12Z
Ffkapa
2
1 wersja
javascript
text/javascript
// ---------------------------------------------------------
// Ustawienia domyślne - przycisków
// ---------------------------------------------------------
window.del$buttons = {
general: {
caption: "",
buttons: new Array(
{
caption: "nieency",
reason: "wpis uznany za [[Wikipedia:Encyklopedyczność|nieencyklopedyczny]]"
},
{
caption: "substub",
reason: "wpis usunięty z powodu [[Pomoc:Jak napisać dobrą definicję|zbyt małej ilości treści]]"
},
{
caption: "eksperyment",
reason: "wpis uznany za eksperyment edycyjny – patrz: [[Pomoc:Pierwsze kroki|pierwsze kroki]]"
},
{
caption: "bełkot",
reason: "wpis usunięty z powodu [[Wikipedia:Wandalizm|niezrozumiałej treści]]"
},
{
caption: "wulgaryzmy",
reason: "wpis usunięty z powodu umieszczonych w nim [[Wikipedia:Wandalizm|wulgaryzmów]]"
},
{
caption: "wygłup",
reason: "wpis usunięty – [[Wikipedia:Wandalizm|wygłup]]"
},
{
caption: "reklama",
reason: "wpis uznany za [[Wikipedia:Spam|reklamę]]"
},
{
caption: "npa",
reason: "wpis usunięty z powodu [[Wikipedia:Prawa autorskie|naruszenia praw autorskich]]"
},
{
caption: "forma",
reason: "wpis usunięty z powodu [[Pomoc:Tworzenie nowych haseł|nieodpowiedniej formy]]"
},
{
caption: "zbędne",
reason: "artykuł zbędny"
},
{
caption: "nazwa",
reason: "nieprawidłowa nazwa"
},
{
caption: "z eka",
reason: "",
visibility: function() { return (deleteGadget.defaultReason.match( del$speedy )) },
callback: function() { deleteGadget.insertReasonEx("", "z [[K:EK|eka]]: $1", del$speedy) }
}
),
visibility: function() { return true; }
},
talk: {
caption: "dyskusja",
buttons: new Array(
{
caption: "forum",
reason: "strona dyskusji to nie forum"
},
{
caption: "problem",
reason: "nie zajmujemy się rozwiązywaniem problemów"
},
{
caption: "sierotka",
reason: "osierocona strona dyskusji"
},
{
caption: "odpowiedziano",
reason: "odpowiedziano na stronie dyskusji użytkownika"
},
{
caption: "załatwione",
reason: "załatwione"
},
{
caption: "bez infoboksu",
reason: "nieaktualny [[Szablon:Bez infoboksu]]"
},
{
caption: "martwy link",
reason: "nieaktualna informacja o martwym linku zewnętrznym"
}
),
visibility: function() { return (wgCanonicalNamespace.match( del$talkNamespace ) ) }
},
file: {
caption: "plik",
buttons: new Array(
{
caption: "przeniesiono",
reason: "przeniesiono do repozytorium mediów [[Wikimedia Commons]]",
callback: function() { deleteGadget.insertReasonEx("przeniesiono do repozytorium mediów [[Wikimedia Commons]]", "przeniesiono do repozytorium mediów [[Wikimedia Commons]] → [[Plik:$1]]", del$nowCommons) }
},
{
caption: "opis",
reason: "usunięto lokalny opis, plik znajduje się w [[Wikimedia Commons]]"
},
{
caption: "npa",
reason: "plik usunięty z powodu [[Wikipedia:Prawa autorskie|naruszenia praw autorskich]]"
},
{
caption: "licencja",
reason: "plik bez określonej licencji"
},
{
caption: "licencja-bd",
reason: "brak danych do licencji – patrz [[Wikipedia:Opisy licencji grafiki]]"
},
{
caption: "nazwa",
reason: "nieinformatywna nazwa pliku – patrz [[Wikipedia:Zasady przesyłania plików|zasady]]"
},
{
caption: "zbędny",
reason: "zbędny/nieużywany plik"
},
{
caption: "dubel",
reason: "dubel"
}
),
visibility: function() { return (wgNamespaceNumber == 6) }
},
redirect: {
caption: "przekierowanie",
buttons: new Array(
{
caption: "zbędne",
reason: "zbędne [[Pomoc:Przekierowanie|przekierowanie]]",
callback: function() { deleteGadget.insertReasonEx("zbędne [[Pomoc:Przekierowanie|przekierowanie]]", "zbędne [[Pomoc:Przekierowanie|przekierowanie]] → [[$1]]", del$redirect) }
},
{
caption: "zerwane",
reason: "zerwane [[Pomoc:Przekierowanie|przekierowanie]]",
callback: function() { deleteGadget.insertReasonEx("zerwane [[Pomoc:Przekierowanie|przekierowanie]]", "zerwane [[Pomoc:Przekierowanie|przekierowanie]] → [[$1]]", del$redirect) }
},
{
caption: "błędne",
reason: "błędne [[Pomoc:Przekierowanie|przekierowanie]]",
callback: function() { deleteGadget.insertReasonEx("błędne [[Pomoc:Przekierowanie|przekierowanie]]", "błędne [[Pomoc:Przekierowanie|przekierowanie]] → [[$1]]", del$redirect) }
}
),
visibility: function() { return (deleteGadget.defaultReason.match( del$redirect )) }
},
cleanup: {
caption: "porządki",
buttons: new Array(
{
caption: "poczekalnia",
reason: "usunięto, decyzja z [[Wikipedia:Poczekalnia|Poczekalni]]"
},
{
caption: "pusta kategoria",
reason: "pusta kategoria"
},
{
caption: "przeniesiono",
reason: "kategoria przeniesiona"
},
{
caption: "dubel",
reason: "dubel"
}
),
visibility: function() { return (wgNamespaceNumber == 14) }
},
user: {
caption: "użytkownik",
buttons: new Array(
{
caption: "na prośbę",
reason: "na prośbę użytkownika / użytkowniczki"
}
),
visibility: function() { return (wgNamespaceNumber == 2) }
}
}
0b7b074956f1da9ba8530be6faf17f20fbbcdef9
272
2013-05-01T08:39:25Z
Rzuwig
0
plik → lokalny opis
javascript
text/javascript
// ---------------------------------------------------------
// Ustawienia domyślne - przycisków
// ---------------------------------------------------------
window.del$buttons = {
general: {
caption: "",
buttons: new Array(
{
caption: "nieency",
reason: "wpis uznany za [[Wikipedia:Encyklopedyczność|nieencyklopedyczny]]"
},
{
caption: "substub",
reason: "wpis usunięty z powodu [[Pomoc:Jak napisać dobrą definicję|zbyt małej ilości treści]]"
},
{
caption: "eksperyment",
reason: "wpis uznany za eksperyment edycyjny – patrz: [[Pomoc:Pierwsze kroki|pierwsze kroki]]"
},
{
caption: "bełkot",
reason: "wpis usunięty z powodu [[Wikipedia:Wandalizm|niezrozumiałej treści]]"
},
{
caption: "wulgaryzmy",
reason: "wpis usunięty z powodu umieszczonych w nim [[Wikipedia:Wandalizm|wulgaryzmów]]"
},
{
caption: "wygłup",
reason: "wpis usunięty – [[Wikipedia:Wandalizm|wygłup]]"
},
{
caption: "reklama",
reason: "wpis uznany za [[Wikipedia:Spam|reklamę]]"
},
{
caption: "npa",
reason: "wpis usunięty z powodu [[Wikipedia:Prawa autorskie|naruszenia praw autorskich]]"
},
{
caption: "forma",
reason: "wpis usunięty z powodu [[Pomoc:Tworzenie nowych haseł|nieodpowiedniej formy]]"
},
{
caption: "zbędne",
reason: "artykuł zbędny"
},
{
caption: "nazwa",
reason: "nieprawidłowa nazwa"
},
{
caption: "z eka",
reason: "",
visibility: function() { return (deleteGadget.defaultReason.match( del$speedy )) },
callback: function() { deleteGadget.insertReasonEx("", "z [[K:EK|eka]]: $1", del$speedy) }
}
),
visibility: function() { return true; }
},
talk: {
caption: "dyskusja",
buttons: new Array(
{
caption: "forum",
reason: "strona dyskusji to nie forum"
},
{
caption: "problem",
reason: "nie zajmujemy się rozwiązywaniem problemów"
},
{
caption: "sierotka",
reason: "osierocona strona dyskusji"
},
{
caption: "odpowiedziano",
reason: "odpowiedziano na stronie dyskusji użytkownika"
},
{
caption: "załatwione",
reason: "załatwione"
},
{
caption: "bez infoboksu",
reason: "nieaktualny [[Szablon:Bez infoboksu]]"
},
{
caption: "martwy link",
reason: "nieaktualna informacja o martwym linku zewnętrznym"
}
),
visibility: function() { return (wgCanonicalNamespace.match( del$talkNamespace ) ) }
},
file: {
caption: "plik",
buttons: new Array(
{
caption: "przeniesiono",
reason: "przeniesiono do repozytorium mediów [[Wikimedia Commons]]",
callback: function() { deleteGadget.insertReasonEx("przeniesiono do repozytorium mediów [[Wikimedia Commons]]", "przeniesiono do repozytorium mediów [[Wikimedia Commons]] → [[Plik:$1]]", del$nowCommons) }
},
{
caption: "opis",
reason: "usunięto lokalny opis, plik znajduje się w [[Wikimedia Commons]]"
},
{
caption: "npa",
reason: "plik usunięty z powodu [[Wikipedia:Prawa autorskie|naruszenia praw autorskich]]"
},
{
caption: "licencja",
reason: "plik bez określonej licencji"
},
{
caption: "licencja-bd",
reason: "brak danych do licencji – patrz [[Wikipedia:Opisy licencji grafiki]]"
},
{
caption: "nazwa",
reason: "nieinformatywna nazwa pliku – patrz [[Wikipedia:Zasady przesyłania plików|zasady]]"
},
{
caption: "zbędny",
reason: "zbędny/nieużywany plik"
},
{
caption: "dubel",
reason: "dubel"
}
),
visibility: function() { return (wgNamespaceNumber == 6) }
},
redirect: {
caption: "przekierowanie",
buttons: new Array(
{
caption: "zbędne",
reason: "zbędne [[Pomoc:Przekierowanie|przekierowanie]]",
callback: function() { deleteGadget.insertReasonEx("zbędne [[Pomoc:Przekierowanie|przekierowanie]]", "zbędne [[Pomoc:Przekierowanie|przekierowanie]] → [[$1]]", del$redirect) }
},
{
caption: "zerwane",
reason: "zerwane [[Pomoc:Przekierowanie|przekierowanie]]",
callback: function() { deleteGadget.insertReasonEx("zerwane [[Pomoc:Przekierowanie|przekierowanie]]", "zerwane [[Pomoc:Przekierowanie|przekierowanie]] → [[$1]]", del$redirect) }
},
{
caption: "błędne",
reason: "błędne [[Pomoc:Przekierowanie|przekierowanie]]",
callback: function() { deleteGadget.insertReasonEx("błędne [[Pomoc:Przekierowanie|przekierowanie]]", "błędne [[Pomoc:Przekierowanie|przekierowanie]] → [[$1]]", del$redirect) }
}
),
visibility: function() { return (deleteGadget.defaultReason.match( del$redirect )) }
},
cleanup: {
caption: "porządki",
buttons: new Array(
{
caption: "poczekalnia",
reason: "usunięto, decyzja z [[Wikipedia:Poczekalnia|Poczekalni]]"
},
{
caption: "pusta kategoria",
reason: "pusta kategoria"
},
{
caption: "przeniesiono",
reason: "kategoria przeniesiona"
},
{
caption: "dubel",
reason: "dubel"
}
),
visibility: function() { return (wgNamespaceNumber == 14) }
},
user: {
caption: "użytkownik",
buttons: new Array(
{
caption: "na prośbę",
reason: "na prośbę użytkownika / użytkowniczki"
}
),
visibility: function() { return (wgNamespaceNumber == 2) }
}
}
0b7b074956f1da9ba8530be6faf17f20fbbcdef9
MediaWiki:Gadget-delete.js
8
106
275
274
2014-01-17T00:04:12Z
Ffkapa
2
1 wersja
javascript
text/javascript
// <nowiki>
// UWAGA! Z tego gadżetu korzystają także inne projekty (Wikisłownik, Wikiźródła)
// Style CSS → [[Mediawiki:Common.css]] ↓
// .userSummaryButtons
window.del$talkNamespace = /(?:talk$|^dyskusja)/i;
window.del$redirect = /#(?:REDIRECT|PATRZ|PRZEKIERUJ|TAM)(?:\s*\[\[(.+?)(\|.*?)?\]\])?/i;
window.del$speedy = /\{\{(?:ek|delete|speedy)\|(?:1=)?(.+?)(?:\}\}|$)/i;
window.del$nowCommons = /\{\{(?:NowCommons|Do commons)\|(?:1=)?(?:Plik:|File:|Image:|Grafika:)?(.+?)\}\}/i;
// ---------------------------------------------------------
// Ustawienia - linkujące oraz historia
// ---------------------------------------------------------
// del_max_links - maksymalna liczba pobieranych linkujących, 0 - nie pobiera
// del_max_versions - maksymalna liczba pobieranych wpisów z historii, 0 - nie pobiera
// del_hardcore - czy włączony jest tryb hardcode?
// del_talk_highlight - czy włączone jest podświetlanie linku do strony dyskusji
// ---------------------------------------------------------
window.deleteGadget = {
version: 3,
loadingLinks: '<b>Wczytywanie linkujących...</b>',
loadingHistory: '<b>Wczytywanie historii zmian...</b>',
noLinks: '<span style="color: green; font-size: larger; font-weight:bold">Brak linkujących</span>',
linksRedirect: 'strona przekierowująca',
linksEmbedded: 'dołączony szablon',
linksHeader: 'Linkujące <span style="font-size: x-small;">(pierwsze $1)</span>',
historyHeader: 'Historia i autorzy <span style="font-size: x-small;">(ostatnie $1)</span>',
showAllCaption: 'pokaż wszystkie',
processLinks: function(data) {
var pages = new Array();
for (var id in data.query.embeddedin) {
var page = data.query.embeddedin[id];
page.embedded = true;
pages.push( page );
}
for (var id in data.query.backlinks) {
var page = data.query.backlinks[id];
pages.push( page );
}
this.addLinks(pages);
},
processImageUsage: function(data) {
var pages = new Array();
for (var id in data.query.imageusage) {
var page = data.query.imageusage[id];
pages.push( page );
}
this.addLinks(pages);
},
addLinks: function(list) {
var container = document.getElementById( 'links_content' );
if (list.length > 0) {
var ul = document.createElement('ul');
var limit = list.length;
if (limit > this.maxLinks)
limit = this.maxLinks;
for (var i = 0; i < limit; i++) {
var page = list[i];
var li = document.createElement('li');
var link = document.createElement('a');
link.title = page.title;
link.href = mw.util.wikiGetlink(page.title);
link.appendChild( document.createTextNode(page.title) );
li.appendChild(link);
var sufix = new Array();
if (typeof(page.redirect) != 'undefined')
sufix.push(this.linksRedirect);
if (page.embedded)
sufix.push(this.linksEmbedded);
if (sufix.length)
li.appendChild( document.createTextNode(" (" + sufix.join(', ') + ")"));
ul.appendChild(li);
}
container.innerHTML = '';
container.appendChild(ul);
return;
}
container.innerHTML = this.noLinks;
},
createButtons: function(parentNode, buttonArray) {
var that = this;
for (var i = 0; i < buttonArray.length; i++)
{
var button = buttonArray[i];
// sprawdzenie czy przycisk ma zostać dodany
if (button.visibility && !button.visibility())
continue;
var newButton = document.createElement('a');
// atrybuty
newButton.title = button.reason;
if (button.callback) {
newButton.onclick = button.callback;
}
else {
newButton.onclick = function() { that.insertReason(this.title) };
}
newButton.appendChild(document.createTextNode(button.caption));
// dodanie przycisku
parentNode.appendChild(newButton);
}
},
createGroup: function(name, group) {
tr = document.createElement('tr');
tr.id = "del_" + name;
td_caption = document.createElement('td');
td_caption.align = 'right';
td_caption.appendChild( document.createTextNode(group.caption) );
tr.appendChild(td_caption);
td_buttons = document.createElement('td');
td_buttons.align = 'left';
td_buttons.className = 'userSummaryButtons';
this.createButtons(td_buttons, group.buttons);
tr.appendChild(td_buttons);
if ( group.visibility() ) {
tr.firstChild.style.fontWeight = 'bold';
}
else {
tr.style.display = 'none';
}
return tr;
},
showAll: function() {
for (var name in del$buttons) {
document.getElementById("del_" + name).style.display = '';
}
document.getElementById("del_general").cells[0].style.visibility = 'hidden';
},
init: function() {
if ( (mw.config.get('wgAction') != "delete" || mw.config.get('wgArticleId') == 0) && mw.config.get('wgCanonicalSpecialPageName') != "Nuke") {
return;
}
this.maxLinks = (typeof(del_max_links) == 'undefined') ? 10 : del_max_links;
this.maxRevisions = (typeof(del_max_versions) == 'undefined') ? 5 : del_max_versions;
this.hardcore = (typeof(del_hardcore) == 'undefined') ? false : del_hardcore;
this.talkHighlight = (typeof(del_talk_highlight) == 'undefined') ? true : del_talk_highlight;
this.defaultReason = '';
var catalk = document.getElementById('ca-talk');
if ( this.talkHighlight && catalk && catalk.className == '') {
catalk.style.textDecoration = 'blink';
catalk.firstChild.style.backgroundColor = 'orange';
}
var wpReason = document.getElementById('wpReason');
if ( wpReason ) {
wpReason.parentNode.align = "left";
wpReason.style.width = "100%";
this.defaultReason = wpReason.value;
var p = new RegExp('(\\?|&)wpReason=');
if (!p.exec(window.location)) {
wpReason.value = '';
}
}
else {
return;
}
var table;
var tr_watch;
if (mw.config.get('wgCanonicalSpecialPageName') == "Nuke") {
var label = wpReason.form.getElementsByTagName("label");
if (!label.length) {
return;
}
table = document.createElement("table");
var row = document.createElement("tr");
var tdLabel = document.createElement("td");
tdLabel.appendChild( document.createTextNode( getInnerText(label[0]) ) );
row.appendChild(tdLabel);
var tdReason = document.createElement("td");
tdReason.appendChild(wpReason);
row.appendChild(tdReason);
table.appendChild(row);
label[0].parentNode.insertBefore(table, label[0]);
label[0].parentNode.removeChild(label[0]);
}
else if (mw.config.get('wgNamespaceNumber') == 6 && !document.getElementById('wpConfirmB')) {
var mwfiledeletesubmit = document.getElementById('mw-filedelete-submit');
tr_watch = mwfiledeletesubmit.parentNode.parentNode;
table = tr_watch.parentNode;
}
else {
var wpWatch = document.getElementById('wpWatch');
if (wpWatch) {
tr_watch = wpWatch.parentNode.parentNode;
table = tr_watch.parentNode;
}
}
for (var name in del$buttons) {
var group = del$buttons[name];
var new_tr = this.createGroup(name, group);
if (name == 'general') {
var newButton = document.createElement('a');
// atrybuty
newButton.appendChild(document.createTextNode(this.showAllCaption));
newButton.onclick = this.showAll;
newButton.style.cursor = 'pointer';
// dodanie przycisku
new_tr.firstChild.appendChild(newButton);
// przywróć normalny styl
new_tr.firstChild.style.fontWeight = 'normal';
}
if (tr_watch) {
table.insertBefore(new_tr, tr_watch);
}
else {
table.appendChild(new_tr);
}
}
if (mw.config.get('wgCanonicalSpecialPageName') == "Nuke") {
return;
}
var bodyContent = document.getElementById('bodyContent');
var deletionlog = document.getElementById('mw-article-delete-deletionlog');
if (this.maxRevisions > 0) {
var history_header = document.createElement('h2');
history_header.innerHTML = this.historyHeader.replace('$1', this.maxRevisions);
bodyContent.insertBefore(history_header, deletionlog);
var history_content = document.createElement('div');
history_content.id = 'history_content';
history_content.innerHTML = this.loadingHistory;
bodyContent.insertBefore(history_content, deletionlog);
jQuery( '#history_content' ).load(
mw.config.get('wgServer') +
mw.config.get('wgScript') +
'?limit=' + this.maxRevisions +
'&title=' + encodeURIComponent(mw.config.get('wgPageName')) +
'&action=history #mw-history-compare'
);
}
if (this.maxLinks > 0) {
var links_header = document.createElement('h2');
links_header.innerHTML = this.linksHeader.replace('$1', this.maxLinks);
bodyContent.insertBefore(links_header, deletionlog);
var links_content = document.createElement('div');
links_content.id = 'links_content';
links_content.className = 'plainlinks';
links_content.innerHTML = this.loadingLinks;
bodyContent.insertBefore(links_content, deletionlog);
var that = this;
if (mw.config.get('wgNamespaceNumber') == 6) { // file
var request = {
action: 'query',
list: 'imageusage',
iulimit: this.maxLinks,
iutitle: mw.config.get('wgPageName'),
format: 'json',
requestid: new Date().getTime()
};
jQuery.getJSON( mw.config.get( 'wgScriptPath' ) + '/api.php', request, function(result) {
that.processImageUsage(result);
});
}
else {
var request = {
action: 'query',
list: 'backlinks|embeddedin',
bllimit: this.maxLinks,
bltitle: mw.config.get('wgPageName'),
eilimit: this.maxLinks,
eititle: mw.config.get('wgPageName'),
format: 'json',
requestid: new Date().getTime()
};
jQuery.getJSON( mw.config.get( 'wgScriptPath' ) + '/api.php', request, function(result) {
that.processLinks(result);
});
}
}
},
insertReason: function(reason) {
var element = document.getElementById('wpReason');
element.value = reason;
if (this.hardcore) {
element.form.submit();
}
},
insertReasonEx: function(reason, reasonFormat, regex) {
var matches = this.defaultReason.match(regex);
if (matches && matches.length > 1 && typeof(matches[1]) != 'undefined') {
return this.insertReason(reasonFormat.replace('$1', matches[1]));
}
else {
return this.insertReason(reason);
}
}
}
jQuery(document).ready(function() {
deleteGadget.init()
});
352868e274c7755f66fb6d8056d7a6406aed0f6f
274
2011-09-04T16:58:48Z
Beau
0
drobne techniczne
javascript
text/javascript
// <nowiki>
// UWAGA! Z tego gadżetu korzystają także inne projekty (Wikisłownik, Wikiźródła)
// Style CSS → [[Mediawiki:Common.css]] ↓
// .userSummaryButtons
window.del$talkNamespace = /(?:talk$|^dyskusja)/i;
window.del$redirect = /#(?:REDIRECT|PATRZ|PRZEKIERUJ|TAM)(?:\s*\[\[(.+?)(\|.*?)?\]\])?/i;
window.del$speedy = /\{\{(?:ek|delete|speedy)\|(?:1=)?(.+?)(?:\}\}|$)/i;
window.del$nowCommons = /\{\{(?:NowCommons|Do commons)\|(?:1=)?(?:Plik:|File:|Image:|Grafika:)?(.+?)\}\}/i;
// ---------------------------------------------------------
// Ustawienia - linkujące oraz historia
// ---------------------------------------------------------
// del_max_links - maksymalna liczba pobieranych linkujących, 0 - nie pobiera
// del_max_versions - maksymalna liczba pobieranych wpisów z historii, 0 - nie pobiera
// del_hardcore - czy włączony jest tryb hardcode?
// del_talk_highlight - czy włączone jest podświetlanie linku do strony dyskusji
// ---------------------------------------------------------
window.deleteGadget = {
version: 3,
loadingLinks: '<b>Wczytywanie linkujących...</b>',
loadingHistory: '<b>Wczytywanie historii zmian...</b>',
noLinks: '<span style="color: green; font-size: larger; font-weight:bold">Brak linkujących</span>',
linksRedirect: 'strona przekierowująca',
linksEmbedded: 'dołączony szablon',
linksHeader: 'Linkujące <span style="font-size: x-small;">(pierwsze $1)</span>',
historyHeader: 'Historia i autorzy <span style="font-size: x-small;">(ostatnie $1)</span>',
showAllCaption: 'pokaż wszystkie',
processLinks: function(data) {
var pages = new Array();
for (var id in data.query.embeddedin) {
var page = data.query.embeddedin[id];
page.embedded = true;
pages.push( page );
}
for (var id in data.query.backlinks) {
var page = data.query.backlinks[id];
pages.push( page );
}
this.addLinks(pages);
},
processImageUsage: function(data) {
var pages = new Array();
for (var id in data.query.imageusage) {
var page = data.query.imageusage[id];
pages.push( page );
}
this.addLinks(pages);
},
addLinks: function(list) {
var container = document.getElementById( 'links_content' );
if (list.length > 0) {
var ul = document.createElement('ul');
var limit = list.length;
if (limit > this.maxLinks)
limit = this.maxLinks;
for (var i = 0; i < limit; i++) {
var page = list[i];
var li = document.createElement('li');
var link = document.createElement('a');
link.title = page.title;
link.href = mw.util.wikiGetlink(page.title);
link.appendChild( document.createTextNode(page.title) );
li.appendChild(link);
var sufix = new Array();
if (typeof(page.redirect) != 'undefined')
sufix.push(this.linksRedirect);
if (page.embedded)
sufix.push(this.linksEmbedded);
if (sufix.length)
li.appendChild( document.createTextNode(" (" + sufix.join(', ') + ")"));
ul.appendChild(li);
}
container.innerHTML = '';
container.appendChild(ul);
return;
}
container.innerHTML = this.noLinks;
},
createButtons: function(parentNode, buttonArray) {
var that = this;
for (var i = 0; i < buttonArray.length; i++)
{
var button = buttonArray[i];
// sprawdzenie czy przycisk ma zostać dodany
if (button.visibility && !button.visibility())
continue;
var newButton = document.createElement('a');
// atrybuty
newButton.title = button.reason;
if (button.callback) {
newButton.onclick = button.callback;
}
else {
newButton.onclick = function() { that.insertReason(this.title) };
}
newButton.appendChild(document.createTextNode(button.caption));
// dodanie przycisku
parentNode.appendChild(newButton);
}
},
createGroup: function(name, group) {
tr = document.createElement('tr');
tr.id = "del_" + name;
td_caption = document.createElement('td');
td_caption.align = 'right';
td_caption.appendChild( document.createTextNode(group.caption) );
tr.appendChild(td_caption);
td_buttons = document.createElement('td');
td_buttons.align = 'left';
td_buttons.className = 'userSummaryButtons';
this.createButtons(td_buttons, group.buttons);
tr.appendChild(td_buttons);
if ( group.visibility() ) {
tr.firstChild.style.fontWeight = 'bold';
}
else {
tr.style.display = 'none';
}
return tr;
},
showAll: function() {
for (var name in del$buttons) {
document.getElementById("del_" + name).style.display = '';
}
document.getElementById("del_general").cells[0].style.visibility = 'hidden';
},
init: function() {
if ( (mw.config.get('wgAction') != "delete" || mw.config.get('wgArticleId') == 0) && mw.config.get('wgCanonicalSpecialPageName') != "Nuke") {
return;
}
this.maxLinks = (typeof(del_max_links) == 'undefined') ? 10 : del_max_links;
this.maxRevisions = (typeof(del_max_versions) == 'undefined') ? 5 : del_max_versions;
this.hardcore = (typeof(del_hardcore) == 'undefined') ? false : del_hardcore;
this.talkHighlight = (typeof(del_talk_highlight) == 'undefined') ? true : del_talk_highlight;
this.defaultReason = '';
var catalk = document.getElementById('ca-talk');
if ( this.talkHighlight && catalk && catalk.className == '') {
catalk.style.textDecoration = 'blink';
catalk.firstChild.style.backgroundColor = 'orange';
}
var wpReason = document.getElementById('wpReason');
if ( wpReason ) {
wpReason.parentNode.align = "left";
wpReason.style.width = "100%";
this.defaultReason = wpReason.value;
var p = new RegExp('(\\?|&)wpReason=');
if (!p.exec(window.location)) {
wpReason.value = '';
}
}
else {
return;
}
var table;
var tr_watch;
if (mw.config.get('wgCanonicalSpecialPageName') == "Nuke") {
var label = wpReason.form.getElementsByTagName("label");
if (!label.length) {
return;
}
table = document.createElement("table");
var row = document.createElement("tr");
var tdLabel = document.createElement("td");
tdLabel.appendChild( document.createTextNode( getInnerText(label[0]) ) );
row.appendChild(tdLabel);
var tdReason = document.createElement("td");
tdReason.appendChild(wpReason);
row.appendChild(tdReason);
table.appendChild(row);
label[0].parentNode.insertBefore(table, label[0]);
label[0].parentNode.removeChild(label[0]);
}
else if (mw.config.get('wgNamespaceNumber') == 6 && !document.getElementById('wpConfirmB')) {
var mwfiledeletesubmit = document.getElementById('mw-filedelete-submit');
tr_watch = mwfiledeletesubmit.parentNode.parentNode;
table = tr_watch.parentNode;
}
else {
var wpWatch = document.getElementById('wpWatch');
if (wpWatch) {
tr_watch = wpWatch.parentNode.parentNode;
table = tr_watch.parentNode;
}
}
for (var name in del$buttons) {
var group = del$buttons[name];
var new_tr = this.createGroup(name, group);
if (name == 'general') {
var newButton = document.createElement('a');
// atrybuty
newButton.appendChild(document.createTextNode(this.showAllCaption));
newButton.onclick = this.showAll;
newButton.style.cursor = 'pointer';
// dodanie przycisku
new_tr.firstChild.appendChild(newButton);
// przywróć normalny styl
new_tr.firstChild.style.fontWeight = 'normal';
}
if (tr_watch) {
table.insertBefore(new_tr, tr_watch);
}
else {
table.appendChild(new_tr);
}
}
if (mw.config.get('wgCanonicalSpecialPageName') == "Nuke") {
return;
}
var bodyContent = document.getElementById('bodyContent');
var deletionlog = document.getElementById('mw-article-delete-deletionlog');
if (this.maxRevisions > 0) {
var history_header = document.createElement('h2');
history_header.innerHTML = this.historyHeader.replace('$1', this.maxRevisions);
bodyContent.insertBefore(history_header, deletionlog);
var history_content = document.createElement('div');
history_content.id = 'history_content';
history_content.innerHTML = this.loadingHistory;
bodyContent.insertBefore(history_content, deletionlog);
jQuery( '#history_content' ).load(
mw.config.get('wgServer') +
mw.config.get('wgScript') +
'?limit=' + this.maxRevisions +
'&title=' + encodeURIComponent(mw.config.get('wgPageName')) +
'&action=history #mw-history-compare'
);
}
if (this.maxLinks > 0) {
var links_header = document.createElement('h2');
links_header.innerHTML = this.linksHeader.replace('$1', this.maxLinks);
bodyContent.insertBefore(links_header, deletionlog);
var links_content = document.createElement('div');
links_content.id = 'links_content';
links_content.className = 'plainlinks';
links_content.innerHTML = this.loadingLinks;
bodyContent.insertBefore(links_content, deletionlog);
var that = this;
if (mw.config.get('wgNamespaceNumber') == 6) { // file
var request = {
action: 'query',
list: 'imageusage',
iulimit: this.maxLinks,
iutitle: mw.config.get('wgPageName'),
format: 'json',
requestid: new Date().getTime()
};
jQuery.getJSON( mw.config.get( 'wgScriptPath' ) + '/api.php', request, function(result) {
that.processImageUsage(result);
});
}
else {
var request = {
action: 'query',
list: 'backlinks|embeddedin',
bllimit: this.maxLinks,
bltitle: mw.config.get('wgPageName'),
eilimit: this.maxLinks,
eititle: mw.config.get('wgPageName'),
format: 'json',
requestid: new Date().getTime()
};
jQuery.getJSON( mw.config.get( 'wgScriptPath' ) + '/api.php', request, function(result) {
that.processLinks(result);
});
}
}
},
insertReason: function(reason) {
var element = document.getElementById('wpReason');
element.value = reason;
if (this.hardcore) {
element.form.submit();
}
},
insertReasonEx: function(reason, reasonFormat, regex) {
var matches = this.defaultReason.match(regex);
if (matches && matches.length > 1 && typeof(matches[1]) != 'undefined') {
return this.insertReason(reasonFormat.replace('$1', matches[1]));
}
else {
return this.insertReason(reason);
}
}
}
jQuery(document).ready(function() {
deleteGadget.init()
});
352868e274c7755f66fb6d8056d7a6406aed0f6f
MediaWiki:Gadget-diffhistory
8
91
241
240
2014-01-16T23:49:20Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Podczas porównywania ostatniej wersji przejrzanej z najnowszą wersją strony pokazuje listę nieoznaczonych wersji, gdy jest ich więcej niż jedna.
3787e43919ddca93fb667e325537409f9df4855f
240
2008-12-23T22:00:14Z
Monopol
0
lit.
wikitext
text/x-wiki
Podczas porównywania ostatniej wersji przejrzanej z najnowszą wersją strony pokazuje listę nieoznaczonych wersji, gdy jest ich więcej niż jedna.
3787e43919ddca93fb667e325537409f9df4855f
MediaWiki:Gadget-diffhistory.js
8
92
243
242
2014-01-16T23:49:20Z
Ffkapa
2
1 wersja
javascript
text/javascript
// source: de:Benutzer:P.Copp/scripts/diffhistory.js
// Zeigt bei Diffs auf nachzusichtenden Seiten eine Übersicht über
// ungesichtete Versionen an.
var diffHistory = {
maxrows : 10,
addHistoryBox : function () {
var d = diffHistory;
//Check if old reviewed page
if (!window.wgStableRevisionId || wgStableRevisionId == wgCurRevisionId) return;
var oldid = document.getElementById('mw-diff-otitle1').firstChild.firstChild.href.match(/&oldid=([^&]*)/)[1];
var curid = document.getElementById('mw-diff-ntitle1').firstChild.firstChild.href.match(/&oldid=([^&]*)/)[1];
if (wgStableRevisionId == oldid && wgCurRevisionId == curid) {
//Check if multi diff
if ($('table.diff td.diff-multi').length === 0) return; //all revisions shown
}
//Create history box above the review form
d.box = document.createElement('fieldset');
var legend = d.el('legend','Nieprzejrzane wersje');
legend.style.padding = 0;
d.box.appendChild(legend);
d.createToggle();
d.box.appendChild(d.history = document.createElement('ul'));
d.history.appendChild(d.el('li','Ładowanie historii...'));
d.box.className = 'portlet pBody diffhistorybox';
d.box.style.width = '95%';
var nav = document.getElementById('jump-to-nav');
nav.parentNode.insertBefore(d.box,nav.nextSibling);
//Fetch history
var url = wgScriptPath + '/api.php?format=json&callback=diffHistory.show&action=query'
+ '&prop=revisions&rvprop=user|timestamp|size|flags|ids|comment&rvendid='
+ (wgStableRevisionId + 1) + '&rvlimit=' + d.maxrows + '&pageids=' + wgArticleId;
importScriptURI(url);
},
tsToLocal : function (ts) {
var m = ts.match(/^(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)Z$/);
var d = new Date(Date.UTC(m[1],m[2]-1,m[3],m[4],m[5],m[6]));
var tzdiff = d.getTimezoneOffset() - (new Date()).getTimezoneOffset();
if (tzdiff) d.setTime(d.getTime() + tzdiff * 60 * 1000);
var hour = d.getHours() < 10 ? '0' + d.getHours() : d.getHours();
var min = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes();
var month = ['stycznia','lutego','marca','kwietnia','maja','czerwca','lipca','sierpnia',
'września','października','listopada','grudnia'][d.getMonth()];
return d.getDate() + ' ' + month + ' ' + d.getFullYear() + ', ' + hour + ':' + min;
},
show : function (res) {
this.history.removeChild(this.history.firstChild);
try {
for (var i in res.query.pages) {
var p = res.query.pages[i];
if (p.revisions) for (j=0;j<p.revisions.length;j++)
this.addEntry(p.revisions[j]);
}
if (res['query-continue']) this.history.appendChild(this.el('li','...'));
}
catch (e) {this.history.appendChild(this.el('li','Błąd przy ładowaniu wersji.'));}
},
addLink : function (node,text,target,postfix) {
var link = this.el('a',text);
link.href = target;
node.appendChild(link);
node.appendChild(document.createTextNode(postfix));
},
addEntry : function (rev) {
var li = this.el('li','(');
this.addLink(li,'bież.','/w/index.php?title=' + encodeURIComponent(wgPageName)
+ '&diff=cur&oldid=' + rev.revid,') (');
this.addLink(li,'poprz.','/w/index.php?title=' + encodeURIComponent(wgPageName)
+ '&diff=prev&oldid=' + rev.revid,') . . ');
this.addLink(li,diffHistory.tsToLocal(rev.timestamp),'/w/index.php?title='
+ encodeURIComponent(wgPageName) + '&oldid=' + rev.revid,' . . ');
var isIp = rev.user.match(/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/);
if (isIp) {
this.addLink(li,rev.user, wgArticlePath.replace(/\$1/g,'Special:Contributions/' + rev.user),' (');
this.addLink(li,'dyskusja', wgArticlePath.replace(/\$1/g,'User talk:' + rev.user),') ');
} else {
this.addLink(li,rev.user, wgArticlePath.replace(/\$1/g,'User:' + rev.user),' (');
this.addLink(li,'dyskusja', wgArticlePath.replace(/\$1/g,'User talk:' + rev.user),' | ');
this.addLink(li,'edycje', wgArticlePath.replace(/\$1/g,'Special:Contributions/' + rev.user),') ');
}
if (rev.minor === '') {
var span = this.el('span','K ');
span.className = 'minor';
li.appendChild(span);
}
if (rev.size) li.appendChild(document.createTextNode('(' + rev.size + ' bajtów) '));
var span = this.el('span','(' + (rev.comment || '') + ')');
span.className = 'comment';
li.appendChild(span);
this.history.appendChild(li);
},
toggle : function () {
var t = this.history.style.display == 'none';
this.history.style.display = t ? 'block' : 'none';
this.togglelink.firstChild.nodeValue = t ? 'Ukryj' : 'Pokaż';
},
createToggle : function () {
var span = this.el('span','[');
this.togglelink = this.el('a','Ukryj');
this.togglelink.href = 'javascript:diffHistory.toggle()';
span.appendChild(this.togglelink);
span.appendChild(document.createTextNode(']'));
span.style.fontSize = 'x-small';
span.style.cssFloat = 'right';
span.style.styleFloat = 'right';
this.box.appendChild(span);
},
el : function (tag,text) {
var el = document.createElement(tag);
el.appendChild(document.createTextNode(text));
return el;
}
};
if (((wgAction == 'view') || (wgAction == 'historysubmit')) && location.search.indexOf('diff=') > -1) jQuery(diffHistory.addHistoryBox);
5faac200a6375ec5957443e081d463b41ad4006f
242
2013-11-07T20:59:25Z
Matma Rex
0
s/addOnloadHook/jQuery/ https://gerrit.wikimedia.org/r/#/c/92457/ przy użyciu [[Project:AWB|AWB]]
javascript
text/javascript
// source: de:Benutzer:P.Copp/scripts/diffhistory.js
// Zeigt bei Diffs auf nachzusichtenden Seiten eine Übersicht über
// ungesichtete Versionen an.
var diffHistory = {
maxrows : 10,
addHistoryBox : function () {
var d = diffHistory;
//Check if old reviewed page
if (!window.wgStableRevisionId || wgStableRevisionId == wgCurRevisionId) return;
var oldid = document.getElementById('mw-diff-otitle1').firstChild.firstChild.href.match(/&oldid=([^&]*)/)[1];
var curid = document.getElementById('mw-diff-ntitle1').firstChild.firstChild.href.match(/&oldid=([^&]*)/)[1];
if (wgStableRevisionId == oldid && wgCurRevisionId == curid) {
//Check if multi diff
if ($('table.diff td.diff-multi').length === 0) return; //all revisions shown
}
//Create history box above the review form
d.box = document.createElement('fieldset');
var legend = d.el('legend','Nieprzejrzane wersje');
legend.style.padding = 0;
d.box.appendChild(legend);
d.createToggle();
d.box.appendChild(d.history = document.createElement('ul'));
d.history.appendChild(d.el('li','Ładowanie historii...'));
d.box.className = 'portlet pBody diffhistorybox';
d.box.style.width = '95%';
var nav = document.getElementById('jump-to-nav');
nav.parentNode.insertBefore(d.box,nav.nextSibling);
//Fetch history
var url = wgScriptPath + '/api.php?format=json&callback=diffHistory.show&action=query'
+ '&prop=revisions&rvprop=user|timestamp|size|flags|ids|comment&rvendid='
+ (wgStableRevisionId + 1) + '&rvlimit=' + d.maxrows + '&pageids=' + wgArticleId;
importScriptURI(url);
},
tsToLocal : function (ts) {
var m = ts.match(/^(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)Z$/);
var d = new Date(Date.UTC(m[1],m[2]-1,m[3],m[4],m[5],m[6]));
var tzdiff = d.getTimezoneOffset() - (new Date()).getTimezoneOffset();
if (tzdiff) d.setTime(d.getTime() + tzdiff * 60 * 1000);
var hour = d.getHours() < 10 ? '0' + d.getHours() : d.getHours();
var min = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes();
var month = ['stycznia','lutego','marca','kwietnia','maja','czerwca','lipca','sierpnia',
'września','października','listopada','grudnia'][d.getMonth()];
return d.getDate() + ' ' + month + ' ' + d.getFullYear() + ', ' + hour + ':' + min;
},
show : function (res) {
this.history.removeChild(this.history.firstChild);
try {
for (var i in res.query.pages) {
var p = res.query.pages[i];
if (p.revisions) for (j=0;j<p.revisions.length;j++)
this.addEntry(p.revisions[j]);
}
if (res['query-continue']) this.history.appendChild(this.el('li','...'));
}
catch (e) {this.history.appendChild(this.el('li','Błąd przy ładowaniu wersji.'));}
},
addLink : function (node,text,target,postfix) {
var link = this.el('a',text);
link.href = target;
node.appendChild(link);
node.appendChild(document.createTextNode(postfix));
},
addEntry : function (rev) {
var li = this.el('li','(');
this.addLink(li,'bież.','/w/index.php?title=' + encodeURIComponent(wgPageName)
+ '&diff=cur&oldid=' + rev.revid,') (');
this.addLink(li,'poprz.','/w/index.php?title=' + encodeURIComponent(wgPageName)
+ '&diff=prev&oldid=' + rev.revid,') . . ');
this.addLink(li,diffHistory.tsToLocal(rev.timestamp),'/w/index.php?title='
+ encodeURIComponent(wgPageName) + '&oldid=' + rev.revid,' . . ');
var isIp = rev.user.match(/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/);
if (isIp) {
this.addLink(li,rev.user, wgArticlePath.replace(/\$1/g,'Special:Contributions/' + rev.user),' (');
this.addLink(li,'dyskusja', wgArticlePath.replace(/\$1/g,'User talk:' + rev.user),') ');
} else {
this.addLink(li,rev.user, wgArticlePath.replace(/\$1/g,'User:' + rev.user),' (');
this.addLink(li,'dyskusja', wgArticlePath.replace(/\$1/g,'User talk:' + rev.user),' | ');
this.addLink(li,'edycje', wgArticlePath.replace(/\$1/g,'Special:Contributions/' + rev.user),') ');
}
if (rev.minor === '') {
var span = this.el('span','K ');
span.className = 'minor';
li.appendChild(span);
}
if (rev.size) li.appendChild(document.createTextNode('(' + rev.size + ' bajtów) '));
var span = this.el('span','(' + (rev.comment || '') + ')');
span.className = 'comment';
li.appendChild(span);
this.history.appendChild(li);
},
toggle : function () {
var t = this.history.style.display == 'none';
this.history.style.display = t ? 'block' : 'none';
this.togglelink.firstChild.nodeValue = t ? 'Ukryj' : 'Pokaż';
},
createToggle : function () {
var span = this.el('span','[');
this.togglelink = this.el('a','Ukryj');
this.togglelink.href = 'javascript:diffHistory.toggle()';
span.appendChild(this.togglelink);
span.appendChild(document.createTextNode(']'));
span.style.fontSize = 'x-small';
span.style.cssFloat = 'right';
span.style.styleFloat = 'right';
this.box.appendChild(span);
},
el : function (tag,text) {
var el = document.createElement(tag);
el.appendChild(document.createTextNode(text));
return el;
}
};
if (((wgAction == 'view') || (wgAction == 'historysubmit')) && location.search.indexOf('diff=') > -1) jQuery(diffHistory.addHistoryBox);
5faac200a6375ec5957443e081d463b41ad4006f
MediaWiki:Gadget-dropdown-menus
8
63
160
159
2014-01-16T16:04:01Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Add page and user options to drop-down menus on the toolbar. Works in Vector, Monobook and Modern skins ([[User:Haza-w/Drop-down menus|documentation]])
d06bf8659f1a3a8a0b12413bab0969fe1858ac77
159
2010-05-31T19:58:26Z
The Earwig
0
change per talk
wikitext
text/x-wiki
Add page and user options to drop-down menus on the toolbar. Works in Vector, Monobook and Modern skins ([[User:Haza-w/Drop-down menus|documentation]])
d06bf8659f1a3a8a0b12413bab0969fe1858ac77
MediaWiki:Gadget-dropdown-menus.css
8
65
164
163
2014-01-16T16:04:01Z
Ffkapa
2
1 wersja
css
text/css
/*********************************************************************
** ***WARNING: GLOBAL GADGET FILE*** **
** any changes to this file will affect many users **
** please discuss changes on the talk page or at **
** [[Wikipedia talk:Gadget]] before editing **
** (consider dropping the script author a note as well...) **
** **
**********************************************************************
** Script: Drop-down menus (CSS) **
** Version: 4.50g **
** Author: Haza-w **
** Documentation: [[User:Haza-w/Drop-down menus]] **
** **
*********************************************************************/
.ca-menu {
background-color: #EEEEEE;
border: 1px solid #AAAAAA;
border-collapse: collapse;
color: #638C9C;
font: 14px/22px Arial, Helvetica, sans-serif;
font-size: 10px;
padding: 0em .8em .3em .5em;
position: absolute;
width: 100px;
z-index: 1000;
}
.ca-menu ul {
line-height: 1.5em;
list-style-image: none;
list-style-type: square;
}
.ca-menu ul li {
margin: 0em;
padding: 0em;
}
.ca-menu ul li a {
color: #002BB8;
text-decoration: none;
}
.ca-menu ul li a:hover {
text-decoration: underline;
}
.ca-menu ul li.ca-disabled {
color: #777777;
cursor: default;
}
fcbf8a42c973614f58927542f60f27d6c34f35c5
163
2010-05-31T11:45:53Z
Decltype
0
updating to latest version, per request of [[User:Haza-w]]
css
text/css
/*********************************************************************
** ***WARNING: GLOBAL GADGET FILE*** **
** any changes to this file will affect many users **
** please discuss changes on the talk page or at **
** [[Wikipedia talk:Gadget]] before editing **
** (consider dropping the script author a note as well...) **
** **
**********************************************************************
** Script: Drop-down menus (CSS) **
** Version: 4.50g **
** Author: Haza-w **
** Documentation: [[User:Haza-w/Drop-down menus]] **
** **
*********************************************************************/
.ca-menu {
background-color: #EEEEEE;
border: 1px solid #AAAAAA;
border-collapse: collapse;
color: #638C9C;
font: 14px/22px Arial, Helvetica, sans-serif;
font-size: 10px;
padding: 0em .8em .3em .5em;
position: absolute;
width: 100px;
z-index: 1000;
}
.ca-menu ul {
line-height: 1.5em;
list-style-image: none;
list-style-type: square;
}
.ca-menu ul li {
margin: 0em;
padding: 0em;
}
.ca-menu ul li a {
color: #002BB8;
text-decoration: none;
}
.ca-menu ul li a:hover {
text-decoration: underline;
}
.ca-menu ul li.ca-disabled {
color: #777777;
cursor: default;
}
fcbf8a42c973614f58927542f60f27d6c34f35c5
MediaWiki:Gadget-dropdown-menus.js
8
64
162
161
2014-01-16T16:04:01Z
Ffkapa
2
1 wersja
javascript
text/javascript
/*********************************************************************
** ***WARNING: GLOBAL GADGET FILE*** **
** any changes to this file will affect many users **
** please discuss changes on the talk page or at **
** [[Wikipedia talk:Gadget]] before editing **
** (consider dropping the script author a note as well...) **
** **
**********************************************************************
** Script: Drop-down menus **
** Version: 4.51g **
** Author: Haza-w **
** Documentation: [[User:Haza-w/Drop-down menus]] **
** **
*********************************************************************/
// "Fail gracefully" if skin not supported
switch (skin) {
case 'modern': case 'monobook': case 'vector':
// Global variables
var _cactions = {
admin: wgUserGroups.join().indexOf('sysop') > -1 ? true : false,
areqs: [],
hovms: skin == 'vector' ? 50 : 400,
menus: [],
mouse: null,
pname: encodeURIComponent(wgPageName),
timer: [],
vectr: skin == 'vector' ? true : false
};
// Process XMLHttpRequests
function xhr(request,url,orsc) {
with (request) {
open('GET',url,true);
onreadystatechange = orsc;
send(null);
}
}
// Find absolute position of element
function findPos(eid,offset) {
var obj = document.getElementById(eid), pos = [0,0];
do with (obj) {
pos[0] += offsetLeft;
pos[1] += offsetTop;
} while (obj = obj.offsetParent);
pos[0] += offset[0]; pos[1] += offset[1];
return pos;
}
// Create menu div element
function createMenu(mid,vectorise,html) {
var menu = document.createElement('div');
with (menu) {
id = 'opt-' + mid;
className = 'ca-menu';
style.display = 'none';
}
menu.onmouseover = function () {showMenu('opt-'+mid)};
menu.onmouseout = function () {hideMenu('opt-'+mid)};
var elements = {
ul: document.createElement('ul'),
li: null,
a: null,
txt: null
};
with (elements) {
for (var i = 0; i < html.length; i++) if (html[i].length) {
li = document.createElement('li'); li.id = html[i][0];
a = document.createElement('a'); a.href = html[i][2];
txt = document.createTextNode(html[i][1]);
a.appendChild(txt); li.appendChild(a); ul.appendChild(li);
}
menu.appendChild(ul);
}
document.body.appendChild(menu);
if (vectorise) createTab(mid);
return 'opt-' + mid;
}
// Create cactions LI tab
function createTab(mid) {
var mtitle = mid.charAt(0).toUpperCase() + mid.substr(1);
if (_cactions.vectr) {
var cid = 'p-' + mid;
var elements = {
div: document.createElement('div'),
h3: document.createElement('h3'),
span: document.createElement('span'),
a: document.createElement('a'),
txt: null
};
with (elements) {
div.id = cid;
div.className = 'vectorMenu extraMenu';
txt = document.createTextNode(mtitle);
span.appendChild(txt); h3.appendChild(span);
a.href = '#';
a.onmouseover = function () {showMenu('opt-'+mid,findPos(cid,[0,40]))};
a.onmouseout = function () {hideMenu('opt-'+mid)};
span = document.createElement('span');
txt = document.createTextNode(mtitle);
span.appendChild(txt); a.appendChild(span); h3.appendChild(a);
div.appendChild(h3);
document.getElementById('right-navigation').insertBefore(div,document.getElementById('p-search'));
}
}
else {
var cid = 'ca-' + mid;
var elements = {
li: document.createElement('li'),
a: document.createElement('a'),
txt: document.createTextNode(mtitle)
};
with (elements) {
li.id = cid;
a.href = '#';
a.onmouseover = function () {showMenu('opt-'+mid,findPos(cid,[-10,20]))};
a.onmouseout = function () {hideMenu('opt-'+mid)};
a.appendChild(txt); li.appendChild(a);
document.getElementById('p-cactions').getElementsByTagName('div')[0].getElementsByTagName('ul')[0].appendChild(li);
}
}
}
// CSS hide elements
function hideElements(elements,conditionals) {
if (typeof(conditionals) == 'undefined') {
for (var i = 0; i < elements.length; i++) if (document.getElementById(elements[i])) document.getElementById(elements[i]).style.display = 'none';
}
else for (var i = 0; i < elements.length; i++) if (document.getElementById(elements[i])) {
document.getElementById(elements[i]).style.display = 'none';
if (conditionals[i]) document.getElementById(conditionals[i]).style.display = 'none';
}
}
// Show/hide menu functions
function showMenu(mid,pos) {
with (_cactions) {
mouse = mid;
if (pos) for (var i = 0; i < menus.length; i++) {
if (timer[menus[i]]) {
clearTimeout(timer[menus[i]]);
timer[menus[i]] = null;
}
if (mid.replace(/-[^-]+$/,'') == menus[i]) continue;
document.getElementById(menus[i]).style.display = 'none';
}
if (!timer[mid]) with (document.getElementById(mid).style) {
display = '';
if (pos) {
left = pos[0]+'px';
top = pos[1]+'px';
}
}
else {
clearTimeout(timer[mid]);
timer[mid] = null;
}
}
}
function hideMenu(mid) {
with (_cactions) {
if (mid == mouse.replace(/-[^-]+$/,'')) timer[mid] = null;
if (timer[mid]) {
timer[mid] = null;
document.getElementById(mid).style.display = 'none';
if (mid == mouse && mid.search(/opt-.*-/) != -1) document.getElementById(mid.replace(/-[^-]+$/,'')).style.display = 'none';
}
else timer[mid] = setTimeout('hideMenu(\''+mid+'\');',hovms);
}
}
// Delink element
function removeLink(eid) {
var element = document.getElementById(eid);
if (!element.getElementsByTagName('a').length) return false;
var a = element.getElementsByTagName('a')[0];
element.appendChild(a.removeChild(a.firstChild));
element.removeChild(a);
element.className = 'ca-disabled';
}
// User options hook
addOnloadHook(function () {
switch (wgNamespaceNumber) {
case 2: case 3: _cactions['uname'] = encodeURIComponent(wgTitle.split('/')[0].replace(/ /g,'_'));
}
if (wgCanonicalSpecialPageName == 'Contributions') for (var i = 0, hl; hl = document.getElementById('contentSub').getElementsByTagName('a')[i]; i++) {
if (hl.href.indexOf('user=') > -1) {
_cactions['uname'] = hl.href.split('user=')[1].split('&')[0];
break;
}
}
if (_cactions.uname) {
with (_cactions) {
menus[menus.length] = createMenu('user',true,Array(
['c-u-logs', 'User logs >', '#'] ,
['c-u-rfx', 'Links to RfX >', '#'] ,
['c-u-blocks', 'Blocks >', '#'] ,
['c-u-contribs', 'Contributions', wgScript+'?title=Special:Contributions/'+uname+'&action=view'] ,
['c-u-editcount', 'Edit count', '//tools.wmflabs.org/xtools/pcount/index.php?lang=en&wiki=wikipedia&name='+uname.replace(/_/g,'+')] ,
['c-u-editsum', 'Edit summaries', '//tools.wmflabs.org/xtools/editsummary/index.php?lang=en&wiki=wikipedia&name='+uname.replace(/_/g,'+')] ,
['c-u-wcuser', 'Edit analysis', 'http://en.wikichecker.com/user/?l=all&t='+uname] ,
['c-u-sul', 'SUL status', '//toolserver.org/~vvv/sulutil.php?user='+uname] ,
['c-u-subpages', 'Userspace', wgScript+'?title=Special:PrefixIndex/User:'+uname+'/&action=view'] ,
['c-u-email', 'Email user', wgScript+'?title=Special:EmailUser/'+uname+'&action=view'] ,
['c-u-groups', 'User groups', wgScript+'?title=Special:ListUsers&action=view&limit=1&username='+uname] ,
['c-u-rightslog', 'Rights changes', wgScript+'?title=Special:Log&action=view&type=rights&page=User:'+uname]
));
menus[menus.length] = createMenu('user-logs',false,Array(
['c-ul-logs', 'All user logs', wgScript+'?title=Special:Log&action=view&user='+uname] ,
['c-ul-blocks', 'Blocks', wgScript+'?title=Special:Log&action=view&type=block&user='+uname] ,
['c-ul-deletes', 'Deletions', wgScript+'?title=Special:Log&action=view&type=delete&user='+uname] ,
['c-ul-moves', 'Moves', wgScript+'?title=Special:Log&action=view&type=move&user='+uname] ,
['c-ul-patrols', 'Patrols', wgScript+'?title=Special:Log&action=view&type=patrol&user='+uname] ,
['c-ul-protects', 'Protections', wgScript+'?title=Special:Log&action=view&type=protect&user='+uname] ,
['c-ul-uploads', 'Uploads', wgScript+'?title=Special:Log&action=view&type=upload&user='+uname] ,
['c-ul-rights', 'User rights', wgScript+'?title=Special:Log&action=view&type=rights&user='+uname]
));
menus[menus.length] = createMenu('user-rfx',false,Array(
['c-ux-rfa', 'RfAs', wgScript+'?title=Special:PrefixIndex/Wikipedia:Requests_for_adminship/'+uname+'&action=view'] ,
['c-ux-rfb', 'RfBs', wgScript+'?title=Special:PrefixIndex/Wikipedia:Requests_for_bureaucratship/'+uname+'&action=view'] ,
['c-ux-rfar', 'RfAr', wgScript+'?title=Wikipedia:Requests_for_arbitration/'+uname+'&action=view'] ,
['c-ux-rfc', 'RfC', wgScript+'?title=Wikipedia:Requests_for_comment/'+uname+'&action=view'] ,
['c-ux-rfcu', 'RfCU', wgScript+'?title=Wikipedia:Requests_for_checkuser/Case/'+uname+'&action=view'] ,
['c-ux-spi', 'SPI', wgScript+'?title=Wikipedia:Sockpuppet_investigations/'+uname+'&action=view']
));
menus[menus.length] = createMenu('user-blocks',false,Array(
admin? ['c-ub-block', 'Block user', wgScript+'?title=Special:BlockIP/'+uname+'&action=view'] :[] ,
admin? ['c-ub-unblock', 'Unblock user', wgScript+'?title=Special:IPBlockList&action=unblock&ip='+uname] :[] ,
['c-ub-ipblock', 'View block', wgScript+'?title=Special:IPBlockList&action=view&ip='+uname] ,
['c-ub-blocklog', 'Block log', wgScript+'?title=Special:Log&action=view&type=block&page=User:'+uname]
));
if (sajax_init_object() && wgEnableAPI) {
if (uname.search(/(?:\d{1,3}\.){3}\d{1,3}/) == 0) {
areqs['ip'] = new sajax_init_object();
xhr(areqs['ip'],wgScriptPath+'/api.php?format=json&action=query&list=blocks&bkusers='+uname+'&bkprop=id&xhr='+Math.random(),function () {
with (areqs['ip']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
if (api.query.blocks.length) {
hideElements(['c-ub-block']);
document.getElementById('c-ub-ipblock').getElementsByTagName('a')[0].style.color = '#EE1111';
}
else {
hideElements(['c-ub-unblock']);
removeLink('c-ub-ipblock');
}
}
} );
}
else {
areqs['user'] = new sajax_init_object();
xhr(areqs['user'],wgScriptPath+'/api.php?format=json&action=query&list=users&ususers='+uname+'&usprop=blockinfo|groups&xhr='+Math.random(),function () {
with (areqs['user']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
with (api.query.users[0]) {
if (typeof(missing) != 'undefined') hideElements(['ca-user']);
else {
if (typeof(blockedby) != 'undefined') {
hideElements(['c-ub-block']);
document.getElementById('c-ub-ipblock').getElementsByTagName('a')[0].style.color = '#EE1111';
}
else {
hideElements(['c-ub-unblock']);
removeLink('c-ub-ipblock');
}
if (typeof(groups) == 'undefined' || groups.join().indexOf('sysop') == -1) hideElements(['c-ul-blocks','c-ul-deletes','c-ul-protects','c-ul-rights']);
}
}
}
} );
areqs['rfa'] = new sajax_init_object();
xhr(areqs['rfa'],wgScriptPath+'/api.php?format=json&action=query&list=allpages&apprefix=Requests_for_adminship%2F'+uname+'&apnamespace=4&aplimit=1&xhr='+Math.random(),function () {
with (areqs['rfa']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
if (!api.query.allpages.length) removeLink('c-ux-rfa');
}
} );
areqs['rfb'] = new sajax_init_object();
xhr(areqs['rfb'],wgScriptPath+'/api.php?format=json&action=query&list=allpages&apprefix=Requests_for_bureaucratship%2F'+uname+'&apnamespace=4&aplimit=1&xhr='+Math.random(),function () {
with (areqs['rfb']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
if (!api.query.allpages.length) removeLink('c-ux-rfb');
}
} );
areqs['uspace'] = new sajax_init_object();
xhr(areqs['uspace'],wgScriptPath+'/api.php?format=json&action=query&list=allpages&apprefix='+uname+'%2F&apnamespace=2&aplimit=1&xhr='+Math.random(),function () {
with (areqs['uspace']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
if (!api.query.allpages.length) removeLink('c-u-subpages');
}
} );
}
areqs['rfx'] = new sajax_init_object();
xhr(areqs['rfx'],wgScriptPath+'/api.php?format=json&action=query&titles=Wikipedia:Requests_for_arbitration/'+uname+'|Wikipedia:Requests_for_comment/'+uname+'|Wikipedia:Requests_for_checkuser/Case/'+uname+'|Wikipedia:Sockpuppet_investigations/'+uname+'&letype=block&letitle=User:'+uname+'&prop=info&xhr='+Math.random(),function () {
with (areqs['rfx']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
for (i in api.query.pages) switch (api.query.pages[i].title.split('/')[0]) {
case 'Wikipedia:Requests for arbitration': if (typeof(api.query.pages[i].missing) != 'undefined') removeLink('c-ux-rfar'); break;
case 'Wikipedia:Requests for comment': if (typeof(api.query.pages[i].missing) != 'undefined') removeLink('c-ux-rfc'); break;
case 'Wikipedia:Requests for checkuser': if (typeof(api.query.pages[i].missing) != 'undefined') removeLink('c-ux-rfcu'); break;
case 'Wikipedia:Sockpuppet investigations': if (typeof(api.query.pages[i].missing) != 'undefined') removeLink('c-ux-spi'); break;
}
}
} );
areqs['ublocks'] = new sajax_init_object();
xhr(areqs['ublocks'],wgScriptPath+'/api.php?format=json&action=query&list=logevents&letype=block&letitle=User:'+uname+'&lelimit=1&xhr='+Math.random(),function () {
with (areqs['ublocks']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
if (!api.query.logevents.length) removeLink('c-ub-blocklog');
}
} );
}
else hideElements(['c-ub-ipblock','c-ul-blocks','c-ul-deletes','c-ul-protects','c-ul-rights']);
}
hideElements(['t-contributions','t-log','t-emailuser']);
document.getElementById('c-u-logs').onmouseover = function () {showMenu('opt-user-logs',findPos('c-u-logs',[40,0]))};
document.getElementById('c-u-logs').onmouseout = function () {hideMenu('opt-user-logs')};
document.getElementById('c-u-logs').style.fontWeight = 'bold';
document.getElementById('c-u-rfx').onmouseover = function () {showMenu('opt-user-rfx',findPos('c-u-rfx',[40,0]))};
document.getElementById('c-u-rfx').onmouseout = function () {hideMenu('opt-user-rfx')};
document.getElementById('c-u-rfx').style.fontWeight = 'bold';
document.getElementById('opt-user-rfx').style.width = '50px';
document.getElementById('c-u-blocks').onmouseover = function () {showMenu('opt-user-blocks',findPos('c-u-blocks',[40,0]))};
document.getElementById('c-u-blocks').onmouseout = function () {hideMenu('opt-user-blocks')};
document.getElementById('c-u-blocks').style.fontWeight = 'bold';
if (_cactions.uname.search(/(?:\d{1,3}\.){3}\d{1,3}/) == 0) hideElements(['c-u-logs','c-ux-rfa','c-ux-rfb','c-u-editcount','c-u-editsum','c-u-wcuser','c-u-subpages','c-u-email','c-u-groups','c-u-rightslog']);
}
} );
// Page options hook
addOnloadHook(function () {
if (!wgCanonicalSpecialPageName) {
with (_cactions) {
menus[menus.length] = createMenu('page',true,Array(
['c-p-logs', 'Page logs >', '#'],
wgArticleId? ['c-p-history', 'History', wgScript+'?title='+pname+'&action=history'] :[] ,
wgArticleId? ['c-p-move', 'Move page', wgScript+'?title=Special:Movepage/'+pname+'&action=view'] :[] ,
!vectr? ['c-p-watch', 'Watch page', wgScript+'?title='+pname+'&action=watch'] :[] ,
!vectr? ['c-p-unwatch', 'Unwatch page', wgScript+'?title='+pname+'&action=unwatch'] :[] ,
admin? ['c-p-protect', 'Protect page', wgScript+'?title='+pname+'&action=protect'] :[] ,
admin? ['c-p-unprotect', 'Unprotect page', wgScript+'?title='+pname+'&action=unprotect'] :[] ,
admin? ['c-p-delete', 'Delete page', wgScript+'?title='+pname+'&action=delete'] :[] ,
admin? ['c-p-undelete', 'Undelete page', wgScript+'?title=Special:Undelete/'+pname+'&action=view'] :[] ,
wgArticleId? ['c-p-diff', 'Latest diff', wgScript+'?title='+pname+'&action=view&diff='+wgCurRevisionId] :[] ,
wgArticleId? ['c-p-editzero', 'Edit intro', wgScript+'?title='+pname+'&action=edit§ion=0'] :[] ,
wgArticleId? ['c-p-wcpage', 'Page analysis', 'http://en.wikichecker.com/article/?a='+pname] :[] ,
['c-p-purge', 'Purge cache', wgScript+'?title='+pname+'&action=purge']
));
menus[menus.length] = createMenu('page-logs',false,Array(
['c-pl-logs', 'All page logs', wgScript+'?title=Special:Log&action=view&page='+pname] ,
['c-pl-deletes', 'Deletion log', wgScript+'?title=Special:Log&type=delete&page='+pname] ,
['c-pl-moves', 'Move log', wgScript+'?title=Special:Log&action=view&type=move&page='+pname] ,
wgArticleId? ['c-pl-patrols', 'Patrol log', wgScript+'?title=Special:Log&action=view&type=patrol&page='+pname] :[] ,
['c-pl-protects', 'Protection log', wgScript+'?title=Special:Log&action=view&type=protect&page='+pname] ,
wgNamespaceNumber == 6? ['c-pl-uploads', 'Upload log', wgScript+'?title=Special:Log&action=view&type=upload&page='+pname] :[]
));
}
hideElements(['ca-protect','ca-unprotect','ca-delete','ca-undelete','ca-history','ca-move'],['c-p-unprotect','c-p-protect','c-p-undelete','p-c-delete']);
if (!_cactions.vectr) hideElements(['ca-watch','ca-unwatch'],['c-p-unwatch','c-p-watch']);
document.getElementById('c-p-logs').onmouseover = function () {showMenu('opt-page-logs',findPos('c-p-logs',[40,0]))};
document.getElementById('c-p-logs').onmouseout = function () {hideMenu('opt-page-logs')};
document.getElementById('c-p-logs').style.fontWeight = 'bold';
}
} );
}
6db68494570a32e091da3f01dd1c06c31914dd65
161
2013-12-06T12:03:36Z
Callanecc
0
Undid revision 584335428 by [[Special:Contributions/Callanecc|Callanecc]] ([[User talk:Callanecc|talk]]): doesn't seem to be working
javascript
text/javascript
/*********************************************************************
** ***WARNING: GLOBAL GADGET FILE*** **
** any changes to this file will affect many users **
** please discuss changes on the talk page or at **
** [[Wikipedia talk:Gadget]] before editing **
** (consider dropping the script author a note as well...) **
** **
**********************************************************************
** Script: Drop-down menus **
** Version: 4.51g **
** Author: Haza-w **
** Documentation: [[User:Haza-w/Drop-down menus]] **
** **
*********************************************************************/
// "Fail gracefully" if skin not supported
switch (skin) {
case 'modern': case 'monobook': case 'vector':
// Global variables
var _cactions = {
admin: wgUserGroups.join().indexOf('sysop') > -1 ? true : false,
areqs: [],
hovms: skin == 'vector' ? 50 : 400,
menus: [],
mouse: null,
pname: encodeURIComponent(wgPageName),
timer: [],
vectr: skin == 'vector' ? true : false
};
// Process XMLHttpRequests
function xhr(request,url,orsc) {
with (request) {
open('GET',url,true);
onreadystatechange = orsc;
send(null);
}
}
// Find absolute position of element
function findPos(eid,offset) {
var obj = document.getElementById(eid), pos = [0,0];
do with (obj) {
pos[0] += offsetLeft;
pos[1] += offsetTop;
} while (obj = obj.offsetParent);
pos[0] += offset[0]; pos[1] += offset[1];
return pos;
}
// Create menu div element
function createMenu(mid,vectorise,html) {
var menu = document.createElement('div');
with (menu) {
id = 'opt-' + mid;
className = 'ca-menu';
style.display = 'none';
}
menu.onmouseover = function () {showMenu('opt-'+mid)};
menu.onmouseout = function () {hideMenu('opt-'+mid)};
var elements = {
ul: document.createElement('ul'),
li: null,
a: null,
txt: null
};
with (elements) {
for (var i = 0; i < html.length; i++) if (html[i].length) {
li = document.createElement('li'); li.id = html[i][0];
a = document.createElement('a'); a.href = html[i][2];
txt = document.createTextNode(html[i][1]);
a.appendChild(txt); li.appendChild(a); ul.appendChild(li);
}
menu.appendChild(ul);
}
document.body.appendChild(menu);
if (vectorise) createTab(mid);
return 'opt-' + mid;
}
// Create cactions LI tab
function createTab(mid) {
var mtitle = mid.charAt(0).toUpperCase() + mid.substr(1);
if (_cactions.vectr) {
var cid = 'p-' + mid;
var elements = {
div: document.createElement('div'),
h3: document.createElement('h3'),
span: document.createElement('span'),
a: document.createElement('a'),
txt: null
};
with (elements) {
div.id = cid;
div.className = 'vectorMenu extraMenu';
txt = document.createTextNode(mtitle);
span.appendChild(txt); h3.appendChild(span);
a.href = '#';
a.onmouseover = function () {showMenu('opt-'+mid,findPos(cid,[0,40]))};
a.onmouseout = function () {hideMenu('opt-'+mid)};
span = document.createElement('span');
txt = document.createTextNode(mtitle);
span.appendChild(txt); a.appendChild(span); h3.appendChild(a);
div.appendChild(h3);
document.getElementById('right-navigation').insertBefore(div,document.getElementById('p-search'));
}
}
else {
var cid = 'ca-' + mid;
var elements = {
li: document.createElement('li'),
a: document.createElement('a'),
txt: document.createTextNode(mtitle)
};
with (elements) {
li.id = cid;
a.href = '#';
a.onmouseover = function () {showMenu('opt-'+mid,findPos(cid,[-10,20]))};
a.onmouseout = function () {hideMenu('opt-'+mid)};
a.appendChild(txt); li.appendChild(a);
document.getElementById('p-cactions').getElementsByTagName('div')[0].getElementsByTagName('ul')[0].appendChild(li);
}
}
}
// CSS hide elements
function hideElements(elements,conditionals) {
if (typeof(conditionals) == 'undefined') {
for (var i = 0; i < elements.length; i++) if (document.getElementById(elements[i])) document.getElementById(elements[i]).style.display = 'none';
}
else for (var i = 0; i < elements.length; i++) if (document.getElementById(elements[i])) {
document.getElementById(elements[i]).style.display = 'none';
if (conditionals[i]) document.getElementById(conditionals[i]).style.display = 'none';
}
}
// Show/hide menu functions
function showMenu(mid,pos) {
with (_cactions) {
mouse = mid;
if (pos) for (var i = 0; i < menus.length; i++) {
if (timer[menus[i]]) {
clearTimeout(timer[menus[i]]);
timer[menus[i]] = null;
}
if (mid.replace(/-[^-]+$/,'') == menus[i]) continue;
document.getElementById(menus[i]).style.display = 'none';
}
if (!timer[mid]) with (document.getElementById(mid).style) {
display = '';
if (pos) {
left = pos[0]+'px';
top = pos[1]+'px';
}
}
else {
clearTimeout(timer[mid]);
timer[mid] = null;
}
}
}
function hideMenu(mid) {
with (_cactions) {
if (mid == mouse.replace(/-[^-]+$/,'')) timer[mid] = null;
if (timer[mid]) {
timer[mid] = null;
document.getElementById(mid).style.display = 'none';
if (mid == mouse && mid.search(/opt-.*-/) != -1) document.getElementById(mid.replace(/-[^-]+$/,'')).style.display = 'none';
}
else timer[mid] = setTimeout('hideMenu(\''+mid+'\');',hovms);
}
}
// Delink element
function removeLink(eid) {
var element = document.getElementById(eid);
if (!element.getElementsByTagName('a').length) return false;
var a = element.getElementsByTagName('a')[0];
element.appendChild(a.removeChild(a.firstChild));
element.removeChild(a);
element.className = 'ca-disabled';
}
// User options hook
addOnloadHook(function () {
switch (wgNamespaceNumber) {
case 2: case 3: _cactions['uname'] = encodeURIComponent(wgTitle.split('/')[0].replace(/ /g,'_'));
}
if (wgCanonicalSpecialPageName == 'Contributions') for (var i = 0, hl; hl = document.getElementById('contentSub').getElementsByTagName('a')[i]; i++) {
if (hl.href.indexOf('user=') > -1) {
_cactions['uname'] = hl.href.split('user=')[1].split('&')[0];
break;
}
}
if (_cactions.uname) {
with (_cactions) {
menus[menus.length] = createMenu('user',true,Array(
['c-u-logs', 'User logs >', '#'] ,
['c-u-rfx', 'Links to RfX >', '#'] ,
['c-u-blocks', 'Blocks >', '#'] ,
['c-u-contribs', 'Contributions', wgScript+'?title=Special:Contributions/'+uname+'&action=view'] ,
['c-u-editcount', 'Edit count', '//tools.wmflabs.org/xtools/pcount/index.php?lang=en&wiki=wikipedia&name='+uname.replace(/_/g,'+')] ,
['c-u-editsum', 'Edit summaries', '//tools.wmflabs.org/xtools/editsummary/index.php?lang=en&wiki=wikipedia&name='+uname.replace(/_/g,'+')] ,
['c-u-wcuser', 'Edit analysis', 'http://en.wikichecker.com/user/?l=all&t='+uname] ,
['c-u-sul', 'SUL status', '//toolserver.org/~vvv/sulutil.php?user='+uname] ,
['c-u-subpages', 'Userspace', wgScript+'?title=Special:PrefixIndex/User:'+uname+'/&action=view'] ,
['c-u-email', 'Email user', wgScript+'?title=Special:EmailUser/'+uname+'&action=view'] ,
['c-u-groups', 'User groups', wgScript+'?title=Special:ListUsers&action=view&limit=1&username='+uname] ,
['c-u-rightslog', 'Rights changes', wgScript+'?title=Special:Log&action=view&type=rights&page=User:'+uname]
));
menus[menus.length] = createMenu('user-logs',false,Array(
['c-ul-logs', 'All user logs', wgScript+'?title=Special:Log&action=view&user='+uname] ,
['c-ul-blocks', 'Blocks', wgScript+'?title=Special:Log&action=view&type=block&user='+uname] ,
['c-ul-deletes', 'Deletions', wgScript+'?title=Special:Log&action=view&type=delete&user='+uname] ,
['c-ul-moves', 'Moves', wgScript+'?title=Special:Log&action=view&type=move&user='+uname] ,
['c-ul-patrols', 'Patrols', wgScript+'?title=Special:Log&action=view&type=patrol&user='+uname] ,
['c-ul-protects', 'Protections', wgScript+'?title=Special:Log&action=view&type=protect&user='+uname] ,
['c-ul-uploads', 'Uploads', wgScript+'?title=Special:Log&action=view&type=upload&user='+uname] ,
['c-ul-rights', 'User rights', wgScript+'?title=Special:Log&action=view&type=rights&user='+uname]
));
menus[menus.length] = createMenu('user-rfx',false,Array(
['c-ux-rfa', 'RfAs', wgScript+'?title=Special:PrefixIndex/Wikipedia:Requests_for_adminship/'+uname+'&action=view'] ,
['c-ux-rfb', 'RfBs', wgScript+'?title=Special:PrefixIndex/Wikipedia:Requests_for_bureaucratship/'+uname+'&action=view'] ,
['c-ux-rfar', 'RfAr', wgScript+'?title=Wikipedia:Requests_for_arbitration/'+uname+'&action=view'] ,
['c-ux-rfc', 'RfC', wgScript+'?title=Wikipedia:Requests_for_comment/'+uname+'&action=view'] ,
['c-ux-rfcu', 'RfCU', wgScript+'?title=Wikipedia:Requests_for_checkuser/Case/'+uname+'&action=view'] ,
['c-ux-spi', 'SPI', wgScript+'?title=Wikipedia:Sockpuppet_investigations/'+uname+'&action=view']
));
menus[menus.length] = createMenu('user-blocks',false,Array(
admin? ['c-ub-block', 'Block user', wgScript+'?title=Special:BlockIP/'+uname+'&action=view'] :[] ,
admin? ['c-ub-unblock', 'Unblock user', wgScript+'?title=Special:IPBlockList&action=unblock&ip='+uname] :[] ,
['c-ub-ipblock', 'View block', wgScript+'?title=Special:IPBlockList&action=view&ip='+uname] ,
['c-ub-blocklog', 'Block log', wgScript+'?title=Special:Log&action=view&type=block&page=User:'+uname]
));
if (sajax_init_object() && wgEnableAPI) {
if (uname.search(/(?:\d{1,3}\.){3}\d{1,3}/) == 0) {
areqs['ip'] = new sajax_init_object();
xhr(areqs['ip'],wgScriptPath+'/api.php?format=json&action=query&list=blocks&bkusers='+uname+'&bkprop=id&xhr='+Math.random(),function () {
with (areqs['ip']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
if (api.query.blocks.length) {
hideElements(['c-ub-block']);
document.getElementById('c-ub-ipblock').getElementsByTagName('a')[0].style.color = '#EE1111';
}
else {
hideElements(['c-ub-unblock']);
removeLink('c-ub-ipblock');
}
}
} );
}
else {
areqs['user'] = new sajax_init_object();
xhr(areqs['user'],wgScriptPath+'/api.php?format=json&action=query&list=users&ususers='+uname+'&usprop=blockinfo|groups&xhr='+Math.random(),function () {
with (areqs['user']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
with (api.query.users[0]) {
if (typeof(missing) != 'undefined') hideElements(['ca-user']);
else {
if (typeof(blockedby) != 'undefined') {
hideElements(['c-ub-block']);
document.getElementById('c-ub-ipblock').getElementsByTagName('a')[0].style.color = '#EE1111';
}
else {
hideElements(['c-ub-unblock']);
removeLink('c-ub-ipblock');
}
if (typeof(groups) == 'undefined' || groups.join().indexOf('sysop') == -1) hideElements(['c-ul-blocks','c-ul-deletes','c-ul-protects','c-ul-rights']);
}
}
}
} );
areqs['rfa'] = new sajax_init_object();
xhr(areqs['rfa'],wgScriptPath+'/api.php?format=json&action=query&list=allpages&apprefix=Requests_for_adminship%2F'+uname+'&apnamespace=4&aplimit=1&xhr='+Math.random(),function () {
with (areqs['rfa']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
if (!api.query.allpages.length) removeLink('c-ux-rfa');
}
} );
areqs['rfb'] = new sajax_init_object();
xhr(areqs['rfb'],wgScriptPath+'/api.php?format=json&action=query&list=allpages&apprefix=Requests_for_bureaucratship%2F'+uname+'&apnamespace=4&aplimit=1&xhr='+Math.random(),function () {
with (areqs['rfb']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
if (!api.query.allpages.length) removeLink('c-ux-rfb');
}
} );
areqs['uspace'] = new sajax_init_object();
xhr(areqs['uspace'],wgScriptPath+'/api.php?format=json&action=query&list=allpages&apprefix='+uname+'%2F&apnamespace=2&aplimit=1&xhr='+Math.random(),function () {
with (areqs['uspace']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
if (!api.query.allpages.length) removeLink('c-u-subpages');
}
} );
}
areqs['rfx'] = new sajax_init_object();
xhr(areqs['rfx'],wgScriptPath+'/api.php?format=json&action=query&titles=Wikipedia:Requests_for_arbitration/'+uname+'|Wikipedia:Requests_for_comment/'+uname+'|Wikipedia:Requests_for_checkuser/Case/'+uname+'|Wikipedia:Sockpuppet_investigations/'+uname+'&letype=block&letitle=User:'+uname+'&prop=info&xhr='+Math.random(),function () {
with (areqs['rfx']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
for (i in api.query.pages) switch (api.query.pages[i].title.split('/')[0]) {
case 'Wikipedia:Requests for arbitration': if (typeof(api.query.pages[i].missing) != 'undefined') removeLink('c-ux-rfar'); break;
case 'Wikipedia:Requests for comment': if (typeof(api.query.pages[i].missing) != 'undefined') removeLink('c-ux-rfc'); break;
case 'Wikipedia:Requests for checkuser': if (typeof(api.query.pages[i].missing) != 'undefined') removeLink('c-ux-rfcu'); break;
case 'Wikipedia:Sockpuppet investigations': if (typeof(api.query.pages[i].missing) != 'undefined') removeLink('c-ux-spi'); break;
}
}
} );
areqs['ublocks'] = new sajax_init_object();
xhr(areqs['ublocks'],wgScriptPath+'/api.php?format=json&action=query&list=logevents&letype=block&letitle=User:'+uname+'&lelimit=1&xhr='+Math.random(),function () {
with (areqs['ublocks']) if (readyState == 4 && status == 200) {
var api = eval('('+responseText+')');
if (!api.query.logevents.length) removeLink('c-ub-blocklog');
}
} );
}
else hideElements(['c-ub-ipblock','c-ul-blocks','c-ul-deletes','c-ul-protects','c-ul-rights']);
}
hideElements(['t-contributions','t-log','t-emailuser']);
document.getElementById('c-u-logs').onmouseover = function () {showMenu('opt-user-logs',findPos('c-u-logs',[40,0]))};
document.getElementById('c-u-logs').onmouseout = function () {hideMenu('opt-user-logs')};
document.getElementById('c-u-logs').style.fontWeight = 'bold';
document.getElementById('c-u-rfx').onmouseover = function () {showMenu('opt-user-rfx',findPos('c-u-rfx',[40,0]))};
document.getElementById('c-u-rfx').onmouseout = function () {hideMenu('opt-user-rfx')};
document.getElementById('c-u-rfx').style.fontWeight = 'bold';
document.getElementById('opt-user-rfx').style.width = '50px';
document.getElementById('c-u-blocks').onmouseover = function () {showMenu('opt-user-blocks',findPos('c-u-blocks',[40,0]))};
document.getElementById('c-u-blocks').onmouseout = function () {hideMenu('opt-user-blocks')};
document.getElementById('c-u-blocks').style.fontWeight = 'bold';
if (_cactions.uname.search(/(?:\d{1,3}\.){3}\d{1,3}/) == 0) hideElements(['c-u-logs','c-ux-rfa','c-ux-rfb','c-u-editcount','c-u-editsum','c-u-wcuser','c-u-subpages','c-u-email','c-u-groups','c-u-rightslog']);
}
} );
// Page options hook
addOnloadHook(function () {
if (!wgCanonicalSpecialPageName) {
with (_cactions) {
menus[menus.length] = createMenu('page',true,Array(
['c-p-logs', 'Page logs >', '#'],
wgArticleId? ['c-p-history', 'History', wgScript+'?title='+pname+'&action=history'] :[] ,
wgArticleId? ['c-p-move', 'Move page', wgScript+'?title=Special:Movepage/'+pname+'&action=view'] :[] ,
!vectr? ['c-p-watch', 'Watch page', wgScript+'?title='+pname+'&action=watch'] :[] ,
!vectr? ['c-p-unwatch', 'Unwatch page', wgScript+'?title='+pname+'&action=unwatch'] :[] ,
admin? ['c-p-protect', 'Protect page', wgScript+'?title='+pname+'&action=protect'] :[] ,
admin? ['c-p-unprotect', 'Unprotect page', wgScript+'?title='+pname+'&action=unprotect'] :[] ,
admin? ['c-p-delete', 'Delete page', wgScript+'?title='+pname+'&action=delete'] :[] ,
admin? ['c-p-undelete', 'Undelete page', wgScript+'?title=Special:Undelete/'+pname+'&action=view'] :[] ,
wgArticleId? ['c-p-diff', 'Latest diff', wgScript+'?title='+pname+'&action=view&diff='+wgCurRevisionId] :[] ,
wgArticleId? ['c-p-editzero', 'Edit intro', wgScript+'?title='+pname+'&action=edit§ion=0'] :[] ,
wgArticleId? ['c-p-wcpage', 'Page analysis', 'http://en.wikichecker.com/article/?a='+pname] :[] ,
['c-p-purge', 'Purge cache', wgScript+'?title='+pname+'&action=purge']
));
menus[menus.length] = createMenu('page-logs',false,Array(
['c-pl-logs', 'All page logs', wgScript+'?title=Special:Log&action=view&page='+pname] ,
['c-pl-deletes', 'Deletion log', wgScript+'?title=Special:Log&type=delete&page='+pname] ,
['c-pl-moves', 'Move log', wgScript+'?title=Special:Log&action=view&type=move&page='+pname] ,
wgArticleId? ['c-pl-patrols', 'Patrol log', wgScript+'?title=Special:Log&action=view&type=patrol&page='+pname] :[] ,
['c-pl-protects', 'Protection log', wgScript+'?title=Special:Log&action=view&type=protect&page='+pname] ,
wgNamespaceNumber == 6? ['c-pl-uploads', 'Upload log', wgScript+'?title=Special:Log&action=view&type=upload&page='+pname] :[]
));
}
hideElements(['ca-protect','ca-unprotect','ca-delete','ca-undelete','ca-history','ca-move'],['c-p-unprotect','c-p-protect','c-p-undelete','p-c-delete']);
if (!_cactions.vectr) hideElements(['ca-watch','ca-unwatch'],['c-p-unwatch','c-p-watch']);
document.getElementById('c-p-logs').onmouseover = function () {showMenu('opt-page-logs',findPos('c-p-logs',[40,0]))};
document.getElementById('c-p-logs').onmouseout = function () {hideMenu('opt-page-logs')};
document.getElementById('c-p-logs').style.fontWeight = 'bold';
}
} );
}
6db68494570a32e091da3f01dd1c06c31914dd65
MediaWiki:Gadget-edit-summaries
8
36
100
99
2014-01-16T13:01:45Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Zielone przyciski do szybkiego wstawiania opisów zmian.
f2babc7828fcf6b13e38612a8fd4385a747e086c
99
2011-10-08T19:01:37Z
Beau
0
[[Wikipedia:Patrolowanie nowych stron|Nowa strona]]: Zielone przyciski do szybkiego wstawiania opisów zmian.
wikitext
text/x-wiki
Zielone przyciski do szybkiego wstawiania opisów zmian.
f2babc7828fcf6b13e38612a8fd4385a747e086c
MediaWiki:Gadget-edit-summaries.js
8
37
102
101
2014-01-16T13:01:45Z
Ffkapa
2
1 wersja
javascript
text/javascript
/*
</pre>
== Automatyczne opisy zmian ==
; Autor (Author): [[:pl:User:Adziura|Adam Dziura]]
; Poprawki (Fixes): [[:pl:User:Nux|Maciej Jaros]]
<pre>
*/
function przyciskiOpis()
{
// stop before starting
if (window.przyciskiOpisDone)
return;
//
// sprawdzenie, czy to jest pole edycji z opisem zmian (nie jest takie jako nagłówek)
var el = document.getElementById('wpSummaryLabel');
if (el)
{
if (el.innerHTML.indexOf('opis zmian')==-1)
return // stop
;
}
else
{
return; // stop
}
//
// dodanie elementu okalającego przyciski bezpośrednio za opisem zmian
var el = document.getElementById('wpSummary').nextSibling;
var opisBtns = document.createElement('span');
opisBtns.id = 'userSummaryButtons'
el.parentNode.insertBefore(document.createElement('br'), el)
el.parentNode.insertBefore(opisBtns, el)
//
// dodanie przycisku specjalnego - do rozwijania skrótów
var btn = przyciskiDodaj(opisBtns, '+rozwiń skróty', 'rozwinSkrotyOpisowZm()', '',
'Rozwiń skróty opisów zmian');
//btn.style.cssText = 'position:absolute; top:0; right:0;';
btn.style.cssText = 'float:right;border-color:#dd0;background-color:#dea';
btn.id = 'btn_opisy_zm_waxon_off'
btn.wax_on = false;
//
// dodawanie przycisków
var kl = ''; // klasa jest niepotrzebna (wszystkie <a> w #userSummaryButtons ustawione poprzez CSS)
if (opisBtns)
{
// drobne różne
przyciskiDodaj(opisBtns, 'ort.', 'dodajOpis("ort.")', kl,
'Poprawiono błąd ortograficzny');
przyciskiDodaj(opisBtns, 'lit.', 'dodajOpis("lit.")', kl,
'Poprawiono literówkę');
przyciskiDodaj(opisBtns, 'int.', 'dodajOpis("int.")', kl,
'Poprawiono interpunkcję');
przyciskiDodaj(opisBtns, 'ogonki', 'dodajOpis("polskie znaki")', kl,
'Poprawa polskich znaków');
// opisBtns.appendChild(document.createTextNode(' ')); // odstęp
// drobne około wikizacyjne
przyciskiDodaj(opisBtns, 'linki-zew', 'dodajOpis("linki zewnętrzne")', kl,
'Poprawiono/dodano linki zewnętrzne');
przyciskiDodaj(opisBtns, 'linki-popr', 'dodajOpis("poprawa linków")', kl,
'Poprawiono linki zewnętrzne/wewnętrzne');
przyciskiDodaj(opisBtns, 'kat.', 'dodajOpis("kat.")', kl,
'Poprawiono/dodano kategorię');
przyciskiDodaj(opisBtns, 'wikizacja', 'dodajOpis("[[Pomoc:Słowniczek#W|wikizacja]]")', kl,
'Wikizacja artykułu (dodanie linków wewnętrznych, podział na sekcje itp.)');
przyciskiDodaj(opisBtns, 'przypisy', 'dodajOpis("źródła/przypisy")', kl,
'Dodanie/poprawienie przypisów lub źródeł');
opisBtns.appendChild(document.createTextNode(' ')); // odstęp
// drobne około techniczne
przyciskiDodaj(opisBtns, 'ujedn.', 'dodajOpis("ujednoznacznienie")', kl,
'Poprawiono/dodano stronę ujednoznaczniającą');
przyciskiDodaj(opisBtns, 'ilustr.', 'dodajOpis("ilustracja")', kl,
'Poprawiono/dodano ilustrację');
przyciskiDodaj(opisBtns, 'szablon', 'dodajOpis("szablon")', kl,
'Poprawiono/dodano szablon');
przyciskiDodaj(opisBtns, 'infobox', 'dodajOpis("infobox")', kl,
'Poprawiono/uzupełniono/dodano infobox');
opisBtns.appendChild(document.createElement('br'));
// drobne inne
przyciskiDodaj(opisBtns, 'dr. meryt.', 'dodajOpis("drobne merytoryczne")', kl,
'Drobne zmiany merytoryczne');
przyciskiDodaj(opisBtns, 'dr. red.', 'dodajOpis("drobne redakcyjne")', kl,
'Drobne zmiany redakcyjne');
przyciskiDodaj(opisBtns, 'dr. tech.', 'dodajOpis("drobne techniczne")', kl,
'Drobne zmiany techniczne');
opisBtns.appendChild(document.createTextNode(' ')); // odstęp
// do użytkownika i około administracyjne
przyciskiDodaj(opisBtns, 'witaj', 'dodajOpis("witaj")', kl,
'Dodano powitanie dla użytkownika');
przyciskiDodaj(opisBtns, 'test', 'dodajOpis("test")', kl,
'Dodano ostrzeżenie dla użytkownika');
przyciskiDodaj(opisBtns, 'npa', 'dodajOpis("[[WP:NPA|NPA]]")', kl,
'Zgłoszono artykuł jako podejrzany o naruszenie praw autorskich');
przyciskiDodaj(opisBtns, 'wer', 'dodajOpis("[[WP:WER|Potrzebne źródło]]")', kl,
'Potrzebne wiarygodne źródło');
przyciskiDodaj(opisBtns, 'dnu', 'dodajOpis("[[Wikipedia:Poczekalnia|Poczekalnia DNU]]")', kl,
'Zgłoszono artykuł do usunięcia');
przyciskiDodaj(opisBtns, 'ek', 'dodajOpis("[[Kategoria:Ekspresowe kasowanie|ek]]")', kl,
'Zgłoszono artykuł do ekspresowego (s)kasowania');
przyciskiDodaj(opisBtns, 'rew.', 'dodajOpis("przywrócenie poprzedniej wersji")', kl,
'przywrócenie poprzedniej wersji');
przyciskiDodaj(opisBtns, 'integracja', 'dodajOpis("integracja (autorzy: [[Wikipedysta:]], [[Wikipedysta:]]...")', kl,
'Integracja artykułu z innym - podaj autorów wklejanego tekstu!');
opisBtns.appendChild(document.createTextNode(' ')); // odstęp
// insze do dyskusji i głosowań
przyciskiDodaj(opisBtns, 'głos', 'dodajOpis("głos")', kl,
'Oddano głos');
przyciskiDodaj(opisBtns, 'komentarz', 'dodajOpis("komentarz")', kl,
'Dodano komentarz w dyskusji lub do głosu');
// odstęp przed własnymi
opisBtns.appendChild(document.createTextNode(' ')); // odstęp
}
}
/*
Parametry:
* elUserBtns - element okalający, do którego dodać przycisk
* pTekst - tekst w środku przycisku
* pAkcja - akcja (w formie tekstowej) jaką wykonać przy naciśnięciu; może być ciągiem poleceń
* pKlasa - klasa jeśli konieczna
* pOpis - opis widoczny w dymku przy przycisku
* zwraca dodany element
*/
window.przyciskiDodaj = function(elUserBtns, pTekst, pAkcja, pKlasa, pOpis)
{
var nowyBtn = document.createElement('a');
// atrybuty
nowyBtn.appendChild(document.createTextNode(pTekst));
nowyBtn.title = pOpis;
if (pKlasa != '')
nowyBtn.className = pKlasa
;
nowyBtn.onclick = new Function(pAkcja);
// dodanie przycisku
elUserBtns.appendChild(nowyBtn);
return nowyBtn;
}
window.dodajOpis = function(opis)
{
var wpS = document.editform.wpSummary;
if (wpS.value != '' && wpS.value.charAt(wpS.value.length-2) != '/')
{
wpS.value += ', ' + opis
}
else
{
wpS.value += opis
}
}
if (mw.config.get('wgAction') == 'edit' || mw.config.get('wgAction') == 'submit')
{
if (mw.config.get('wgNamespaceNumber') > -1)
{
jQuery(document).ready(przyciskiOpis);
}
}
//
// rozwiajanie skrótów do pełnych opisów i z powrotem
window.rozwinSkrotyOpisowZm = function()
{
var els = document.getElementById('userSummaryButtons').getElementsByTagName('a');
for (var i=0; i<els.length; i++)
{
var tit = els[i].title;
els[i].title = els[i].innerHTML;
els[i].innerHTML = tit;
}
var btn = document.getElementById('btn_opisy_zm_waxon_off');
btn.innerHTML = (btn.wax_on == false) ? ' -zwiń skróty' : '+rozwiń skróty';
btn.wax_on = !btn.wax_on;
}
fceed5c206dc85a7875724e93924ee4a663be3d6
101
2013-10-18T16:53:35Z
ToSter
0
-interwiki
javascript
text/javascript
/*
</pre>
== Automatyczne opisy zmian ==
; Autor (Author): [[:pl:User:Adziura|Adam Dziura]]
; Poprawki (Fixes): [[:pl:User:Nux|Maciej Jaros]]
<pre>
*/
function przyciskiOpis()
{
// stop before starting
if (window.przyciskiOpisDone)
return;
//
// sprawdzenie, czy to jest pole edycji z opisem zmian (nie jest takie jako nagłówek)
var el = document.getElementById('wpSummaryLabel');
if (el)
{
if (el.innerHTML.indexOf('opis zmian')==-1)
return // stop
;
}
else
{
return; // stop
}
//
// dodanie elementu okalającego przyciski bezpośrednio za opisem zmian
var el = document.getElementById('wpSummary').nextSibling;
var opisBtns = document.createElement('span');
opisBtns.id = 'userSummaryButtons'
el.parentNode.insertBefore(document.createElement('br'), el)
el.parentNode.insertBefore(opisBtns, el)
//
// dodanie przycisku specjalnego - do rozwijania skrótów
var btn = przyciskiDodaj(opisBtns, '+rozwiń skróty', 'rozwinSkrotyOpisowZm()', '',
'Rozwiń skróty opisów zmian');
//btn.style.cssText = 'position:absolute; top:0; right:0;';
btn.style.cssText = 'float:right;border-color:#dd0;background-color:#dea';
btn.id = 'btn_opisy_zm_waxon_off'
btn.wax_on = false;
//
// dodawanie przycisków
var kl = ''; // klasa jest niepotrzebna (wszystkie <a> w #userSummaryButtons ustawione poprzez CSS)
if (opisBtns)
{
// drobne różne
przyciskiDodaj(opisBtns, 'ort.', 'dodajOpis("ort.")', kl,
'Poprawiono błąd ortograficzny');
przyciskiDodaj(opisBtns, 'lit.', 'dodajOpis("lit.")', kl,
'Poprawiono literówkę');
przyciskiDodaj(opisBtns, 'int.', 'dodajOpis("int.")', kl,
'Poprawiono interpunkcję');
przyciskiDodaj(opisBtns, 'ogonki', 'dodajOpis("polskie znaki")', kl,
'Poprawa polskich znaków');
// opisBtns.appendChild(document.createTextNode(' ')); // odstęp
// drobne około wikizacyjne
przyciskiDodaj(opisBtns, 'linki-zew', 'dodajOpis("linki zewnętrzne")', kl,
'Poprawiono/dodano linki zewnętrzne');
przyciskiDodaj(opisBtns, 'linki-popr', 'dodajOpis("poprawa linków")', kl,
'Poprawiono linki zewnętrzne/wewnętrzne');
przyciskiDodaj(opisBtns, 'kat.', 'dodajOpis("kat.")', kl,
'Poprawiono/dodano kategorię');
przyciskiDodaj(opisBtns, 'wikizacja', 'dodajOpis("[[Pomoc:Słowniczek#W|wikizacja]]")', kl,
'Wikizacja artykułu (dodanie linków wewnętrznych, podział na sekcje itp.)');
przyciskiDodaj(opisBtns, 'przypisy', 'dodajOpis("źródła/przypisy")', kl,
'Dodanie/poprawienie przypisów lub źródeł');
opisBtns.appendChild(document.createTextNode(' ')); // odstęp
// drobne około techniczne
przyciskiDodaj(opisBtns, 'ujedn.', 'dodajOpis("ujednoznacznienie")', kl,
'Poprawiono/dodano stronę ujednoznaczniającą');
przyciskiDodaj(opisBtns, 'ilustr.', 'dodajOpis("ilustracja")', kl,
'Poprawiono/dodano ilustrację');
przyciskiDodaj(opisBtns, 'szablon', 'dodajOpis("szablon")', kl,
'Poprawiono/dodano szablon');
przyciskiDodaj(opisBtns, 'infobox', 'dodajOpis("infobox")', kl,
'Poprawiono/uzupełniono/dodano infobox');
opisBtns.appendChild(document.createElement('br'));
// drobne inne
przyciskiDodaj(opisBtns, 'dr. meryt.', 'dodajOpis("drobne merytoryczne")', kl,
'Drobne zmiany merytoryczne');
przyciskiDodaj(opisBtns, 'dr. red.', 'dodajOpis("drobne redakcyjne")', kl,
'Drobne zmiany redakcyjne');
przyciskiDodaj(opisBtns, 'dr. tech.', 'dodajOpis("drobne techniczne")', kl,
'Drobne zmiany techniczne');
opisBtns.appendChild(document.createTextNode(' ')); // odstęp
// do użytkownika i około administracyjne
przyciskiDodaj(opisBtns, 'witaj', 'dodajOpis("witaj")', kl,
'Dodano powitanie dla użytkownika');
przyciskiDodaj(opisBtns, 'test', 'dodajOpis("test")', kl,
'Dodano ostrzeżenie dla użytkownika');
przyciskiDodaj(opisBtns, 'npa', 'dodajOpis("[[WP:NPA|NPA]]")', kl,
'Zgłoszono artykuł jako podejrzany o naruszenie praw autorskich');
przyciskiDodaj(opisBtns, 'wer', 'dodajOpis("[[WP:WER|Potrzebne źródło]]")', kl,
'Potrzebne wiarygodne źródło');
przyciskiDodaj(opisBtns, 'dnu', 'dodajOpis("[[Wikipedia:Poczekalnia|Poczekalnia DNU]]")', kl,
'Zgłoszono artykuł do usunięcia');
przyciskiDodaj(opisBtns, 'ek', 'dodajOpis("[[Kategoria:Ekspresowe kasowanie|ek]]")', kl,
'Zgłoszono artykuł do ekspresowego (s)kasowania');
przyciskiDodaj(opisBtns, 'rew.', 'dodajOpis("przywrócenie poprzedniej wersji")', kl,
'przywrócenie poprzedniej wersji');
przyciskiDodaj(opisBtns, 'integracja', 'dodajOpis("integracja (autorzy: [[Wikipedysta:]], [[Wikipedysta:]]...")', kl,
'Integracja artykułu z innym - podaj autorów wklejanego tekstu!');
opisBtns.appendChild(document.createTextNode(' ')); // odstęp
// insze do dyskusji i głosowań
przyciskiDodaj(opisBtns, 'głos', 'dodajOpis("głos")', kl,
'Oddano głos');
przyciskiDodaj(opisBtns, 'komentarz', 'dodajOpis("komentarz")', kl,
'Dodano komentarz w dyskusji lub do głosu');
// odstęp przed własnymi
opisBtns.appendChild(document.createTextNode(' ')); // odstęp
}
}
/*
Parametry:
* elUserBtns - element okalający, do którego dodać przycisk
* pTekst - tekst w środku przycisku
* pAkcja - akcja (w formie tekstowej) jaką wykonać przy naciśnięciu; może być ciągiem poleceń
* pKlasa - klasa jeśli konieczna
* pOpis - opis widoczny w dymku przy przycisku
* zwraca dodany element
*/
window.przyciskiDodaj = function(elUserBtns, pTekst, pAkcja, pKlasa, pOpis)
{
var nowyBtn = document.createElement('a');
// atrybuty
nowyBtn.appendChild(document.createTextNode(pTekst));
nowyBtn.title = pOpis;
if (pKlasa != '')
nowyBtn.className = pKlasa
;
nowyBtn.onclick = new Function(pAkcja);
// dodanie przycisku
elUserBtns.appendChild(nowyBtn);
return nowyBtn;
}
window.dodajOpis = function(opis)
{
var wpS = document.editform.wpSummary;
if (wpS.value != '' && wpS.value.charAt(wpS.value.length-2) != '/')
{
wpS.value += ', ' + opis
}
else
{
wpS.value += opis
}
}
if (mw.config.get('wgAction') == 'edit' || mw.config.get('wgAction') == 'submit')
{
if (mw.config.get('wgNamespaceNumber') > -1)
{
jQuery(document).ready(przyciskiOpis);
}
}
//
// rozwiajanie skrótów do pełnych opisów i z powrotem
window.rozwinSkrotyOpisowZm = function()
{
var els = document.getElementById('userSummaryButtons').getElementsByTagName('a');
for (var i=0; i<els.length; i++)
{
var tit = els[i].title;
els[i].title = els[i].innerHTML;
els[i].innerHTML = tit;
}
var btn = document.getElementById('btn_opisy_zm_waxon_off');
btn.innerHTML = (btn.wax_on == false) ? ' -zwiń skróty' : '+rozwiń skróty';
btn.wax_on = !btn.wax_on;
}
fceed5c206dc85a7875724e93924ee4a663be3d6
MediaWiki:Gadget-editform-ui-fixes
8
34
94
93
2014-01-16T12:51:16Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Uporządkowany interfejs pod polem edycji
e4e674ffb275df0275ec0bafab25421bb8618a66
93
2013-08-23T18:11:32Z
Yarl
0
opis
wikitext
text/x-wiki
Uporządkowany interfejs pod polem edycji
e4e674ffb275df0275ec0bafab25421bb8618a66
MediaWiki:Gadget-editform-ui-fixes.css
8
35
96
95
2014-01-16T12:51:16Z
Ffkapa
2
1 wersja
css
text/css
/* drobne poprawki wyglądu gadżetu MatmaRexa */
#editform #plwiki-edittools {
margin: 0;
border: solid 1px #cccccc;
border-top: 0;
}
#plwiki-edittools .plwiki-edittools-section p a {
font-family: monospace;
font-size: 12px;
}
/* porządki pod polem edycji */
.editOptions {
background-color: #f7f7f7;
margin-bottom: 1em;
border: solid 1px #cccccc;
border-top: none;
border-radius: 0 0 0.25em 0.25em;
min-height: 2.25em;
padding: 1em 1em 1.5em 1em;
font-size: 95%;
}
.editOptions #wpSummaryLabel {
display: block;
margin: 0;
}
.editOptions #wpSummary {
background-color: #fff;
border: 1px solid #aaa;
padding: 5px;
margin-bottom: 5px;
border-radius: 0.3em;
}
#userSummaryButtons a {
background: #f9f9f9;
border: 1px solid #aaa;
padding: 1px 3px;
margin: 0 4px 0 0;
line-height: 22px;
font-size: 90%;
border-radius: 0.25em;
filter: progid:DXImageTransform.Microsoft.gradient( GradientType=0,startColorstr=#ffffff,endColorstr=#f0f0f0 );
background-image: -webkit-gradient( linear,right top,right bottom,color-stop(0%,#ffffff),color-stop(100%,#f0f0f0) );
background-image: -webkit-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: -moz-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: -ms-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: -o-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
}
#userSummaryButtons a:hover {
background: #ebebeb;
border: 1px solid #aaa;
text-decoration:none;
}
.editOptions .editCheckboxes {
margin-top: 1em;
}
.editOptions .editButtons {
margin-top: 1em;
}
.editOptions .editButtons input {
margin: 0.1em 0.3em 0.1em 0;
padding: 0.5em 0.75em;
border-radius: 0.3em;
vertical-align: top;
color: #333;
text-shadow: 0 1px 1px rgba(255,255,255,0.5);
box-shadow: 0 0.1em 0.25em rgba(0,0,0,0.1);
text-align: center;
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transition: border-color 100ms;
-moz-transition: border-color 100ms;
-ms-transition: border-color 100ms;
-o-transition: border-color 100ms;
transition: border-color 100ms;
border: 1px #c9c9c9 solid;
background-color: #ffffff;
filter: progid:DXImageTransform.Microsoft.gradient( GradientType=0,startColorstr=#ffffff,endColorstr=#f0f0f0 );
background-image: -webkit-gradient( linear,right top,right bottom,color-stop(0%,#ffffff),color-stop(100%,#f0f0f0) );
background-image: -webkit-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: -moz-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: -ms-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: -o-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
}
.editOptions .editButtons input:hover {
border-color: #aaa;
}
.editOptions .editButtons .cancelLink, .mw-editTools, #btn_opisy_zm_waxon_off {
display: none;
}
.editOptions .editButtons .editHelp {
float: right;
line-height: 1.9em;
padding: 10px;
}
.editOptions #wpSave {
border: solid 1px #c3e59a;
background-color: #f0fbe1;
filter: progid:DXImageTransform.Microsoft.gradient( GradientType=0,startColorstr=#f0fbe1,endColorstr=#c3e59a );
background-image: -webkit-gradient( linear,right top,right bottom,color-stop(0%,#f0fbe1),color-stop(100%,#c3e59a) );
background-image: -webkit-linear-gradient(top,#f0fbe1 0%,#c3e59a 100%);
background-image: -moz-linear-gradient(top,#f0fbe1 0%,#c3e59a 100%);
background-image: -ms-linear-gradient(top,#f0fbe1 0%,#c3e59a 100%);
background-image: -o-linear-gradient(top,#f0fbe1 0%,#c3e59a 100%);
background-image: linear-gradient(top,#f0fbe1 0%,#c3e59a 100%);
min-width: 150px;
font-weight: bold;
}
.editOptions #wpSave:hover {
border-color: #a6cf74;
}
61133298b09e151b05e8d2908425d359064c6978
95
2013-09-02T20:01:23Z
Yarl
0
poprawka
css
text/css
/* drobne poprawki wyglądu gadżetu MatmaRexa */
#editform #plwiki-edittools {
margin: 0;
border: solid 1px #cccccc;
border-top: 0;
}
#plwiki-edittools .plwiki-edittools-section p a {
font-family: monospace;
font-size: 12px;
}
/* porządki pod polem edycji */
.editOptions {
background-color: #f7f7f7;
margin-bottom: 1em;
border: solid 1px #cccccc;
border-top: none;
border-radius: 0 0 0.25em 0.25em;
min-height: 2.25em;
padding: 1em 1em 1.5em 1em;
font-size: 95%;
}
.editOptions #wpSummaryLabel {
display: block;
margin: 0;
}
.editOptions #wpSummary {
background-color: #fff;
border: 1px solid #aaa;
padding: 5px;
margin-bottom: 5px;
border-radius: 0.3em;
}
#userSummaryButtons a {
background: #f9f9f9;
border: 1px solid #aaa;
padding: 1px 3px;
margin: 0 4px 0 0;
line-height: 22px;
font-size: 90%;
border-radius: 0.25em;
filter: progid:DXImageTransform.Microsoft.gradient( GradientType=0,startColorstr=#ffffff,endColorstr=#f0f0f0 );
background-image: -webkit-gradient( linear,right top,right bottom,color-stop(0%,#ffffff),color-stop(100%,#f0f0f0) );
background-image: -webkit-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: -moz-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: -ms-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: -o-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
}
#userSummaryButtons a:hover {
background: #ebebeb;
border: 1px solid #aaa;
text-decoration:none;
}
.editOptions .editCheckboxes {
margin-top: 1em;
}
.editOptions .editButtons {
margin-top: 1em;
}
.editOptions .editButtons input {
margin: 0.1em 0.3em 0.1em 0;
padding: 0.5em 0.75em;
border-radius: 0.3em;
vertical-align: top;
color: #333;
text-shadow: 0 1px 1px rgba(255,255,255,0.5);
box-shadow: 0 0.1em 0.25em rgba(0,0,0,0.1);
text-align: center;
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transition: border-color 100ms;
-moz-transition: border-color 100ms;
-ms-transition: border-color 100ms;
-o-transition: border-color 100ms;
transition: border-color 100ms;
border: 1px #c9c9c9 solid;
background-color: #ffffff;
filter: progid:DXImageTransform.Microsoft.gradient( GradientType=0,startColorstr=#ffffff,endColorstr=#f0f0f0 );
background-image: -webkit-gradient( linear,right top,right bottom,color-stop(0%,#ffffff),color-stop(100%,#f0f0f0) );
background-image: -webkit-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: -moz-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: -ms-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: -o-linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
background-image: linear-gradient(top,#ffffff 0%,#f0f0f0 100%);
}
.editOptions .editButtons input:hover {
border-color: #aaa;
}
.editOptions .editButtons .cancelLink, .mw-editTools, #btn_opisy_zm_waxon_off {
display: none;
}
.editOptions .editButtons .editHelp {
float: right;
line-height: 1.9em;
padding: 10px;
}
.editOptions #wpSave {
border: solid 1px #c3e59a;
background-color: #f0fbe1;
filter: progid:DXImageTransform.Microsoft.gradient( GradientType=0,startColorstr=#f0fbe1,endColorstr=#c3e59a );
background-image: -webkit-gradient( linear,right top,right bottom,color-stop(0%,#f0fbe1),color-stop(100%,#c3e59a) );
background-image: -webkit-linear-gradient(top,#f0fbe1 0%,#c3e59a 100%);
background-image: -moz-linear-gradient(top,#f0fbe1 0%,#c3e59a 100%);
background-image: -ms-linear-gradient(top,#f0fbe1 0%,#c3e59a 100%);
background-image: -o-linear-gradient(top,#f0fbe1 0%,#c3e59a 100%);
background-image: linear-gradient(top,#f0fbe1 0%,#c3e59a 100%);
min-width: 150px;
font-weight: bold;
}
.editOptions #wpSave:hover {
border-color: #a6cf74;
}
61133298b09e151b05e8d2908425d359064c6978
MediaWiki:Gadget-edittop
8
56
146
145
2014-01-16T15:54:39Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Add an [edit] link for the [[Wikipedia:Lead section|lead section]] of a page
5e2a848d29b765a0bde9750e91b3068425aec59f
145
2008-03-06T07:06:44Z
Remember the dot
0
use consistent terminology
wikitext
text/x-wiki
Add an [edit] link for the [[Wikipedia:Lead section|lead section]] of a page
5e2a848d29b765a0bde9750e91b3068425aec59f
MediaWiki:Gadget-edittop.css
8
58
150
149
2014-01-16T15:54:39Z
Ffkapa
2
1 wersja
css
text/css
/* @noflip */
body.ltr .mw-editsection-expanded .mw-editsection-bracket:first-of-type,
body.rtl .mw-editsection-expanded .mw-editsection-bracket:not(:first-of-type) {
margin-left: -0.25em;
margin-right: 0.25em;
color: #555;
}
/* @noflip */
body.rtl .mw-editsection-expanded .mw-editsection-bracket:first-of-type,
body.ltr .mw-editsection-expanded .mw-editsection-bracket:not(:first-of-type) {
margin-right: -0.25em;
margin-left: 0.25em;
color: #555;
}
0881d628b37506212922bb9b38bd6cbca8d1e0d1
149
2013-09-17T08:49:49Z
MSGJ
0
+
css
text/css
/* @noflip */
body.ltr .mw-editsection-expanded .mw-editsection-bracket:first-of-type,
body.rtl .mw-editsection-expanded .mw-editsection-bracket:not(:first-of-type) {
margin-left: -0.25em;
margin-right: 0.25em;
color: #555;
}
/* @noflip */
body.rtl .mw-editsection-expanded .mw-editsection-bracket:first-of-type,
body.ltr .mw-editsection-expanded .mw-editsection-bracket:not(:first-of-type) {
margin-right: -0.25em;
margin-left: 0.25em;
color: #555;
}
0881d628b37506212922bb9b38bd6cbca8d1e0d1
MediaWiki:Gadget-edittop.js
8
57
148
147
2014-01-16T15:54:39Z
Ffkapa
2
1 wersja
javascript
text/javascript
// **********************************************************************
// ** ***WARNING GLOBAL GADGET FILE*** **
// ** changes to this file affect many users. **
// ** please discuss on the talk page before editing **
// ** **
// **********************************************************************
// Imported from [[User:Alex Smotrov/edittop.js]], version as of: 2007-06-19T04:28:52
// Updated from [[User:TheDJ/Gadget-edittop.js]], version as of: 2009-04-28T11:54:22
if ($.inArray( mw.config.get('wgAction'), [ 'view', 'purge' ]) !== -1 && mw.config.get( 'wgNamespaceNumber' ) >=0) {
$(function edittop_hook () {
var localtitles = {
cs: 'Editovat úvodní sekci',
en: 'Edit lead section',
fa: 'ویرایش بخش آغازین',
fr: 'Modifier le résumé introductif',
id: 'Sunting bagian atas',
it: 'Modifica della sezione iniziale',
ja: '導入部を編集',
min: 'Suntiang bagian ateh',
ko: '도입부를 편집',
pa: 'ਸੋਧ',
pt: 'Editar a seção superior',
'pt-br': 'Editar a seção superior',
sr: 'Уреди уводни део',
vi: 'Sửa phần mở đầu'
};
var our_content = $("#content, #mw_content").first();
var span1 = our_content.find("span.mw-editsection:not(.plainlinks)").first();
if (!span1.length) {
return;
}
var span0 = span1.clone();
if ( mw.user.options.get( 'gadget-righteditlinks' ) == 1 ) {
var editwidth = span1.outerWidth() + (mw.config.get("skin") == "monobook" ? 10 : 0);
$("div.topicon, #mw-fr-revisiontag").css("margin-right", editwidth + "px");
}
$("#mw_header h1, #content h1").first().append(span0);
span0.find("a").each(function (idx) {
var a = $(this);
a.attr("title", localtitles[mw.config.get( 'wgUserLanguage' )] || localtitles.en);
if (a.attr("href").indexOf("§ion=T") == -1) {
a.attr("href", a.attr("href").replace(/§ion=\d+/, "§ion=0"));
}
else { //transcluded
a.attr("href", mw.util.wikiGetlink( mw.config.get( 'wgPageName' ) ) + "?action=edit§ion=0");
}
});
});
}
d3c752599a804a6ef96d27355ca5250a658e418a
147
2013-09-16T10:19:11Z
MSGJ
0
updates requested by [[User:Mxn]]
javascript
text/javascript
// **********************************************************************
// ** ***WARNING GLOBAL GADGET FILE*** **
// ** changes to this file affect many users. **
// ** please discuss on the talk page before editing **
// ** **
// **********************************************************************
// Imported from [[User:Alex Smotrov/edittop.js]], version as of: 2007-06-19T04:28:52
// Updated from [[User:TheDJ/Gadget-edittop.js]], version as of: 2009-04-28T11:54:22
if ($.inArray( mw.config.get('wgAction'), [ 'view', 'purge' ]) !== -1 && mw.config.get( 'wgNamespaceNumber' ) >=0) {
$(function edittop_hook () {
var localtitles = {
cs: 'Editovat úvodní sekci',
en: 'Edit lead section',
fa: 'ویرایش بخش آغازین',
fr: 'Modifier le résumé introductif',
id: 'Sunting bagian atas',
it: 'Modifica della sezione iniziale',
ja: '導入部を編集',
min: 'Suntiang bagian ateh',
ko: '도입부를 편집',
pa: 'ਸੋਧ',
pt: 'Editar a seção superior',
'pt-br': 'Editar a seção superior',
sr: 'Уреди уводни део',
vi: 'Sửa phần mở đầu'
};
var our_content = $("#content, #mw_content").first();
var span1 = our_content.find("span.mw-editsection:not(.plainlinks)").first();
if (!span1.length) {
return;
}
var span0 = span1.clone();
if ( mw.user.options.get( 'gadget-righteditlinks' ) == 1 ) {
var editwidth = span1.outerWidth() + (mw.config.get("skin") == "monobook" ? 10 : 0);
$("div.topicon, #mw-fr-revisiontag").css("margin-right", editwidth + "px");
}
$("#mw_header h1, #content h1").first().append(span0);
span0.find("a").each(function (idx) {
var a = $(this);
a.attr("title", localtitles[mw.config.get( 'wgUserLanguage' )] || localtitles.en);
if (a.attr("href").indexOf("§ion=T") == -1) {
a.attr("href", a.attr("href").replace(/§ion=\d+/, "§ion=0"));
}
else { //transcluded
a.attr("href", mw.util.wikiGetlink( mw.config.get( 'wgPageName' ) ) + "?action=edit§ion=0");
}
});
});
}
d3c752599a804a6ef96d27355ca5250a658e418a
MediaWiki:Gadget-friendlyshared.js
8
123
316
315
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** friendlyshared.js: Shared IP tagging module
****************************************
* Mode of invocation: Tab ("Shared")
* Active on: Existing IP user talk pages
* Config directives in: FriendlyConfig
*/
Twinkle.shared = function friendlyshared() {
if( mw.config.get('wgNamespaceNumber') === 3 && Morebits.isIPAddress(mw.config.get('wgTitle')) ) {
var username = mw.config.get('wgTitle').split( '/' )[0].replace( /\"/, "\\\""); // only first part before any slashes
Twinkle.addPortletLink( function(){ Twinkle.shared.callback(username); }, "Shared IP", "friendly-shared", "Shared IP tagging" );
}
};
Twinkle.shared.callback = function friendlysharedCallback( uid ) {
var Window = new Morebits.simpleWindow( 600, 400 );
Window.setTitle( "Shared IP address tagging" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#shared" );
var form = new Morebits.quickForm( Twinkle.shared.callback.evaluate );
var div = form.append( { type: 'div', id: 'sharedip-templatelist' } );
div.append( { type: 'header', label: 'Shared IP address templates' } );
div.append( { type: 'radio', name: 'shared', list: Twinkle.shared.standardList,
event: function( e ) {
Twinkle.shared.callback.change_shared( e );
e.stopPropagation();
}
} );
var org = form.append( { type:'field', label:'Fill in other details (optional) and click \"Submit\"' } );
org.append( {
type: 'input',
name: 'organization',
label: 'IP address owner/operator',
disabled: true,
tooltip: 'You can optionally enter the name of the organization that owns/operates the IP address. You can use wikimarkup if necessary.'
}
);
org.append( {
type: 'input',
name: 'host',
label: 'Host name (optional)',
disabled: true,
tooltip: 'The host name (for example, proxy.example.com) can be optionally entered here and will be linked by the template.'
}
);
org.append( {
type: 'input',
name: 'contact',
label: 'Contact information (only if requested)',
disabled: true,
tooltip: 'You can optionally enter some contact details for the organization. Use this parameter only if the organization has specifically requested that it be added. You can use wikimarkup if necessary.'
}
);
form.append( { type:'submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
$(result).find('div#sharedip-templatelist').addClass('quickform-scrollbox');
};
Twinkle.shared.standardList = [
{
label: '{{Shared IP}}: standard shared IP address template',
value: 'Shared IP',
tooltip: 'IP user talk page template that shows helpful information to IP users and those wishing to warn, block or ban them'
},
{
label: '{{Shared IP edu}}: shared IP address template modified for educational institutions',
value: 'Shared IP edu'
},
{
label: '{{Shared IP corp}}: shared IP address template modified for businesses',
value: 'Shared IP corp'
},
{
label: '{{Shared IP public}}: shared IP address template modified for public terminals',
value: 'Shared IP public'
},
{
label: '{{Shared IP gov}}: shared IP address template modified for government agencies or facilities',
value: 'Shared IP gov'
},
{
label: '{{Dynamic IP}}: shared IP address template modified for organizations with dynamic addressing',
value: 'Dynamic IP'
},
{
label: '{{Static IP}}: shared IP address template modified for static IP addresses',
value: 'Static IP'
},
{
label: '{{ISP}}: shared IP address template modified for ISP organizations (specifically proxies)',
value: 'ISP'
},
{
label: '{{Mobile IP}}: shared IP address template modified for mobile phone companies and their customers',
value: 'Mobile IP'
},
{
label: '{{Whois}}: template for IP addresses in need of monitoring, but unknown whether static, dynamic or shared',
value: 'Whois'
}
];
Twinkle.shared.callback.change_shared = function friendlysharedCallbackChangeShared(e) {
e.target.form.contact.disabled = (e.target.value !== 'Shared IP edu'); // only supported by {{Shared IP edu}}
e.target.form.organization.disabled = false;
e.target.form.host.disabled = (e.target.value === 'Whois'); // host= not supported by {{Whois}}
};
Twinkle.shared.callbacks = {
main: function( pageobj ) {
var params = pageobj.getCallbackParameters();
var pageText = pageobj.getPageText();
var found = false;
var text = '{{';
for( var i=0; i < Twinkle.shared.standardList.length; i++ ) {
var tagRe = new RegExp( '(\\{\\{' + Twinkle.shared.standardList[i].value + '(\\||\\}\\}))', 'im' );
if( tagRe.exec( pageText ) ) {
Morebits.status.warn( 'Info', 'Found {{' + Twinkle.shared.standardList[i].value + '}} on the user\'s talk page already...aborting' );
found = true;
}
}
if( found ) {
return;
}
Morebits.status.info( 'Info', 'Will add the shared IP address template to the top of the user\'s talk page.' );
text += params.value + '|' + params.organization;
if( params.value === 'Shared IP edu' && params.contact !== '') {
text += '|' + params.contact;
}
if( params.value !== 'Whois' && params.host !== '' ) {
text += '|host=' + params.host;
}
text += '}}\n\n';
var summaryText = 'Added {{[[Template:' + params.value + '|' + params.value + ']]}} template.';
pageobj.setPageText(text + pageText);
pageobj.setEditSummary(summaryText + Twinkle.getPref('summaryAd'));
pageobj.setMinorEdit(Twinkle.getFriendlyPref('markSharedIPAsMinor'));
pageobj.setCreateOption('recreate');
pageobj.save();
}
};
Twinkle.shared.callback.evaluate = function friendlysharedCallbackEvaluate(e) {
var shared = e.target.getChecked( 'shared' );
if( !shared || shared.length <= 0 ) {
alert( 'You must select a shared IP address template to use!' );
return;
}
var value = shared[0];
if( e.target.organization.value === '') {
alert( 'You must input an organization for the {{' + value + '}} template!' );
return;
}
var params = {
value: value,
organization: e.target.organization.value,
host: e.target.host.value,
contact: e.target.contact.value
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( e.target );
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Tagging complete, reloading talk page in a few seconds";
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "User talk page modification");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.shared.callbacks.main);
};
})(jQuery);
//</nowiki>
873fb590b90075c94a7460cbc1e4c5efef79afd4
315
2013-07-13T18:09:31Z
AzaToth
0
v2.0-556-g0beacc0: use .utc() for timestamps and format them the sme way as the wiki does
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** friendlyshared.js: Shared IP tagging module
****************************************
* Mode of invocation: Tab ("Shared")
* Active on: Existing IP user talk pages
* Config directives in: FriendlyConfig
*/
Twinkle.shared = function friendlyshared() {
if( mw.config.get('wgNamespaceNumber') === 3 && Morebits.isIPAddress(mw.config.get('wgTitle')) ) {
var username = mw.config.get('wgTitle').split( '/' )[0].replace( /\"/, "\\\""); // only first part before any slashes
Twinkle.addPortletLink( function(){ Twinkle.shared.callback(username); }, "Shared IP", "friendly-shared", "Shared IP tagging" );
}
};
Twinkle.shared.callback = function friendlysharedCallback( uid ) {
var Window = new Morebits.simpleWindow( 600, 400 );
Window.setTitle( "Shared IP address tagging" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#shared" );
var form = new Morebits.quickForm( Twinkle.shared.callback.evaluate );
var div = form.append( { type: 'div', id: 'sharedip-templatelist' } );
div.append( { type: 'header', label: 'Shared IP address templates' } );
div.append( { type: 'radio', name: 'shared', list: Twinkle.shared.standardList,
event: function( e ) {
Twinkle.shared.callback.change_shared( e );
e.stopPropagation();
}
} );
var org = form.append( { type:'field', label:'Fill in other details (optional) and click \"Submit\"' } );
org.append( {
type: 'input',
name: 'organization',
label: 'IP address owner/operator',
disabled: true,
tooltip: 'You can optionally enter the name of the organization that owns/operates the IP address. You can use wikimarkup if necessary.'
}
);
org.append( {
type: 'input',
name: 'host',
label: 'Host name (optional)',
disabled: true,
tooltip: 'The host name (for example, proxy.example.com) can be optionally entered here and will be linked by the template.'
}
);
org.append( {
type: 'input',
name: 'contact',
label: 'Contact information (only if requested)',
disabled: true,
tooltip: 'You can optionally enter some contact details for the organization. Use this parameter only if the organization has specifically requested that it be added. You can use wikimarkup if necessary.'
}
);
form.append( { type:'submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
$(result).find('div#sharedip-templatelist').addClass('quickform-scrollbox');
};
Twinkle.shared.standardList = [
{
label: '{{Shared IP}}: standard shared IP address template',
value: 'Shared IP',
tooltip: 'IP user talk page template that shows helpful information to IP users and those wishing to warn, block or ban them'
},
{
label: '{{Shared IP edu}}: shared IP address template modified for educational institutions',
value: 'Shared IP edu'
},
{
label: '{{Shared IP corp}}: shared IP address template modified for businesses',
value: 'Shared IP corp'
},
{
label: '{{Shared IP public}}: shared IP address template modified for public terminals',
value: 'Shared IP public'
},
{
label: '{{Shared IP gov}}: shared IP address template modified for government agencies or facilities',
value: 'Shared IP gov'
},
{
label: '{{Dynamic IP}}: shared IP address template modified for organizations with dynamic addressing',
value: 'Dynamic IP'
},
{
label: '{{Static IP}}: shared IP address template modified for static IP addresses',
value: 'Static IP'
},
{
label: '{{ISP}}: shared IP address template modified for ISP organizations (specifically proxies)',
value: 'ISP'
},
{
label: '{{Mobile IP}}: shared IP address template modified for mobile phone companies and their customers',
value: 'Mobile IP'
},
{
label: '{{Whois}}: template for IP addresses in need of monitoring, but unknown whether static, dynamic or shared',
value: 'Whois'
}
];
Twinkle.shared.callback.change_shared = function friendlysharedCallbackChangeShared(e) {
e.target.form.contact.disabled = (e.target.value !== 'Shared IP edu'); // only supported by {{Shared IP edu}}
e.target.form.organization.disabled = false;
e.target.form.host.disabled = (e.target.value === 'Whois'); // host= not supported by {{Whois}}
};
Twinkle.shared.callbacks = {
main: function( pageobj ) {
var params = pageobj.getCallbackParameters();
var pageText = pageobj.getPageText();
var found = false;
var text = '{{';
for( var i=0; i < Twinkle.shared.standardList.length; i++ ) {
var tagRe = new RegExp( '(\\{\\{' + Twinkle.shared.standardList[i].value + '(\\||\\}\\}))', 'im' );
if( tagRe.exec( pageText ) ) {
Morebits.status.warn( 'Info', 'Found {{' + Twinkle.shared.standardList[i].value + '}} on the user\'s talk page already...aborting' );
found = true;
}
}
if( found ) {
return;
}
Morebits.status.info( 'Info', 'Will add the shared IP address template to the top of the user\'s talk page.' );
text += params.value + '|' + params.organization;
if( params.value === 'Shared IP edu' && params.contact !== '') {
text += '|' + params.contact;
}
if( params.value !== 'Whois' && params.host !== '' ) {
text += '|host=' + params.host;
}
text += '}}\n\n';
var summaryText = 'Added {{[[Template:' + params.value + '|' + params.value + ']]}} template.';
pageobj.setPageText(text + pageText);
pageobj.setEditSummary(summaryText + Twinkle.getPref('summaryAd'));
pageobj.setMinorEdit(Twinkle.getFriendlyPref('markSharedIPAsMinor'));
pageobj.setCreateOption('recreate');
pageobj.save();
}
};
Twinkle.shared.callback.evaluate = function friendlysharedCallbackEvaluate(e) {
var shared = e.target.getChecked( 'shared' );
if( !shared || shared.length <= 0 ) {
alert( 'You must select a shared IP address template to use!' );
return;
}
var value = shared[0];
if( e.target.organization.value === '') {
alert( 'You must input an organization for the {{' + value + '}} template!' );
return;
}
var params = {
value: value,
organization: e.target.organization.value,
host: e.target.host.value,
contact: e.target.contact.value
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( e.target );
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Tagging complete, reloading talk page in a few seconds";
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "User talk page modification");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.shared.callbacks.main);
};
})(jQuery);
//</nowiki>
873fb590b90075c94a7460cbc1e4c5efef79afd4
MediaWiki:Gadget-friendlytag.js
8
127
324
323
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** friendlytag.js: Tag module
****************************************
* Mode of invocation: Tab ("Tag")
* Active on: Existing articles; file pages with a corresponding file
* which is local (not on Commons); existing subpages of
* {Wikipedia|Wikipedia talk}:Articles for creation;
* all redirects
* Config directives in: FriendlyConfig
*/
Twinkle.tag = function friendlytag() {
// redirect tagging
if( Morebits.wiki.isPageRedirect() ) {
Twinkle.tag.mode = 'redirect';
Twinkle.addPortletLink( Twinkle.tag.callback, "Tag", "friendly-tag", "Tag redirect" );
}
// file tagging
else if( mw.config.get('wgNamespaceNumber') === 6 && !document.getElementById("mw-sharedupload") && document.getElementById("mw-imagepage-section-filehistory") ) {
Twinkle.tag.mode = 'file';
Twinkle.addPortletLink( Twinkle.tag.callback, "Tag", "friendly-tag", "Add maintenance tags to file" );
}
// article/draft article tagging
else if( ( mw.config.get('wgNamespaceNumber') === 0 || mw.config.get('wgNamespaceNumber') === 118 || /^Wikipedia( talk)?\:Articles for creation\//.exec(Morebits.pageNameNorm) ) && mw.config.get('wgCurRevisionId') ) {
Twinkle.tag.mode = 'article';
Twinkle.addPortletLink( Twinkle.tag.callback, "Tag", "friendly-tag", "Add maintenance tags to article" );
}
};
Twinkle.tag.callback = function friendlytagCallback( uid ) {
var Window = new Morebits.simpleWindow( 630, (Twinkle.tag.mode === "article") ? 450 : 400 );
Window.setScriptName( "Twinkle" );
// anyone got a good policy/guideline/info page/instructional page link??
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#tag" );
var form = new Morebits.quickForm( Twinkle.tag.callback.evaluate );
if (document.getElementsByClassName("patrollink").length) {
form.append( {
type: 'checkbox',
list: [
{
label: 'Mark the page as patrolled',
value: 'patrolPage',
name: 'patrolPage',
checked: Twinkle.getFriendlyPref('markTaggedPagesAsPatrolled')
}
]
} );
}
switch( Twinkle.tag.mode ) {
case 'article':
Window.setTitle( "Article maintenance tagging" );
form.append( {
type: 'checkbox',
list: [
{
label: 'Group inside {{multiple issues}} if possible',
value: 'group',
name: 'group',
tooltip: 'If applying three or more templates supported by {{multiple issues}} and this box is checked, all supported templates will be grouped inside a {{multiple issues}} template.',
checked: Twinkle.getFriendlyPref('groupByDefault')
}
]
}
);
form.append({
type: 'select',
name: 'sortorder',
label: 'View this list:',
tooltip: 'You can change the default view order in your Twinkle preferences (WP:TWPREFS).',
event: Twinkle.tag.updateSortOrder,
list: [
{ type: 'option', value: 'cat', label: 'By categories', selected: Twinkle.getFriendlyPref('tagArticleSortOrder') === 'cat' },
{ type: 'option', value: 'alpha', label: 'In alphabetical order', selected: Twinkle.getFriendlyPref('tagArticleSortOrder') === 'alpha' }
]
});
form.append( { type: 'div', id: 'tagWorkArea' } );
if( Twinkle.getFriendlyPref('customTagList').length ) {
form.append( { type: 'header', label: 'Custom tags' } );
form.append( { type: 'checkbox', name: 'articleTags', list: Twinkle.getFriendlyPref('customTagList') } );
}
break;
case 'file':
Window.setTitle( "File maintenance tagging" );
// TODO: perhaps add custom tags TO list of checkboxes
form.append({ type: 'header', label: 'License and sourcing problem tags' });
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.licenseList } );
form.append({ type: 'header', label: 'Wikimedia Commons-related tags' });
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.commonsList } );
form.append({ type: 'header', label: 'Cleanup tags' } );
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.cleanupList } );
form.append({ type: 'header', label: 'Image quality tags' } );
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.qualityList } );
form.append({ type: 'header', label: 'Replacement tags' });
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.replacementList } );
break;
case 'redirect':
Window.setTitle( "Redirect tagging" );
form.append({ type: 'header', label:'Spelling, misspelling, tense and capitalization templates' });
form.append({ type: 'checkbox', name: 'redirectTags', list: Twinkle.tag.spellingList });
form.append({ type: 'header', label:'Alternative name templates' });
form.append({ type: 'checkbox', name: 'redirectTags', list: Twinkle.tag.alternativeList });
form.append({ type: 'header', label:'Miscellaneous and administrative redirect templates' });
form.append({ type: 'checkbox', name: 'redirectTags', list: Twinkle.tag.administrativeList });
break;
default:
alert("Twinkle.tag: unknown mode " + Twinkle.tag.mode);
break;
}
form.append( { type:'submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
if (Twinkle.tag.mode === "article") {
// fake a change event on the sort dropdown, to initialize the tag list
var evt = document.createEvent("Event");
evt.initEvent("change", true, true);
result.sortorder.dispatchEvent(evt);
}
};
Twinkle.tag.checkedTags = [];
Twinkle.tag.updateSortOrder = function(e) {
var sortorder = e.target.value;
var $workarea = $(e.target.form).find("div#tagWorkArea");
Twinkle.tag.checkedTags = e.target.form.getChecked("articleTags");
if (!Twinkle.tag.checkedTags) {
Twinkle.tag.checkedTags = [];
}
// function to generate a checkbox, with appropriate subgroup if needed
var makeCheckbox = function(tag, description) {
var checkbox = { value: tag, label: "{{" + tag + "}}: " + description };
if (Twinkle.tag.checkedTags.indexOf(tag) !== -1) {
checkbox.checked = true;
}
switch (tag) {
case "cleanup":
checkbox.subgroup = {
name: 'cleanup',
type: 'input',
label: 'Specific reason why cleanup is needed: ',
tooltip: 'Required.',
size: 35
};
break;
case "copy edit":
checkbox.subgroup = {
name: 'copyEdit',
type: 'input',
label: '"This article may require copy editing for..." ',
tooltip: 'e.g. "consistent spelling". Optional.',
size: 35
};
break;
case "copypaste":
checkbox.subgroup = {
name: 'copypaste',
type: 'input',
label: 'Source URL: ',
tooltip: 'If known.',
size: 50
};
break;
case "expert-subject":
checkbox.subgroup = {
name: 'expertSubject',
type: 'input',
label: 'Name of relevant WikiProject: ',
tooltip: 'Optionally, enter the name of a WikiProject which might be able to help recruit an expert. Don\'t include the "WikiProject" prefix.'
};
break;
case "globalize":
checkbox.subgroup = {
name: 'globalize',
type: 'select',
list: [
{ label: "{{globalize}}: article may not represent a worldwide view of the subject", value: "globalize" },
{
label: "Region-specific {{globalize}} subtemplates",
list: [
{ label: "{{globalize/Australia}}: article deals primarily with the Australian viewpoint", value: "globalize/Australia" },
{ label: "{{globalize/Canada}}: article deals primarily with the Canadian viewpoint", value: "globalize/Canada" },
{ label: "{{globalize/China}}: article deals primarily with the Chinese viewpoint", value: "globalize/China" },
{ label: "{{globalize/Common law}}: article deals primarily with the viewpoint of common law countries", value: "globalize/Common law" },
{ label: "{{globalize/Eng}}: article deals primarily with the English-speaking viewpoint", value: "globalize/Eng" },
{ label: "{{globalize/Europe}}: article deals primarily with the European viewpoint", value: "globalize/Europe" },
{ label: "{{globalize/France}}: article deals primarily with the French viewpoint", value: "globalize/France" },
{ label: "{{globalize/Germany}}: article deals primarily with the German viewpoint", value: "globalize/Germany" },
{ label: "{{globalize/India}}: article deals primarily with the Indian viewpoint", value: "globalize/India" },
{ label: "{{globalize/Middle East}}: article deals primarily with the Middle Eastern viewpoint", value: "globalize/Middle East" },
{ label: "{{globalize/North America}}: article deals primarily with the North American viewpoint", value: "globalize/North America" },
{ label: "{{globalize/Northern}}: article deals primarily with the northern hemisphere viewpoint", value: "globalize/Northern" },
{ label: "{{globalize/Southern}}: article deals primarily with the southern hemisphere viewpoint", value: "globalize/Southern" },
{ label: "{{globalize/South Africa}}: article deals primarily with the South African viewpoint", value: "globalize/South Africa" },
{ label: "{{globalize/UK}}: article deals primarily with the British viewpoint", value: "globalize/UK" },
{ label: "{{globalize/UK and Canada}}: article deals primarily with the British and Canadian viewpoints", value: "globalize/UK and Canada" },
{ label: "{{globalize/US}}: article deals primarily with the USA viewpoint", value: "globalize/US" },
{ label: "{{globalize/West}}: article deals primarily with the viewpoint of Western countries", value: "globalize/West" }
]
}
]
};
break;
case "merge":
case "merge from":
case "merge to":
var otherTagName = "merge";
switch (tag)
{
case "merge from":
otherTagName = "merge to";
break;
case "merge to":
otherTagName = "merge from";
break;
}
checkbox.subgroup = [
{
name: 'mergeTarget',
type: 'input',
label: 'Other article(s): ',
tooltip: 'If specifying multiple articles, separate them with pipe characters: Article one|Article two'
},
{
name: 'mergeTagOther',
type: 'checkbox',
list: [
{
label: 'Tag the other article with a {{' + otherTagName + '}} tag',
checked: true,
tooltip: 'Only available if a single article name is entered.'
}
]
}
];
if (mw.config.get('wgNamespaceNumber') === 0) {
checkbox.subgroup.push({
name: 'mergeReason',
type: 'textarea',
label: 'Rationale for merge (will be posted on ' +
(tag === "merge to" ? 'the other article\'s' : 'this article\'s') + ' talk page):',
tooltip: 'Optional, but strongly recommended. Leave blank if not wanted. Only available if a single article name is entered.'
});
}
break;
case "not English":
case "rough translation":
checkbox.subgroup = [
{
name: 'translationLanguage',
type: 'input',
label: 'Language of article (if known): ',
tooltip: 'Consider looking at [[WP:LRC]] for help. If listing the article at PNT, please try to avoid leaving this box blank, unless you are completely unsure.'
}
];
if (tag === "not English") {
checkbox.subgroup.push({
name: 'translationNotify',
type: 'checkbox',
list: [
{
label: 'Notify article creator',
checked: true,
tooltip: "Places {{uw-notenglish}} on the creator's talk page."
}
]
});
}
checkbox.subgroup.push({
name: 'translationPostAtPNT',
type: 'checkbox',
list: [
{
label: 'List this article at Wikipedia:Pages needing translation into English (PNT)',
checked: true
}
]
});
checkbox.subgroup.push({
name: 'translationComments',
type: 'textarea',
label: 'Additional comments to post at PNT',
tooltip: 'Optional, and only relevant if "List this article ..." above is checked.'
});
break;
case "notability":
checkbox.subgroup = {
name: 'notability',
type: 'select',
list: [
{ label: "{{notability}}: article\'s subject may not meet the general notability guideline", value: "none" },
{ label: "{{notability|Academics}}: notability guideline for academics", value: "Academics" },
{ label: "{{notability|Biographies}}: notability guideline for biographies", value: "Biographies" },
{ label: "{{notability|Books}}: notability guideline for books", value: "Books" },
{ label: "{{notability|Companies}}: notability guidelines for companies and organizations", value: "Companies" },
{ label: "{{notability|Events}}: notability guideline for events", value: "Events" },
{ label: "{{notability|Films}}: notability guideline for films", value: "Films" },
{ label: "{{notability|Music}}: notability guideline for music", value: "Music" },
{ label: "{{notability|Neologisms}}: notability guideline for neologisms", value: "Neologisms" },
{ label: "{{notability|Numbers}}: notability guideline for numbers", value: "Numbers" },
{ label: "{{notability|Products}}: notability guideline for products and services", value: "Products" },
{ label: "{{notability|Sport}}: notability guideline for sports and athletics", value: "Sport" },
{ label: "{{notability|Web}}: notability guideline for web content", value: "Web" }
]
};
break;
default:
break;
}
return checkbox;
};
// categorical sort order
if (sortorder === "cat") {
var div = new Morebits.quickForm.element({
type: "div",
id: "tagWorkArea"
});
// function to iterate through the tags and create a checkbox for each one
var doCategoryCheckboxes = function(subdiv, array) {
var checkboxes = [];
$.each(array, function(k, tag) {
var description = Twinkle.tag.article.tags[tag];
checkboxes.push(makeCheckbox(tag, description));
});
subdiv.append({
type: "checkbox",
name: "articleTags",
list: checkboxes
});
};
var i = 0;
// go through each category and sub-category and append lists of checkboxes
$.each(Twinkle.tag.article.tagCategories, function(title, content) {
div.append({ type: "header", id: "tagHeader" + i, label: title });
var subdiv = div.append({ type: "div", id: "tagSubdiv" + i++ });
if ($.isArray(content)) {
doCategoryCheckboxes(subdiv, content);
} else {
$.each(content, function(subtitle, subcontent) {
subdiv.append({ type: "div", label: [ Morebits.htmlNode("b", subtitle) ] });
doCategoryCheckboxes(subdiv, subcontent);
});
}
});
var rendered = div.render();
$workarea.replaceWith(rendered);
var $rendered = $(rendered);
$rendered.find("h5").css({ 'font-size': '110%', 'margin-top': '1em' });
$rendered.find("div").filter(":has(span.quickformDescription)").css({ 'margin-top': '0.4em' });
}
// alphabetical sort order
else {
var checkboxes = [];
$.each(Twinkle.tag.article.tags, function(tag, description) {
checkboxes.push(makeCheckbox(tag, description));
});
var tags = new Morebits.quickForm.element({
type: "checkbox",
name: "articleTags",
list: checkboxes
});
$workarea.empty().append(tags.render());
}
};
// Tags for ARTICLES start here
Twinkle.tag.article = {};
// A list of all article tags, in alphabetical order
// To ensure tags appear in the default "categorized" view, add them to the tagCategories hash below.
Twinkle.tag.article.tags = {
"advert": "article is written like an advertisement",
"all plot": "article is almost entirely a plot summary",
"autobiography": "article is an autobiography and may not be written neutrally",
"BLP sources": "BLP article needs additional sources for verification",
"BLP unsourced": "BLP article has no sources at all (use BLP PROD instead for new articles)",
"citation style": "article has unclear or inconsistent inline citations",
"cleanup": "article may require cleanup",
"cleanup-reorganize": "article may be in need of reorganization to comply with Wikipedia's layout guidelines",
"close paraphrasing": "article contains close paraphrasing of a non-free copyrighted source",
"COI": "article creator or major contributor may have a conflict of interest",
"condense": "article may have too many section headers dividing up its content",
"confusing": "article may be confusing or unclear",
"context": "article provides insufficient context",
"copy edit": "article needs copy editing for grammar, style, cohesion, tone, and/or spelling",
"copypaste": "article appears to have been copied and pasted from a source",
"dead end": "article has no links to other articles",
"disputed": "article has questionable factual accuracy",
"essay-like": "article is written like an essay and needs cleanup",
"expand language": "article can be expanded with material from a foreign-language Wikipedia",
"expert-subject": "article needs attention from an expert on the subject",
"external links": "article's external links may not follow content policies or guidelines",
"fansite": "article resembles a fansite",
"fiction": "article fails to distinguish between fact and fiction",
"globalize": "article may not represent a worldwide view of the subject",
"GOCEinuse": "article is currently undergoing a major copy edit by the Guild of Copy Editors",
"hoax": "article may be a complete hoax",
"improve categories": "article may require additional categories",
"in-universe": "article subject is fictional and needs rewriting from a non-fictional perspective",
"incoherent": "article is incoherent or very hard to understand",
"in use": "article is undergoing a major edit for a short while",
"lead missing": "article has no lead section and one should be written",
"lead rewrite": "article lead section needs to be rewritten to comply with guidelines",
"lead too long": "article lead section is too long and should be shortened",
"lead too short": "article lead section is too short and should be expanded",
"linkrot": "article uses bare URLs for references, which are prone to link rot",
"merge": "article should be merged with another given article",
"merge from": "another given article should be merged into this one",
"merge to": "article should be merged into another given article",
"metricate": "article exclusively uses non-SI units of measurement",
"more footnotes": "article has some references, but insufficient in-text citations",
"new unreviewed article": "mark article for later review",
"news release": "article reads like a news release",
"no footnotes": "article has references, but no in-text citations",
"non-free": "article may contain excessive or improper use of copyrighted materials",
"notability": "article's subject may not meet the notability guideline",
"not English": "article is written in a language other than English and needs translation",
"one source": "article relies largely or entirely upon a single source",
"original research": "article has original research or unverified claims",
"orphan": "article is linked to from no other articles",
"overcoverage": "article has an extensive bias or disproportional coverage towards one or more specific regions",
"overlinked": "article may have too many duplicate and/or irrelevant links",
"overly detailed": "article contains an excessive amount of intricate detail",
"peacock": "article may contain peacock terms that promote the subject without adding information",
"plot": "plot summary in article is too long",
"POV": "article does not maintain a neutral point of view",
"primary sources": "article relies too heavily on primary sources, and needs secondary sources",
"prose": "article is in a list format that may be better presented using prose",
"recentism": "article is slanted towards recent events",
"ref improve": "article needs additional references or sources for verification",
"rough translation": "article is poorly translated and needs cleanup",
"sections": "article needs to be broken into sections",
"self-published": "article may contain improper references to self-published sources",
"technical": "article may be too technical for the uninitiated reader",
"tense": "article is written in an incorrect tense",
"third-party": "article relies too heavily on affiliated sources, and needs third-party sources",
"tone": "tone of article is not appropriate",
"too few opinions": "article may not include all significant viewpoints",
"uncategorized": "article is uncategorized",
"under construction": "article is currently in the middle of an expansion or major revamping",
"underlinked": "article may require additional wikilinks",
"undue": "article lends undue weight to certain aspects of the subject but not others",
"unreferenced": "article has no references at all",
"unreliable sources": "article's references may not be reliable sources",
"update": "article needs additional up-to-date information added",
"very long": "article is too long",
"weasel": "article neutrality is compromised by the use of weasel words"
};
// A list of tags in order of category
// Tags should be in alphabetical order within the categories
// Add new categories with discretion - the list is long enough as is!
Twinkle.tag.article.tagCategories = {
"Cleanup and maintenance tags": {
"General cleanup": [
"cleanup", // has a subgroup with text input
"copy edit" // has a subgroup with text input
],
"Potentially unwanted content": [
"close paraphrasing",
"copypaste", // has a subgroup with text input
"external links",
"non-free"
],
"Structure, formatting, and lead section": [
"cleanup-reorganize",
"condense",
"lead missing",
"lead rewrite",
"lead too long",
"lead too short",
"sections",
"very long"
],
"Fiction-related cleanup": [
"all plot",
"fiction",
"in-universe",
"plot"
]
},
"General content issues": {
"Importance and notability": [
"notability" // has a subgroup with subcategories
],
"Style of writing": [
"advert",
"essay-like",
"fansite",
"news release",
"prose",
"technical",
"tense",
"tone"
],
"Sense (or lack thereof)": [
"confusing",
"incoherent"
],
"Information and detail": [
"context",
"expert-subject",
"metricate",
"overly detailed",
"undue"
],
"Timeliness": [
"update"
],
"Neutrality, bias, and factual accuracy": [
"autobiography",
"COI",
"disputed",
"hoax",
"globalize", // has a subgroup with subcategories
"overcoverage",
"peacock",
"POV",
"recentism",
"too few opinions",
"weasel"
],
"Verifiability and sources": [
"BLP sources",
"BLP unsourced",
"one source",
"original research",
"primary sources",
"ref improve",
"self-published",
"third-party",
"unreferenced",
"unreliable sources"
]
},
"Specific content issues": {
"Language": [
"not English", // has a subgroup with several options
"rough translation", // has a subgroup with several options
"expand language"
],
"Links": [
"dead end",
"orphan",
"overlinked",
"underlinked"
],
"Referencing technique": [
"citation style",
"linkrot",
"more footnotes",
"no footnotes"
],
"Categories": [
"improve categories",
"uncategorized"
]
},
"Merging": [ // these three have a subgroup with several options
"merge",
"merge from",
"merge to"
],
"Informational": [
"GOCEinuse",
"in use",
"new unreviewed article",
"under construction"
]
};
// Tags for REDIRECTS start here
Twinkle.tag.spellingList = [
{
label: '{{R from abbreviation}}: redirect from a title with an abbreviation',
value: 'R from abbreviation'
},
{
label: '{{R to list entry}}: redirect to a \"list of minor entities\"-type article which contains brief descriptions of subjects not notable enough to have separate articles',
value: 'R to list entry'
},
{
label: '{{R to section}}: similar to {{R to list entry}}, but when list is organized in sections, such as list of characters in a fictional universe.',
value: 'R to section'
},
{
label: '{{R from misspelling}}: redirect from a misspelling or typographical error',
value: 'R from misspelling'
},
{
label: '{{R from alternative spelling}}: redirect from a title with a different spelling',
value: 'R from alternative spelling'
},
{
label: '{{R from plural}}: redirect from a plural word to the singular equivalent',
value: 'R from plural'
},
{
label: '{{R from related word}}: redirect from a related word',
value: 'R from related word'
},
{
label: '{{R with possibilities}}: redirect from a more specific title to a more general, less detailed article, hence something which can and should be expanded',
value: 'R with possibilities'
},
{
label: '{{R from member}}: redirect from a member of a group to a related topic such as the group, organization, or team that he or she belongs to',
value: 'R from member'
},
{
label: '{{R from other capitalisation}}: redirect from a title with another method of capitalisation',
value: 'R from other capitalisation'
}
];
Twinkle.tag.alternativeList = [
{
label: '{{R from alternative name}}: redirect from a title that is another name, a pseudonym, a nickname, or a synonym',
value: 'R from alternative name'
},
{
label: '{{R from full name}}: redirect from a title that is a complete or more complete name',
value: 'R from full name'
},
{
label: '{{R from surname}}: redirect from a title that is a surname',
value: 'R from surname'
},
{
label: '{{R from historic name}}: redirect from another name with a significant historic past as a region, state, city or such, but which is no longer known by that title or name',
value: 'R from historic name'
},
{
label: '{{R from scientific name}}: redirect from the scientific name to the common name',
value: 'R from scientific name'
},
{
label: '{{R to scientific name}}: redirect from the common name to the scientific name',
value: 'R to scientific name'
},
{
label: '{{R from name and country}}: redirect from the specific name to the briefer name',
value: 'R from name and country'
},
{
label: '{{R from alternative language}}: redirect from an English name to a name in another language, or vice-versa',
value: 'R from alternative language'
},
{
label: '{{R from ASCII}}: redirect from a title in basic ASCII to the formal article title, with differences that are not diacritical marks (accents, umlauts, etc.)',
value: 'R from ASCII'
},
{
label: '{{R from title without diacritics}}: redirect to the article title with diacritical marks (accents, umlauts, etc.)',
value: 'R from title without diacritics'
}
];
Twinkle.tag.administrativeList = [
{
label: '{{R from merge}}: redirect from a merged page in order to preserve its edit history',
value: 'R from merge'
},
{
label: '{{R to disambiguation page}}: redirect to a disambiguation page',
value: 'R to disambiguation page'
},
{
label: '{{R from duplicated article}}: redirect to a similar article in order to preserve its edit history',
value: 'R from duplicated article'
},
{
label: '{{R to decade}}: redirect from a year to the decade article',
value: 'R to decade'
},
{
label: '{{R from shortcut}}: redirect from a Wikipedia shortcut',
value: 'R from shortcut'
},
{
label: '{{R from CamelCase}}: redirect from a CamelCase title',
value: 'R from CamelCase'
},
{
label: '{{R from EXIF}}: redirect of a wikilink created from JPEG EXIF information (i.e. the \"metadata\" section on some image description pages)',
value: 'R from EXIF'
},
{
label: '{{R from school}}: redirect from a school article that had very little information',
value: 'R from school'
}
];
// maintenance tags for FILES start here
Twinkle.tag.file = {};
Twinkle.tag.file.licenseList = [
{ label: '{{Bsr}}: source info consists of bare image URL/generic base URL only', value: 'Bsr' },
{ label: '{{Non-free reduce}}: non-low-resolution fair use image (or too-long audio clip, etc)', value: 'Non-free reduce' },
{ label: '{{Non-free reduced}}: fair use media which has been reduced (old versions need to be deleted)', value: 'Non-free reduced' },
{ label: '{{Orphaned non-free revisions}}: fair use media with old revisions that need to be deleted', value: 'subst:orfurrev' }
];
Twinkle.tag.file.commonsList = [
{ label: '{{Copy to Commons}}: free media that should be copied to Commons', value: 'Copy to Commons' },
{ label: '{{Do not move to Commons}} (PD issue): file is PD in the US but not in country of origin', value: 'Do not move to Commons' },
{ label: '{{Do not move to Commons}} (other reason)', value: 'Do not move to Commons_reason' },
{ label: '{{Keep local}}: request to keep local copy of a Commons file', value: 'Keep local' },
{ label: '{{Now Commons}}: file has been copied to Commons', value: 'subst:ncd' }
];
Twinkle.tag.file.cleanupList = [
{ label: '{{Artifacts}}: PNG contains residual compression artifacts', value: 'Artifacts' },
{ label: '{{Bad font}}: SVG uses fonts not available on the thumbnail server', value: 'Bad font' },
{ label: '{{Bad format}}: PDF/DOC/... file should be converted to a more useful format', value: 'Bad format' },
{ label: '{{Bad GIF}}: GIF that should be PNG, JPEG, or SVG', value: 'Bad GIF' },
{ label: '{{Bad JPEG}}: JPEG that should be PNG or SVG', value: 'Bad JPEG' },
{ label: '{{Bad trace}}: auto-traced SVG requiring cleanup', value: 'Bad trace' },
{ label: '{{Cleanup image}}: general cleanup', value: 'Cleanup image' },
{ label: '{{Cleanup SVG}}: SVG needing code and/or appearance cleanup', value: 'Cleanup SVG' },
{ label: '{{ClearType}}: image (not screenshot) with ClearType anti-aliasing', value: 'ClearType' },
{ label: '{{Imagewatermark}}: image contains visible or invisible watermarking', value: 'Imagewatermark' },
{ label: '{{NoCoins}}: image using coins to indicate scale', value: 'NoCoins' },
{ label: '{{Overcompressed JPEG}}: JPEG with high levels of artifacts', value: 'Overcompressed JPEG' },
{ label: '{{Opaque}}: opaque background should be transparent', value: 'Opaque' },
{ label: '{{Remove border}}: unneeded border, white space, etc.', value: 'Remove border' },
{ label: '{{Rename media}}: file should be renamed according to the criteria at [[WP:FMV]]', value: 'Rename media' },
{ label: '{{Should be PNG}}: GIF or JPEG should be lossless', value: 'Should be PNG' },
{
label: '{{Should be SVG}}: PNG, GIF or JPEG should be vector graphics', value: 'Should be SVG',
subgroup: {
name: 'svgCategory',
type: 'select',
list: [
{ label: '{{Should be SVG|other}}', value: 'other' },
{ label: '{{Should be SVG|alphabet}}: character images, font examples, etc.', value: 'alphabet' },
{ label: '{{Should be SVG|chemical}}: chemical diagrams, etc.', value: 'chemical' },
{ label: '{{Should be SVG|circuit}}: electronic circuit diagrams, etc.', value: 'circuit' },
{ label: '{{Should be SVG|coat of arms}}: coats of arms', value: 'coat of arms' },
{ label: '{{Should be SVG|diagram}}: diagrams that do not fit any other subcategory', value: 'diagram' },
{ label: '{{Should be SVG|emblem}}: emblems, free/libre logos, insignias, etc.', value: 'emblem' },
{ label: '{{Should be SVG|fair use}}: fair-use images, fair-use logos', value: 'fair use' },
{ label: '{{Should be SVG|flag}}: flags', value: 'flag' },
{ label: '{{Should be SVG|graph}}: visual plots of data', value: 'graph' },
{ label: '{{Should be SVG|logo}}: logos', value: 'logo' },
{ label: '{{Should be SVG|map}}: maps', value: 'map' },
{ label: '{{Should be SVG|music}}: musical scales, notes, etc.', value: 'music' },
{ label: '{{Should be SVG|physical}}: "realistic" images of physical objects, people, etc.', value: 'physical' },
{ label: '{{Should be SVG|symbol}}: miscellaneous symbols, icons, etc.', value: 'symbol' }
]
}
},
{ label: '{{Should be text}}: image should be represented as text, tables, or math markup', value: 'Should be text' },
{ label: '{{Split media}}: there are two different images in the upload log which need to be split', value: 'Split media' }
];
Twinkle.tag.file.qualityList = [
{ label: '{{Image-blownout}}', value: 'Image-blownout' },
{ label: '{{Image-out-of-focus}}', value: 'Image-out-of-focus' },
{ label: '{{Image-Poor-Quality}}', value: 'Image-Poor-Quality' },
{ label: '{{Image-underexposure}}', value: 'Image-underexposure' },
{ label: '{{Low quality chem}}: disputed chemical structures', value: 'Low quality chem' }
];
Twinkle.tag.file.replacementList = [
{ label: '{{Duplicate}}: exact duplicate of another file, but not yet orphaned', value: 'Duplicate' },
{ label: '{{Obsolete}}: improved version available', value: 'Obsolete' },
{ label: '{{PNG version available}}', value: 'PNG version available' },
{ label: '{{SVG version available}}', value: 'SVG version available' }
];
// Contains those article tags that *do not* work inside {{multiple issues}}.
Twinkle.tag.multipleIssuesExceptions = [
'copypaste',
'expand language',
'GOCEinuse',
'improve categories',
'in use',
'merge',
'merge from',
'merge to',
'new unreviewed article',
'not English',
'rough translation',
'uncategorized',
'under construction'
];
Twinkle.tag.callbacks = {
main: function( pageobj ) {
var params = pageobj.getCallbackParameters(),
tagRe, tagText = '', summaryText = 'Added',
tags = [], groupableTags = [], i, totalTags;
// Remove tags that become superfluous with this action
var pageText = pageobj.getPageText().replace(/\{\{\s*([Nn]ew unreviewed article|[Uu]nreviewed|[Uu]serspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/g, "");
var addTag = function friendlytagAddTag( tagIndex, tagName ) {
var currentTag = "";
if( tagName === 'uncategorized' || tagName === 'improve categories' ) {
pageText += '\n\n{{' + tagName +
'|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}';
} else {
if( tagName === 'globalize' ) {
currentTag += '{{' + params.tagParameters.globalize;
} else {
currentTag += ( Twinkle.tag.mode === 'redirect' ? '\n' : '' ) + '{{' + tagName;
}
if( tagName === 'notability' && params.tagParameters.notability !== 'none' ) {
currentTag += '|' + params.tagParameters.notability;
}
// prompt for other parameters, based on the tag
switch( tagName ) {
case 'cleanup':
if (params.tagParameters.cleanup) {
currentTag += '|reason=' + params.tagParameters.cleanup;
}
break;
case 'copy edit':
if (params.tagParameters.copyEdit) {
currentTag += '|for=' + params.tagParameters.copyEdit;
}
break;
case 'copypaste':
if (params.tagParameters.copypaste) {
currentTag += '|url=' + params.tagParameters.copypaste;
}
break;
case 'expand language':
currentTag += '|topic=';
var langcode = prompt('Please enter the language code of the other wiki (e.g. "fr", "roa-rup"). \n' +
"This information is required. To skip the {{expand language}} tag, click Cancel.", "");
if (langcode === null || langcode === "") {
Morebits.status.warn("Notice", "{{expand language}} tag skipped by user");
return true; // continue to next tag
} else {
currentTag += '|langcode=' + langcode;
}
var otherart = prompt('Please enter the name of the article in the other wiki (without interwiki prefix). \n' +
"This information is optional. To skip the {{expand language}} tag, click Cancel.", "");
if (otherart === null) {
Morebits.status.warn("Notice", "{{expand language}} tag skipped by user");
return true; // continue to next tag
} else {
currentTag += '|otherarticle=' + otherart;
}
break;
case 'expert-subject':
if (params.tagParameters.expertSubject) {
currentTag += '|1=' + params.tagParameters.expertSubject;
}
break;
case 'news release':
currentTag += '|1=article';
break;
case 'not English':
case 'rough translation':
if (params.translationLanguage) {
currentTag += '|1=' + params.translationLanguage;
}
if (params.translationPostAtPNT) {
currentTag += '|listed=yes';
}
break;
case 'merge':
case 'merge to':
case 'merge from':
if (params.mergeTarget) {
// normalize the merge target for now and later
params.mergeTarget = Morebits.string.toUpperCaseFirstChar(params.mergeTarget.replace(/_/g, ' '));
currentTag += '|' + params.mergeTarget;
// link to the correct section on the talk page, for article space only
if (mw.config.get('wgNamespaceNumber') === 0 && (params.mergeReason || params.discussArticle)) {
if (!params.discussArticle) {
// discussArticle is the article whose talk page will contain the discussion
params.discussArticle = (tagName === "merge to" ? params.mergeTarget : mw.config.get('wgTitle'));
// nonDiscussArticle is the article which won't have the discussion
params.nonDiscussArticle = (tagName === "merge to" ? mw.config.get('wgTitle') : params.mergeTarget);
params.talkDiscussionTitle = 'Proposed merge with ' + params.nonDiscussArticle;
}
currentTag += '|discuss=Talk:' + params.discussArticle + '#' + params.talkDiscussionTitle;
}
}
break;
default:
break;
}
currentTag += (Twinkle.tag.mode === 'redirect') ? '}}' : '|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}\n';
tagText += currentTag;
}
if ( tagIndex > 0 ) {
if( tagIndex === (totalTags - 1) ) {
summaryText += ' and';
} else if ( tagIndex < (totalTags - 1) ) {
summaryText += ',';
}
}
summaryText += ' {{[[';
if( tagName === 'globalize' ) {
summaryText += "Template:" + params.tagParameters.globalize + '|' + params.tagParameters.globalize;
} else {
summaryText += (tagName.indexOf(":") !== -1 ? tagName : ("Template:" + tagName + "|" + tagName));
}
summaryText += ']]}}';
};
if( Twinkle.tag.mode !== 'redirect' ) {
// Check for preexisting tags and separate tags into groupable and non-groupable arrays
for( i = 0; i < params.tags.length; i++ ) {
tagRe = new RegExp( '(\\{\\{' + params.tags[i] + '(\\||\\}\\})|\\|\\s*' + params.tags[i] + '\\s*=[a-z ]+\\d+)', 'im' );
if( !tagRe.exec( pageText ) ) {
if( Twinkle.tag.multipleIssuesExceptions.indexOf(params.tags[i]) === -1 ) {
groupableTags = groupableTags.concat( params.tags[i] );
} else {
tags = tags.concat( params.tags[i] );
}
} else {
Morebits.status.warn( 'Info', 'Found {{' + params.tags[i] +
'}} on the article already...excluding' );
// don't do anything else with merge tags
if (params.tags[i] === "merge" || params.tags[i] === "merge from" ||
params.tags[i] === "merge to") {
params.mergeTarget = params.mergeReason = params.mergeTagOther = false;
}
}
}
var miTest = /\{\{(multiple ?issues|article ?issues|mi)[^}]+\{/im.exec(pageText);
var miOldStyleRegex = /\{\{(multiple ?issues|article ?issues|mi)\s*\|([^{]+)\}\}/im;
var miOldStyleTest = miOldStyleRegex.exec(pageText);
if( ( miTest || miOldStyleTest ) && groupableTags.length > 0 ) {
Morebits.status.info( 'Info', 'Adding supported tags inside existing {{multiple issues}} tag' );
groupableTags.sort();
tagText = "";
totalTags = groupableTags.length;
$.each(groupableTags, addTag);
summaryText += ' tag' + ( groupableTags.length > 1 ? 's' : '' ) + ' (within {{[[Template:multiple issues|multiple issues]]}})';
if( tags.length > 0 ) {
summaryText += ', and';
}
if( miOldStyleTest ) {
// convert tags from old-style to new-style
var split = miOldStyleTest[2].split("|");
$.each(split, function(index, val) {
split[index] = val.replace("=", "|date=").trim();
});
pageText = pageText.replace(miOldStyleRegex, "{{$1|\n{{" + split.join("}}\n{{") + "}}\n" + tagText + "}}\n");
} else {
var miRegex = new RegExp("(\\{\\{\\s*" + miTest[1] + "\\s*(?:\\|(?:\\{\\{[^{}]*\\}\\}|[^{}])*)?)\\}\\}\\s*", "im");
pageText = pageText.replace(miRegex, "$1" + tagText + "}}\n");
}
tagText = "";
} else if( params.group && groupableTags.length >= 3 ) {
Morebits.status.info( 'Info', 'Grouping supported tags inside {{multiple issues}}' );
groupableTags.sort();
tagText += '{{multiple issues|\n';
totalTags = groupableTags.length;
$.each(groupableTags, addTag);
summaryText += ' tags (within {{[[Template:multiple issues|multiple issues]]}})';
if( tags.length > 0 ) {
summaryText += ', and';
}
tagText += '}}\n';
} else {
tags = tags.concat( groupableTags );
}
} else {
// Redirect tagging: Check for pre-existing tags
for( i = 0; i < params.tags.length; i++ ) {
tagRe = new RegExp( '(\\{\\{' + params.tags[i] + '(\\||\\}\\}))', 'im' );
if( !tagRe.exec( pageText ) ) {
tags = tags.concat( params.tags[i] );
} else {
Morebits.status.warn( 'Info', 'Found {{' + params.tags[i] +
'}} on the redirect already...excluding' );
}
}
}
tags.sort();
totalTags = tags.length;
$.each(tags, addTag);
if( Twinkle.tag.mode === 'redirect' ) {
pageText += tagText;
} else {
// smartly insert the new tags after any hatnotes. Regex is a bit more
// complicated than it'd need to be, to allow templates as parameters,
// and to handle whitespace properly.
pageText = pageText.replace(/^\s*(?:((?:\s*\{\{\s*(?:about|correct title|dablink|distinguish|for|other\s?(?:hurricaneuses|people|persons|places|uses(?:of)?)|redirect(?:-acronym)?|see\s?(?:also|wiktionary)|selfref|the)\d*\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\})+(?:\s*\n)?)\s*)?/i,
"$1" + tagText);
}
summaryText += ( tags.length > 0 ? ' tag' + ( tags.length > 1 ? 's' : '' ) : '' ) +
' to ' + Twinkle.tag.mode;
// avoid truncated summaries
if (summaryText.length > (254 - Twinkle.getPref('summaryAd').length)) {
summaryText = summaryText.replace(/\[\[[^\|]+\|([^\]]+)\]\]/g, "$1");
}
pageobj.setPageText(pageText);
pageobj.setEditSummary(summaryText + Twinkle.getPref('summaryAd'));
pageobj.setWatchlist(Twinkle.getFriendlyPref('watchTaggedPages'));
pageobj.setMinorEdit(Twinkle.getFriendlyPref('markTaggedPagesAsMinor'));
pageobj.setCreateOption('nocreate');
pageobj.save(function() {
// special functions for merge tags
if (params.mergeReason) {
// post the rationale on the talk page (only operates in main namespace)
var talkpageText = "\n\n== Proposed merge with [[" + params.nonDiscussArticle + "]] ==\n\n";
talkpageText += params.mergeReason.trim() + " ~~~~";
var talkpage = new Morebits.wiki.page("Talk:" + params.discussArticle, "Posting rationale on talk page");
talkpage.setAppendText(talkpageText);
talkpage.setEditSummary('Proposing to merge [[' + params.nonDiscussArticle + ']] ' +
(tags.indexOf("merge") !== -1 ? 'with' : 'into') + ' [[' + params.discussArticle + ']]' +
Twinkle.getPref('summaryAd'));
talkpage.setWatchlist(Twinkle.getFriendlyPref('watchMergeDiscussions'));
talkpage.setCreateOption('recreate');
talkpage.append();
}
if (params.mergeTagOther) {
// tag the target page if requested
var otherTagName = "merge";
if (tags.indexOf("merge from") !== -1) {
otherTagName = "merge to";
} else if (tags.indexOf("merge to") !== -1) {
otherTagName = "merge from";
}
var newParams = {
tags: [otherTagName],
mergeTarget: Morebits.pageNameNorm,
discussArticle: params.discussArticle,
talkDiscussionTitle: params.talkDiscussionTitle
};
var otherpage = new Morebits.wiki.page(params.mergeTarget, "Tagging other page (" +
params.mergeTarget + ")");
otherpage.setCallbackParameters(newParams);
otherpage.load(Twinkle.tag.callbacks.main);
}
// post at WP:PNT for {{not English}} and {{rough translation}} tag
if (params.translationPostAtPNT) {
var pntPage = new Morebits.wiki.page('Wikipedia:Pages needing translation into English',
"Listing article at Wikipedia:Pages needing translation into English");
pntPage.setFollowRedirect(true);
pntPage.setCallbackParameters({
template: params.tags.indexOf("rough translation") !== -1 ? "duflu" : "needtrans",
lang: params.translationLanguage,
reason: params.translationComments
});
pntPage.load(Twinkle.tag.callbacks.translationListPage);
}
if (params.translationNotify) {
pageobj.lookupCreator(function(innerPageobj) {
var initialContrib = innerPageobj.getCreator();
var userTalkPage = new Morebits.wiki.page('User talk:' + initialContrib,
'Notifying initial contributor (' + initialContrib + ')');
var notifytext = "\n\n== Your article [[" + Morebits.pageNameNorm + "]]==\n" +
"{{subst:uw-notenglish|1=" + Morebits.pageNameNorm +
(params.translationPostAtPNT ? "" : "|nopnt=yes") + "}} ~~~~";
userTalkPage.setAppendText(notifytext);
userTalkPage.setEditSummary("Notice: Please use English when contributing to the English Wikipedia." +
Twinkle.getPref('summaryAd'));
userTalkPage.setCreateOption('recreate');
userTalkPage.setFollowRedirect(true);
userTalkPage.append();
});
}
});
if( params.patrol ) {
pageobj.patrol();
}
},
translationListPage: function friendlytagCallbacksTranslationListPage(pageobj) {
var old_text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var templateText = "{{subst:" + params.template + "|pg=" + Morebits.pageNameNorm + "|Language=" +
(params.lang || "uncertain") + "|Comments=" + params.reason.trim() + "}} ~~~~";
var text, summary;
if (params.template === "duflu") {
text = old_text + "\n\n" + templateText;
summary = "Translation cleanup requested on ";
} else {
text = old_text.replace(/\n+(==\s?Translated pages that could still use some cleanup\s?==)/,
"\n\n" + templateText + "\n\n$1");
summary = "Translation" + (params.lang ? (" from " + params.lang) : "") + " requested on ";
}
if (text === old_text) {
statelem.error('failed to find target spot for the discussion');
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary(summary + " [[" + Morebits.pageNameNorm + "]]" + Twinkle.getPref('summaryAd'));
pageobj.setCreateOption('recreate');
pageobj.save();
},
file: function friendlytagCallbacksFile(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var summary = "Adding ";
// Add maintenance tags
if (params.tags.length) {
var tagtext = "", currentTag;
$.each(params.tags, function(k, tag) {
// when other commons-related tags are placed, remove "move to Commons" tag
if (["Keep local", "subst:ncd", "Do not move to Commons_reason", "Do not move to Commons",
"Now Commons"].indexOf(tag) !== -1) {
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, "");
}
if (tag === "SVG version available") {
text = text.replace(/\{\{((convert to |convertto|should be |shouldbe|to)?svg|badpng|vectorize)[^}]*\}\}/gi, "");
}
currentTag = "{{" + (tag === "Do not move to Commons_reason" ? "Do not move to Commons" : tag);
var input;
switch (tag) {
case "subst:ncd":
/* falls through */
case "Keep local":
input = prompt( "{{" + (tag === "subst:ncd" ? "Now Commons" : tag) +
"}} - Enter the name of the image on Commons (if different from local name), excluding the File: prefix:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += '|1=' + input;
}
break;
case "Rename media":
input = prompt( "{{Rename media}} - Enter the new name for the image (optional):", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
input = prompt( "{{Rename media}} - Enter the reason for the rename (optional):", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|2=" + input;
}
break;
case "Cleanup image":
/* falls through */
case "Cleanup SVG":
input = prompt( "{{" + tag + "}} - Enter the reason for cleanup (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
break;
case "Image-Poor-Quality":
input = prompt( "{{Image-Poor-Quality}} - Enter the reason why this image is so bad (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
break;
case "Low quality chem":
input = prompt( "{{Low quality chem}} - Enter the reason why the diagram is disputed (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
break;
case "PNG version available":
/* falls through */
case "SVG version available":
/* falls through */
case "Obsolete":
/* falls through */
case "Duplicate":
input = prompt( "{{" + tag + "}} - Enter the name of the file which replaces this one (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
break;
case "Do not move to Commons_reason":
input = prompt( "{{Do not move to Commons}} - Enter the reason why this image should not be moved to Commons (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|reason=" + input;
}
break;
case "Non-free reduced":
//remove {{non-free reduce}} and redirects
text = text.replace(/\{\{\s*(Template\s*:\s*)?(Non-free reduce|FairUseReduce|Fairusereduce|Fair Use Reduce|Fair use reduce|Reduce size|Reduce|Fair-use reduce|Image-toobig|Comic-ovrsize-img|Non-free-reduce|Nfr|Smaller image|Nonfree reduce)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/ig, "");
currentTag += "|date={{subst:date}}";
break;
case "Copy to Commons":
currentTag += "|human=" + mw.config.get("wgUserName");
break;
default:
break; // don't care
}
if (tag === "Should be SVG") {
currentTag += "|" + params.svgSubcategory;
}
currentTag += "}}\n";
tagtext += currentTag;
summary += "{{" + tag + "}}, ";
return true; // continue
});
if (!tagtext) {
pageobj.getStatusElement().warn("User canceled operation; nothing to do");
return;
}
text = tagtext + text;
}
pageobj.setPageText(text);
pageobj.setEditSummary(summary.substring(0, summary.length - 2) + Twinkle.getPref('summaryAd'));
pageobj.setWatchlist(Twinkle.getFriendlyPref('watchTaggedPages'));
pageobj.setMinorEdit(Twinkle.getFriendlyPref('markTaggedPagesAsMinor'));
pageobj.setCreateOption('nocreate');
pageobj.save();
if( params.patrol ) {
pageobj.patrol();
}
}
};
Twinkle.tag.callback.evaluate = function friendlytagCallbackEvaluate(e) {
var form = e.target;
var params = {};
if (form.patrolPage) {
params.patrol = form.patrolPage.checked;
}
switch (Twinkle.tag.mode) {
case 'article':
params.tags = form.getChecked( 'articleTags' );
params.group = form.group.checked;
params.tagParameters = {
cleanup: form["articleTags.cleanup"] ? form["articleTags.cleanup"].value : null,
copyEdit: form["articleTags.copyEdit"] ? form["articleTags.copyEdit"].value : null,
copypaste: form["articleTags.copypaste"] ? form["articleTags.copypaste"].value : null,
expertSubject: form["articleTags.expertSubject"] ? form["articleTags.expertSubject"].value : null,
globalize: form["articleTags.globalize"] ? form["articleTags.globalize"].value : null,
notability: form["articleTags.notability"] ? form["articleTags.notability"].value : null
};
// common to {{merge}}, {{merge from}}, {{merge to}}
params.mergeTarget = form["articleTags.mergeTarget"] ? form["articleTags.mergeTarget"].value : null;
params.mergeReason = form["articleTags.mergeReason"] ? form["articleTags.mergeReason"].value : null;
params.mergeTagOther = form["articleTags.mergeTagOther"] ? form["articleTags.mergeTagOther"].checked : false;
// common to {{not English}}, {{rough translation}}
params.translationLanguage = form["articleTags.translationLanguage"] ? form["articleTags.translationLanguage"].value : null;
params.translationNotify = form["articleTags.translationNotify"] ? form["articleTags.translationNotify"].checked : null;
params.translationPostAtPNT = form["articleTags.translationPostAtPNT"] ? form["articleTags.translationPostAtPNT"].checked : null;
params.translationComments = form["articleTags.translationComments"] ? form["articleTags.translationComments"].value : null;
break;
case 'file':
params.svgSubcategory = form["imageTags.svgCategory"] ? form["imageTags.svgCategory"].value : null;
params.tags = form.getChecked( 'imageTags' );
break;
case 'redirect':
params.tags = form.getChecked( 'redirectTags' );
break;
default:
alert("Twinkle.tag: unknown mode " + Twinkle.tag.mode);
break;
}
// form validation
if( !params.tags.length ) {
alert( 'You must select at least one tag!' );
return;
}
if( ((params.tags.indexOf("merge") !== -1) + (params.tags.indexOf("merge from") !== -1) +
(params.tags.indexOf("merge to") !== -1)) > 1 ) {
alert( 'Please select only one of {{merge}}, {{merge from}}, and {{merge to}}. If several merges are required, use {{merge}} and separate the article names with pipes (although in this case Twinkle cannot tag the other articles automatically).' );
return;
}
if( (params.tags.indexOf("not English") !== -1) && (params.tags.indexOf("rough translation") !== -1) ) {
alert( 'Please select only one of {{not English}} and {{rough translation}}.' );
return;
}
if( (params.mergeTagOther || params.mergeReason) && params.mergeTarget.indexOf('|') !== -1 ) {
alert( 'Tagging multiple articles in a merge, and starting a discussion for multiple articles, is not supported at the moment. Please turn off "tag other article", and/or clear out the "reason" box, and try again.' );
return;
}
if( params.tags.indexOf('cleanup') !== -1 && params.tagParameters.cleanup.trim && params.tagParameters.cleanup.trim() === "") {
alert( 'You must specify a reason for the {{cleanup}} tag.' );
return;
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Morebits.wiki.actionCompleted.redirect = Morebits.pageNameNorm;
Morebits.wiki.actionCompleted.notice = "Tagging complete, reloading article in a few seconds";
if (Twinkle.tag.mode === 'redirect') {
Morebits.wiki.actionCompleted.followRedirect = false;
}
var wikipedia_page = new Morebits.wiki.page(Morebits.pageNameNorm, "Tagging " + Twinkle.tag.mode);
wikipedia_page.setCallbackParameters(params);
switch (Twinkle.tag.mode) {
case 'article':
/* falls through */
case 'redirect':
wikipedia_page.load(Twinkle.tag.callbacks.main);
return;
case 'file':
wikipedia_page.load(Twinkle.tag.callbacks.file);
return;
default:
alert("Twinkle.tag: unknown mode " + Twinkle.tag.mode);
break;
}
};
})(jQuery);
//</nowiki>
95b4fe9ae962d6e49e32195793ee8ddab5196127
323
2014-01-05T16:00:44Z
Amalthea
0
v2.0-681-g31f8e14: xfd: Restrict NFCR tagging to File namespace; Revert "tag: Remove {{[[Template:orphan|orphan]]}} tag"; morebits: fix a nasty typo in Morebits.wiki.api
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** friendlytag.js: Tag module
****************************************
* Mode of invocation: Tab ("Tag")
* Active on: Existing articles; file pages with a corresponding file
* which is local (not on Commons); existing subpages of
* {Wikipedia|Wikipedia talk}:Articles for creation;
* all redirects
* Config directives in: FriendlyConfig
*/
Twinkle.tag = function friendlytag() {
// redirect tagging
if( Morebits.wiki.isPageRedirect() ) {
Twinkle.tag.mode = 'redirect';
Twinkle.addPortletLink( Twinkle.tag.callback, "Tag", "friendly-tag", "Tag redirect" );
}
// file tagging
else if( mw.config.get('wgNamespaceNumber') === 6 && !document.getElementById("mw-sharedupload") && document.getElementById("mw-imagepage-section-filehistory") ) {
Twinkle.tag.mode = 'file';
Twinkle.addPortletLink( Twinkle.tag.callback, "Tag", "friendly-tag", "Add maintenance tags to file" );
}
// article/draft article tagging
else if( ( mw.config.get('wgNamespaceNumber') === 0 || mw.config.get('wgNamespaceNumber') === 118 || /^Wikipedia( talk)?\:Articles for creation\//.exec(Morebits.pageNameNorm) ) && mw.config.get('wgCurRevisionId') ) {
Twinkle.tag.mode = 'article';
Twinkle.addPortletLink( Twinkle.tag.callback, "Tag", "friendly-tag", "Add maintenance tags to article" );
}
};
Twinkle.tag.callback = function friendlytagCallback( uid ) {
var Window = new Morebits.simpleWindow( 630, (Twinkle.tag.mode === "article") ? 450 : 400 );
Window.setScriptName( "Twinkle" );
// anyone got a good policy/guideline/info page/instructional page link??
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#tag" );
var form = new Morebits.quickForm( Twinkle.tag.callback.evaluate );
if (document.getElementsByClassName("patrollink").length) {
form.append( {
type: 'checkbox',
list: [
{
label: 'Mark the page as patrolled',
value: 'patrolPage',
name: 'patrolPage',
checked: Twinkle.getFriendlyPref('markTaggedPagesAsPatrolled')
}
]
} );
}
switch( Twinkle.tag.mode ) {
case 'article':
Window.setTitle( "Article maintenance tagging" );
form.append( {
type: 'checkbox',
list: [
{
label: 'Group inside {{multiple issues}} if possible',
value: 'group',
name: 'group',
tooltip: 'If applying three or more templates supported by {{multiple issues}} and this box is checked, all supported templates will be grouped inside a {{multiple issues}} template.',
checked: Twinkle.getFriendlyPref('groupByDefault')
}
]
}
);
form.append({
type: 'select',
name: 'sortorder',
label: 'View this list:',
tooltip: 'You can change the default view order in your Twinkle preferences (WP:TWPREFS).',
event: Twinkle.tag.updateSortOrder,
list: [
{ type: 'option', value: 'cat', label: 'By categories', selected: Twinkle.getFriendlyPref('tagArticleSortOrder') === 'cat' },
{ type: 'option', value: 'alpha', label: 'In alphabetical order', selected: Twinkle.getFriendlyPref('tagArticleSortOrder') === 'alpha' }
]
});
form.append( { type: 'div', id: 'tagWorkArea' } );
if( Twinkle.getFriendlyPref('customTagList').length ) {
form.append( { type: 'header', label: 'Custom tags' } );
form.append( { type: 'checkbox', name: 'articleTags', list: Twinkle.getFriendlyPref('customTagList') } );
}
break;
case 'file':
Window.setTitle( "File maintenance tagging" );
// TODO: perhaps add custom tags TO list of checkboxes
form.append({ type: 'header', label: 'License and sourcing problem tags' });
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.licenseList } );
form.append({ type: 'header', label: 'Wikimedia Commons-related tags' });
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.commonsList } );
form.append({ type: 'header', label: 'Cleanup tags' } );
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.cleanupList } );
form.append({ type: 'header', label: 'Image quality tags' } );
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.qualityList } );
form.append({ type: 'header', label: 'Replacement tags' });
form.append({ type: 'checkbox', name: 'imageTags', list: Twinkle.tag.file.replacementList } );
break;
case 'redirect':
Window.setTitle( "Redirect tagging" );
form.append({ type: 'header', label:'Spelling, misspelling, tense and capitalization templates' });
form.append({ type: 'checkbox', name: 'redirectTags', list: Twinkle.tag.spellingList });
form.append({ type: 'header', label:'Alternative name templates' });
form.append({ type: 'checkbox', name: 'redirectTags', list: Twinkle.tag.alternativeList });
form.append({ type: 'header', label:'Miscellaneous and administrative redirect templates' });
form.append({ type: 'checkbox', name: 'redirectTags', list: Twinkle.tag.administrativeList });
break;
default:
alert("Twinkle.tag: unknown mode " + Twinkle.tag.mode);
break;
}
form.append( { type:'submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
if (Twinkle.tag.mode === "article") {
// fake a change event on the sort dropdown, to initialize the tag list
var evt = document.createEvent("Event");
evt.initEvent("change", true, true);
result.sortorder.dispatchEvent(evt);
}
};
Twinkle.tag.checkedTags = [];
Twinkle.tag.updateSortOrder = function(e) {
var sortorder = e.target.value;
var $workarea = $(e.target.form).find("div#tagWorkArea");
Twinkle.tag.checkedTags = e.target.form.getChecked("articleTags");
if (!Twinkle.tag.checkedTags) {
Twinkle.tag.checkedTags = [];
}
// function to generate a checkbox, with appropriate subgroup if needed
var makeCheckbox = function(tag, description) {
var checkbox = { value: tag, label: "{{" + tag + "}}: " + description };
if (Twinkle.tag.checkedTags.indexOf(tag) !== -1) {
checkbox.checked = true;
}
switch (tag) {
case "cleanup":
checkbox.subgroup = {
name: 'cleanup',
type: 'input',
label: 'Specific reason why cleanup is needed: ',
tooltip: 'Required.',
size: 35
};
break;
case "copy edit":
checkbox.subgroup = {
name: 'copyEdit',
type: 'input',
label: '"This article may require copy editing for..." ',
tooltip: 'e.g. "consistent spelling". Optional.',
size: 35
};
break;
case "copypaste":
checkbox.subgroup = {
name: 'copypaste',
type: 'input',
label: 'Source URL: ',
tooltip: 'If known.',
size: 50
};
break;
case "expert-subject":
checkbox.subgroup = {
name: 'expertSubject',
type: 'input',
label: 'Name of relevant WikiProject: ',
tooltip: 'Optionally, enter the name of a WikiProject which might be able to help recruit an expert. Don\'t include the "WikiProject" prefix.'
};
break;
case "globalize":
checkbox.subgroup = {
name: 'globalize',
type: 'select',
list: [
{ label: "{{globalize}}: article may not represent a worldwide view of the subject", value: "globalize" },
{
label: "Region-specific {{globalize}} subtemplates",
list: [
{ label: "{{globalize/Australia}}: article deals primarily with the Australian viewpoint", value: "globalize/Australia" },
{ label: "{{globalize/Canada}}: article deals primarily with the Canadian viewpoint", value: "globalize/Canada" },
{ label: "{{globalize/China}}: article deals primarily with the Chinese viewpoint", value: "globalize/China" },
{ label: "{{globalize/Common law}}: article deals primarily with the viewpoint of common law countries", value: "globalize/Common law" },
{ label: "{{globalize/Eng}}: article deals primarily with the English-speaking viewpoint", value: "globalize/Eng" },
{ label: "{{globalize/Europe}}: article deals primarily with the European viewpoint", value: "globalize/Europe" },
{ label: "{{globalize/France}}: article deals primarily with the French viewpoint", value: "globalize/France" },
{ label: "{{globalize/Germany}}: article deals primarily with the German viewpoint", value: "globalize/Germany" },
{ label: "{{globalize/India}}: article deals primarily with the Indian viewpoint", value: "globalize/India" },
{ label: "{{globalize/Middle East}}: article deals primarily with the Middle Eastern viewpoint", value: "globalize/Middle East" },
{ label: "{{globalize/North America}}: article deals primarily with the North American viewpoint", value: "globalize/North America" },
{ label: "{{globalize/Northern}}: article deals primarily with the northern hemisphere viewpoint", value: "globalize/Northern" },
{ label: "{{globalize/Southern}}: article deals primarily with the southern hemisphere viewpoint", value: "globalize/Southern" },
{ label: "{{globalize/South Africa}}: article deals primarily with the South African viewpoint", value: "globalize/South Africa" },
{ label: "{{globalize/UK}}: article deals primarily with the British viewpoint", value: "globalize/UK" },
{ label: "{{globalize/UK and Canada}}: article deals primarily with the British and Canadian viewpoints", value: "globalize/UK and Canada" },
{ label: "{{globalize/US}}: article deals primarily with the USA viewpoint", value: "globalize/US" },
{ label: "{{globalize/West}}: article deals primarily with the viewpoint of Western countries", value: "globalize/West" }
]
}
]
};
break;
case "merge":
case "merge from":
case "merge to":
var otherTagName = "merge";
switch (tag)
{
case "merge from":
otherTagName = "merge to";
break;
case "merge to":
otherTagName = "merge from";
break;
}
checkbox.subgroup = [
{
name: 'mergeTarget',
type: 'input',
label: 'Other article(s): ',
tooltip: 'If specifying multiple articles, separate them with pipe characters: Article one|Article two'
},
{
name: 'mergeTagOther',
type: 'checkbox',
list: [
{
label: 'Tag the other article with a {{' + otherTagName + '}} tag',
checked: true,
tooltip: 'Only available if a single article name is entered.'
}
]
}
];
if (mw.config.get('wgNamespaceNumber') === 0) {
checkbox.subgroup.push({
name: 'mergeReason',
type: 'textarea',
label: 'Rationale for merge (will be posted on ' +
(tag === "merge to" ? 'the other article\'s' : 'this article\'s') + ' talk page):',
tooltip: 'Optional, but strongly recommended. Leave blank if not wanted. Only available if a single article name is entered.'
});
}
break;
case "not English":
case "rough translation":
checkbox.subgroup = [
{
name: 'translationLanguage',
type: 'input',
label: 'Language of article (if known): ',
tooltip: 'Consider looking at [[WP:LRC]] for help. If listing the article at PNT, please try to avoid leaving this box blank, unless you are completely unsure.'
}
];
if (tag === "not English") {
checkbox.subgroup.push({
name: 'translationNotify',
type: 'checkbox',
list: [
{
label: 'Notify article creator',
checked: true,
tooltip: "Places {{uw-notenglish}} on the creator's talk page."
}
]
});
}
checkbox.subgroup.push({
name: 'translationPostAtPNT',
type: 'checkbox',
list: [
{
label: 'List this article at Wikipedia:Pages needing translation into English (PNT)',
checked: true
}
]
});
checkbox.subgroup.push({
name: 'translationComments',
type: 'textarea',
label: 'Additional comments to post at PNT',
tooltip: 'Optional, and only relevant if "List this article ..." above is checked.'
});
break;
case "notability":
checkbox.subgroup = {
name: 'notability',
type: 'select',
list: [
{ label: "{{notability}}: article\'s subject may not meet the general notability guideline", value: "none" },
{ label: "{{notability|Academics}}: notability guideline for academics", value: "Academics" },
{ label: "{{notability|Biographies}}: notability guideline for biographies", value: "Biographies" },
{ label: "{{notability|Books}}: notability guideline for books", value: "Books" },
{ label: "{{notability|Companies}}: notability guidelines for companies and organizations", value: "Companies" },
{ label: "{{notability|Events}}: notability guideline for events", value: "Events" },
{ label: "{{notability|Films}}: notability guideline for films", value: "Films" },
{ label: "{{notability|Music}}: notability guideline for music", value: "Music" },
{ label: "{{notability|Neologisms}}: notability guideline for neologisms", value: "Neologisms" },
{ label: "{{notability|Numbers}}: notability guideline for numbers", value: "Numbers" },
{ label: "{{notability|Products}}: notability guideline for products and services", value: "Products" },
{ label: "{{notability|Sport}}: notability guideline for sports and athletics", value: "Sport" },
{ label: "{{notability|Web}}: notability guideline for web content", value: "Web" }
]
};
break;
default:
break;
}
return checkbox;
};
// categorical sort order
if (sortorder === "cat") {
var div = new Morebits.quickForm.element({
type: "div",
id: "tagWorkArea"
});
// function to iterate through the tags and create a checkbox for each one
var doCategoryCheckboxes = function(subdiv, array) {
var checkboxes = [];
$.each(array, function(k, tag) {
var description = Twinkle.tag.article.tags[tag];
checkboxes.push(makeCheckbox(tag, description));
});
subdiv.append({
type: "checkbox",
name: "articleTags",
list: checkboxes
});
};
var i = 0;
// go through each category and sub-category and append lists of checkboxes
$.each(Twinkle.tag.article.tagCategories, function(title, content) {
div.append({ type: "header", id: "tagHeader" + i, label: title });
var subdiv = div.append({ type: "div", id: "tagSubdiv" + i++ });
if ($.isArray(content)) {
doCategoryCheckboxes(subdiv, content);
} else {
$.each(content, function(subtitle, subcontent) {
subdiv.append({ type: "div", label: [ Morebits.htmlNode("b", subtitle) ] });
doCategoryCheckboxes(subdiv, subcontent);
});
}
});
var rendered = div.render();
$workarea.replaceWith(rendered);
var $rendered = $(rendered);
$rendered.find("h5").css({ 'font-size': '110%', 'margin-top': '1em' });
$rendered.find("div").filter(":has(span.quickformDescription)").css({ 'margin-top': '0.4em' });
}
// alphabetical sort order
else {
var checkboxes = [];
$.each(Twinkle.tag.article.tags, function(tag, description) {
checkboxes.push(makeCheckbox(tag, description));
});
var tags = new Morebits.quickForm.element({
type: "checkbox",
name: "articleTags",
list: checkboxes
});
$workarea.empty().append(tags.render());
}
};
// Tags for ARTICLES start here
Twinkle.tag.article = {};
// A list of all article tags, in alphabetical order
// To ensure tags appear in the default "categorized" view, add them to the tagCategories hash below.
Twinkle.tag.article.tags = {
"advert": "article is written like an advertisement",
"all plot": "article is almost entirely a plot summary",
"autobiography": "article is an autobiography and may not be written neutrally",
"BLP sources": "BLP article needs additional sources for verification",
"BLP unsourced": "BLP article has no sources at all (use BLP PROD instead for new articles)",
"citation style": "article has unclear or inconsistent inline citations",
"cleanup": "article may require cleanup",
"cleanup-reorganize": "article may be in need of reorganization to comply with Wikipedia's layout guidelines",
"close paraphrasing": "article contains close paraphrasing of a non-free copyrighted source",
"COI": "article creator or major contributor may have a conflict of interest",
"condense": "article may have too many section headers dividing up its content",
"confusing": "article may be confusing or unclear",
"context": "article provides insufficient context",
"copy edit": "article needs copy editing for grammar, style, cohesion, tone, and/or spelling",
"copypaste": "article appears to have been copied and pasted from a source",
"dead end": "article has no links to other articles",
"disputed": "article has questionable factual accuracy",
"essay-like": "article is written like an essay and needs cleanup",
"expand language": "article can be expanded with material from a foreign-language Wikipedia",
"expert-subject": "article needs attention from an expert on the subject",
"external links": "article's external links may not follow content policies or guidelines",
"fansite": "article resembles a fansite",
"fiction": "article fails to distinguish between fact and fiction",
"globalize": "article may not represent a worldwide view of the subject",
"GOCEinuse": "article is currently undergoing a major copy edit by the Guild of Copy Editors",
"hoax": "article may be a complete hoax",
"improve categories": "article may require additional categories",
"in-universe": "article subject is fictional and needs rewriting from a non-fictional perspective",
"incoherent": "article is incoherent or very hard to understand",
"in use": "article is undergoing a major edit for a short while",
"lead missing": "article has no lead section and one should be written",
"lead rewrite": "article lead section needs to be rewritten to comply with guidelines",
"lead too long": "article lead section is too long and should be shortened",
"lead too short": "article lead section is too short and should be expanded",
"linkrot": "article uses bare URLs for references, which are prone to link rot",
"merge": "article should be merged with another given article",
"merge from": "another given article should be merged into this one",
"merge to": "article should be merged into another given article",
"metricate": "article exclusively uses non-SI units of measurement",
"more footnotes": "article has some references, but insufficient in-text citations",
"new unreviewed article": "mark article for later review",
"news release": "article reads like a news release",
"no footnotes": "article has references, but no in-text citations",
"non-free": "article may contain excessive or improper use of copyrighted materials",
"notability": "article's subject may not meet the notability guideline",
"not English": "article is written in a language other than English and needs translation",
"one source": "article relies largely or entirely upon a single source",
"original research": "article has original research or unverified claims",
"orphan": "article is linked to from no other articles",
"overcoverage": "article has an extensive bias or disproportional coverage towards one or more specific regions",
"overlinked": "article may have too many duplicate and/or irrelevant links",
"overly detailed": "article contains an excessive amount of intricate detail",
"peacock": "article may contain peacock terms that promote the subject without adding information",
"plot": "plot summary in article is too long",
"POV": "article does not maintain a neutral point of view",
"primary sources": "article relies too heavily on primary sources, and needs secondary sources",
"prose": "article is in a list format that may be better presented using prose",
"recentism": "article is slanted towards recent events",
"ref improve": "article needs additional references or sources for verification",
"rough translation": "article is poorly translated and needs cleanup",
"sections": "article needs to be broken into sections",
"self-published": "article may contain improper references to self-published sources",
"technical": "article may be too technical for the uninitiated reader",
"tense": "article is written in an incorrect tense",
"third-party": "article relies too heavily on affiliated sources, and needs third-party sources",
"tone": "tone of article is not appropriate",
"too few opinions": "article may not include all significant viewpoints",
"uncategorized": "article is uncategorized",
"under construction": "article is currently in the middle of an expansion or major revamping",
"underlinked": "article may require additional wikilinks",
"undue": "article lends undue weight to certain aspects of the subject but not others",
"unreferenced": "article has no references at all",
"unreliable sources": "article's references may not be reliable sources",
"update": "article needs additional up-to-date information added",
"very long": "article is too long",
"weasel": "article neutrality is compromised by the use of weasel words"
};
// A list of tags in order of category
// Tags should be in alphabetical order within the categories
// Add new categories with discretion - the list is long enough as is!
Twinkle.tag.article.tagCategories = {
"Cleanup and maintenance tags": {
"General cleanup": [
"cleanup", // has a subgroup with text input
"copy edit" // has a subgroup with text input
],
"Potentially unwanted content": [
"close paraphrasing",
"copypaste", // has a subgroup with text input
"external links",
"non-free"
],
"Structure, formatting, and lead section": [
"cleanup-reorganize",
"condense",
"lead missing",
"lead rewrite",
"lead too long",
"lead too short",
"sections",
"very long"
],
"Fiction-related cleanup": [
"all plot",
"fiction",
"in-universe",
"plot"
]
},
"General content issues": {
"Importance and notability": [
"notability" // has a subgroup with subcategories
],
"Style of writing": [
"advert",
"essay-like",
"fansite",
"news release",
"prose",
"technical",
"tense",
"tone"
],
"Sense (or lack thereof)": [
"confusing",
"incoherent"
],
"Information and detail": [
"context",
"expert-subject",
"metricate",
"overly detailed",
"undue"
],
"Timeliness": [
"update"
],
"Neutrality, bias, and factual accuracy": [
"autobiography",
"COI",
"disputed",
"hoax",
"globalize", // has a subgroup with subcategories
"overcoverage",
"peacock",
"POV",
"recentism",
"too few opinions",
"weasel"
],
"Verifiability and sources": [
"BLP sources",
"BLP unsourced",
"one source",
"original research",
"primary sources",
"ref improve",
"self-published",
"third-party",
"unreferenced",
"unreliable sources"
]
},
"Specific content issues": {
"Language": [
"not English", // has a subgroup with several options
"rough translation", // has a subgroup with several options
"expand language"
],
"Links": [
"dead end",
"orphan",
"overlinked",
"underlinked"
],
"Referencing technique": [
"citation style",
"linkrot",
"more footnotes",
"no footnotes"
],
"Categories": [
"improve categories",
"uncategorized"
]
},
"Merging": [ // these three have a subgroup with several options
"merge",
"merge from",
"merge to"
],
"Informational": [
"GOCEinuse",
"in use",
"new unreviewed article",
"under construction"
]
};
// Tags for REDIRECTS start here
Twinkle.tag.spellingList = [
{
label: '{{R from abbreviation}}: redirect from a title with an abbreviation',
value: 'R from abbreviation'
},
{
label: '{{R to list entry}}: redirect to a \"list of minor entities\"-type article which contains brief descriptions of subjects not notable enough to have separate articles',
value: 'R to list entry'
},
{
label: '{{R to section}}: similar to {{R to list entry}}, but when list is organized in sections, such as list of characters in a fictional universe.',
value: 'R to section'
},
{
label: '{{R from misspelling}}: redirect from a misspelling or typographical error',
value: 'R from misspelling'
},
{
label: '{{R from alternative spelling}}: redirect from a title with a different spelling',
value: 'R from alternative spelling'
},
{
label: '{{R from plural}}: redirect from a plural word to the singular equivalent',
value: 'R from plural'
},
{
label: '{{R from related word}}: redirect from a related word',
value: 'R from related word'
},
{
label: '{{R with possibilities}}: redirect from a more specific title to a more general, less detailed article, hence something which can and should be expanded',
value: 'R with possibilities'
},
{
label: '{{R from member}}: redirect from a member of a group to a related topic such as the group, organization, or team that he or she belongs to',
value: 'R from member'
},
{
label: '{{R from other capitalisation}}: redirect from a title with another method of capitalisation',
value: 'R from other capitalisation'
}
];
Twinkle.tag.alternativeList = [
{
label: '{{R from alternative name}}: redirect from a title that is another name, a pseudonym, a nickname, or a synonym',
value: 'R from alternative name'
},
{
label: '{{R from full name}}: redirect from a title that is a complete or more complete name',
value: 'R from full name'
},
{
label: '{{R from surname}}: redirect from a title that is a surname',
value: 'R from surname'
},
{
label: '{{R from historic name}}: redirect from another name with a significant historic past as a region, state, city or such, but which is no longer known by that title or name',
value: 'R from historic name'
},
{
label: '{{R from scientific name}}: redirect from the scientific name to the common name',
value: 'R from scientific name'
},
{
label: '{{R to scientific name}}: redirect from the common name to the scientific name',
value: 'R to scientific name'
},
{
label: '{{R from name and country}}: redirect from the specific name to the briefer name',
value: 'R from name and country'
},
{
label: '{{R from alternative language}}: redirect from an English name to a name in another language, or vice-versa',
value: 'R from alternative language'
},
{
label: '{{R from ASCII}}: redirect from a title in basic ASCII to the formal article title, with differences that are not diacritical marks (accents, umlauts, etc.)',
value: 'R from ASCII'
},
{
label: '{{R from title without diacritics}}: redirect to the article title with diacritical marks (accents, umlauts, etc.)',
value: 'R from title without diacritics'
}
];
Twinkle.tag.administrativeList = [
{
label: '{{R from merge}}: redirect from a merged page in order to preserve its edit history',
value: 'R from merge'
},
{
label: '{{R to disambiguation page}}: redirect to a disambiguation page',
value: 'R to disambiguation page'
},
{
label: '{{R from duplicated article}}: redirect to a similar article in order to preserve its edit history',
value: 'R from duplicated article'
},
{
label: '{{R to decade}}: redirect from a year to the decade article',
value: 'R to decade'
},
{
label: '{{R from shortcut}}: redirect from a Wikipedia shortcut',
value: 'R from shortcut'
},
{
label: '{{R from CamelCase}}: redirect from a CamelCase title',
value: 'R from CamelCase'
},
{
label: '{{R from EXIF}}: redirect of a wikilink created from JPEG EXIF information (i.e. the \"metadata\" section on some image description pages)',
value: 'R from EXIF'
},
{
label: '{{R from school}}: redirect from a school article that had very little information',
value: 'R from school'
}
];
// maintenance tags for FILES start here
Twinkle.tag.file = {};
Twinkle.tag.file.licenseList = [
{ label: '{{Bsr}}: source info consists of bare image URL/generic base URL only', value: 'Bsr' },
{ label: '{{Non-free reduce}}: non-low-resolution fair use image (or too-long audio clip, etc)', value: 'Non-free reduce' },
{ label: '{{Non-free reduced}}: fair use media which has been reduced (old versions need to be deleted)', value: 'Non-free reduced' },
{ label: '{{Orphaned non-free revisions}}: fair use media with old revisions that need to be deleted', value: 'subst:orfurrev' }
];
Twinkle.tag.file.commonsList = [
{ label: '{{Copy to Commons}}: free media that should be copied to Commons', value: 'Copy to Commons' },
{ label: '{{Do not move to Commons}} (PD issue): file is PD in the US but not in country of origin', value: 'Do not move to Commons' },
{ label: '{{Do not move to Commons}} (other reason)', value: 'Do not move to Commons_reason' },
{ label: '{{Keep local}}: request to keep local copy of a Commons file', value: 'Keep local' },
{ label: '{{Now Commons}}: file has been copied to Commons', value: 'subst:ncd' }
];
Twinkle.tag.file.cleanupList = [
{ label: '{{Artifacts}}: PNG contains residual compression artifacts', value: 'Artifacts' },
{ label: '{{Bad font}}: SVG uses fonts not available on the thumbnail server', value: 'Bad font' },
{ label: '{{Bad format}}: PDF/DOC/... file should be converted to a more useful format', value: 'Bad format' },
{ label: '{{Bad GIF}}: GIF that should be PNG, JPEG, or SVG', value: 'Bad GIF' },
{ label: '{{Bad JPEG}}: JPEG that should be PNG or SVG', value: 'Bad JPEG' },
{ label: '{{Bad trace}}: auto-traced SVG requiring cleanup', value: 'Bad trace' },
{ label: '{{Cleanup image}}: general cleanup', value: 'Cleanup image' },
{ label: '{{Cleanup SVG}}: SVG needing code and/or appearance cleanup', value: 'Cleanup SVG' },
{ label: '{{ClearType}}: image (not screenshot) with ClearType anti-aliasing', value: 'ClearType' },
{ label: '{{Imagewatermark}}: image contains visible or invisible watermarking', value: 'Imagewatermark' },
{ label: '{{NoCoins}}: image using coins to indicate scale', value: 'NoCoins' },
{ label: '{{Overcompressed JPEG}}: JPEG with high levels of artifacts', value: 'Overcompressed JPEG' },
{ label: '{{Opaque}}: opaque background should be transparent', value: 'Opaque' },
{ label: '{{Remove border}}: unneeded border, white space, etc.', value: 'Remove border' },
{ label: '{{Rename media}}: file should be renamed according to the criteria at [[WP:FMV]]', value: 'Rename media' },
{ label: '{{Should be PNG}}: GIF or JPEG should be lossless', value: 'Should be PNG' },
{
label: '{{Should be SVG}}: PNG, GIF or JPEG should be vector graphics', value: 'Should be SVG',
subgroup: {
name: 'svgCategory',
type: 'select',
list: [
{ label: '{{Should be SVG|other}}', value: 'other' },
{ label: '{{Should be SVG|alphabet}}: character images, font examples, etc.', value: 'alphabet' },
{ label: '{{Should be SVG|chemical}}: chemical diagrams, etc.', value: 'chemical' },
{ label: '{{Should be SVG|circuit}}: electronic circuit diagrams, etc.', value: 'circuit' },
{ label: '{{Should be SVG|coat of arms}}: coats of arms', value: 'coat of arms' },
{ label: '{{Should be SVG|diagram}}: diagrams that do not fit any other subcategory', value: 'diagram' },
{ label: '{{Should be SVG|emblem}}: emblems, free/libre logos, insignias, etc.', value: 'emblem' },
{ label: '{{Should be SVG|fair use}}: fair-use images, fair-use logos', value: 'fair use' },
{ label: '{{Should be SVG|flag}}: flags', value: 'flag' },
{ label: '{{Should be SVG|graph}}: visual plots of data', value: 'graph' },
{ label: '{{Should be SVG|logo}}: logos', value: 'logo' },
{ label: '{{Should be SVG|map}}: maps', value: 'map' },
{ label: '{{Should be SVG|music}}: musical scales, notes, etc.', value: 'music' },
{ label: '{{Should be SVG|physical}}: "realistic" images of physical objects, people, etc.', value: 'physical' },
{ label: '{{Should be SVG|symbol}}: miscellaneous symbols, icons, etc.', value: 'symbol' }
]
}
},
{ label: '{{Should be text}}: image should be represented as text, tables, or math markup', value: 'Should be text' },
{ label: '{{Split media}}: there are two different images in the upload log which need to be split', value: 'Split media' }
];
Twinkle.tag.file.qualityList = [
{ label: '{{Image-blownout}}', value: 'Image-blownout' },
{ label: '{{Image-out-of-focus}}', value: 'Image-out-of-focus' },
{ label: '{{Image-Poor-Quality}}', value: 'Image-Poor-Quality' },
{ label: '{{Image-underexposure}}', value: 'Image-underexposure' },
{ label: '{{Low quality chem}}: disputed chemical structures', value: 'Low quality chem' }
];
Twinkle.tag.file.replacementList = [
{ label: '{{Duplicate}}: exact duplicate of another file, but not yet orphaned', value: 'Duplicate' },
{ label: '{{Obsolete}}: improved version available', value: 'Obsolete' },
{ label: '{{PNG version available}}', value: 'PNG version available' },
{ label: '{{SVG version available}}', value: 'SVG version available' }
];
// Contains those article tags that *do not* work inside {{multiple issues}}.
Twinkle.tag.multipleIssuesExceptions = [
'copypaste',
'expand language',
'GOCEinuse',
'improve categories',
'in use',
'merge',
'merge from',
'merge to',
'new unreviewed article',
'not English',
'rough translation',
'uncategorized',
'under construction'
];
Twinkle.tag.callbacks = {
main: function( pageobj ) {
var params = pageobj.getCallbackParameters(),
tagRe, tagText = '', summaryText = 'Added',
tags = [], groupableTags = [], i, totalTags;
// Remove tags that become superfluous with this action
var pageText = pageobj.getPageText().replace(/\{\{\s*([Nn]ew unreviewed article|[Uu]nreviewed|[Uu]serspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/g, "");
var addTag = function friendlytagAddTag( tagIndex, tagName ) {
var currentTag = "";
if( tagName === 'uncategorized' || tagName === 'improve categories' ) {
pageText += '\n\n{{' + tagName +
'|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}';
} else {
if( tagName === 'globalize' ) {
currentTag += '{{' + params.tagParameters.globalize;
} else {
currentTag += ( Twinkle.tag.mode === 'redirect' ? '\n' : '' ) + '{{' + tagName;
}
if( tagName === 'notability' && params.tagParameters.notability !== 'none' ) {
currentTag += '|' + params.tagParameters.notability;
}
// prompt for other parameters, based on the tag
switch( tagName ) {
case 'cleanup':
if (params.tagParameters.cleanup) {
currentTag += '|reason=' + params.tagParameters.cleanup;
}
break;
case 'copy edit':
if (params.tagParameters.copyEdit) {
currentTag += '|for=' + params.tagParameters.copyEdit;
}
break;
case 'copypaste':
if (params.tagParameters.copypaste) {
currentTag += '|url=' + params.tagParameters.copypaste;
}
break;
case 'expand language':
currentTag += '|topic=';
var langcode = prompt('Please enter the language code of the other wiki (e.g. "fr", "roa-rup"). \n' +
"This information is required. To skip the {{expand language}} tag, click Cancel.", "");
if (langcode === null || langcode === "") {
Morebits.status.warn("Notice", "{{expand language}} tag skipped by user");
return true; // continue to next tag
} else {
currentTag += '|langcode=' + langcode;
}
var otherart = prompt('Please enter the name of the article in the other wiki (without interwiki prefix). \n' +
"This information is optional. To skip the {{expand language}} tag, click Cancel.", "");
if (otherart === null) {
Morebits.status.warn("Notice", "{{expand language}} tag skipped by user");
return true; // continue to next tag
} else {
currentTag += '|otherarticle=' + otherart;
}
break;
case 'expert-subject':
if (params.tagParameters.expertSubject) {
currentTag += '|1=' + params.tagParameters.expertSubject;
}
break;
case 'news release':
currentTag += '|1=article';
break;
case 'not English':
case 'rough translation':
if (params.translationLanguage) {
currentTag += '|1=' + params.translationLanguage;
}
if (params.translationPostAtPNT) {
currentTag += '|listed=yes';
}
break;
case 'merge':
case 'merge to':
case 'merge from':
if (params.mergeTarget) {
// normalize the merge target for now and later
params.mergeTarget = Morebits.string.toUpperCaseFirstChar(params.mergeTarget.replace(/_/g, ' '));
currentTag += '|' + params.mergeTarget;
// link to the correct section on the talk page, for article space only
if (mw.config.get('wgNamespaceNumber') === 0 && (params.mergeReason || params.discussArticle)) {
if (!params.discussArticle) {
// discussArticle is the article whose talk page will contain the discussion
params.discussArticle = (tagName === "merge to" ? params.mergeTarget : mw.config.get('wgTitle'));
// nonDiscussArticle is the article which won't have the discussion
params.nonDiscussArticle = (tagName === "merge to" ? mw.config.get('wgTitle') : params.mergeTarget);
params.talkDiscussionTitle = 'Proposed merge with ' + params.nonDiscussArticle;
}
currentTag += '|discuss=Talk:' + params.discussArticle + '#' + params.talkDiscussionTitle;
}
}
break;
default:
break;
}
currentTag += (Twinkle.tag.mode === 'redirect') ? '}}' : '|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}\n';
tagText += currentTag;
}
if ( tagIndex > 0 ) {
if( tagIndex === (totalTags - 1) ) {
summaryText += ' and';
} else if ( tagIndex < (totalTags - 1) ) {
summaryText += ',';
}
}
summaryText += ' {{[[';
if( tagName === 'globalize' ) {
summaryText += "Template:" + params.tagParameters.globalize + '|' + params.tagParameters.globalize;
} else {
summaryText += (tagName.indexOf(":") !== -1 ? tagName : ("Template:" + tagName + "|" + tagName));
}
summaryText += ']]}}';
};
if( Twinkle.tag.mode !== 'redirect' ) {
// Check for preexisting tags and separate tags into groupable and non-groupable arrays
for( i = 0; i < params.tags.length; i++ ) {
tagRe = new RegExp( '(\\{\\{' + params.tags[i] + '(\\||\\}\\})|\\|\\s*' + params.tags[i] + '\\s*=[a-z ]+\\d+)', 'im' );
if( !tagRe.exec( pageText ) ) {
if( Twinkle.tag.multipleIssuesExceptions.indexOf(params.tags[i]) === -1 ) {
groupableTags = groupableTags.concat( params.tags[i] );
} else {
tags = tags.concat( params.tags[i] );
}
} else {
Morebits.status.warn( 'Info', 'Found {{' + params.tags[i] +
'}} on the article already...excluding' );
// don't do anything else with merge tags
if (params.tags[i] === "merge" || params.tags[i] === "merge from" ||
params.tags[i] === "merge to") {
params.mergeTarget = params.mergeReason = params.mergeTagOther = false;
}
}
}
var miTest = /\{\{(multiple ?issues|article ?issues|mi)[^}]+\{/im.exec(pageText);
var miOldStyleRegex = /\{\{(multiple ?issues|article ?issues|mi)\s*\|([^{]+)\}\}/im;
var miOldStyleTest = miOldStyleRegex.exec(pageText);
if( ( miTest || miOldStyleTest ) && groupableTags.length > 0 ) {
Morebits.status.info( 'Info', 'Adding supported tags inside existing {{multiple issues}} tag' );
groupableTags.sort();
tagText = "";
totalTags = groupableTags.length;
$.each(groupableTags, addTag);
summaryText += ' tag' + ( groupableTags.length > 1 ? 's' : '' ) + ' (within {{[[Template:multiple issues|multiple issues]]}})';
if( tags.length > 0 ) {
summaryText += ', and';
}
if( miOldStyleTest ) {
// convert tags from old-style to new-style
var split = miOldStyleTest[2].split("|");
$.each(split, function(index, val) {
split[index] = val.replace("=", "|date=").trim();
});
pageText = pageText.replace(miOldStyleRegex, "{{$1|\n{{" + split.join("}}\n{{") + "}}\n" + tagText + "}}\n");
} else {
var miRegex = new RegExp("(\\{\\{\\s*" + miTest[1] + "\\s*(?:\\|(?:\\{\\{[^{}]*\\}\\}|[^{}])*)?)\\}\\}\\s*", "im");
pageText = pageText.replace(miRegex, "$1" + tagText + "}}\n");
}
tagText = "";
} else if( params.group && groupableTags.length >= 3 ) {
Morebits.status.info( 'Info', 'Grouping supported tags inside {{multiple issues}}' );
groupableTags.sort();
tagText += '{{multiple issues|\n';
totalTags = groupableTags.length;
$.each(groupableTags, addTag);
summaryText += ' tags (within {{[[Template:multiple issues|multiple issues]]}})';
if( tags.length > 0 ) {
summaryText += ', and';
}
tagText += '}}\n';
} else {
tags = tags.concat( groupableTags );
}
} else {
// Redirect tagging: Check for pre-existing tags
for( i = 0; i < params.tags.length; i++ ) {
tagRe = new RegExp( '(\\{\\{' + params.tags[i] + '(\\||\\}\\}))', 'im' );
if( !tagRe.exec( pageText ) ) {
tags = tags.concat( params.tags[i] );
} else {
Morebits.status.warn( 'Info', 'Found {{' + params.tags[i] +
'}} on the redirect already...excluding' );
}
}
}
tags.sort();
totalTags = tags.length;
$.each(tags, addTag);
if( Twinkle.tag.mode === 'redirect' ) {
pageText += tagText;
} else {
// smartly insert the new tags after any hatnotes. Regex is a bit more
// complicated than it'd need to be, to allow templates as parameters,
// and to handle whitespace properly.
pageText = pageText.replace(/^\s*(?:((?:\s*\{\{\s*(?:about|correct title|dablink|distinguish|for|other\s?(?:hurricaneuses|people|persons|places|uses(?:of)?)|redirect(?:-acronym)?|see\s?(?:also|wiktionary)|selfref|the)\d*\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\})+(?:\s*\n)?)\s*)?/i,
"$1" + tagText);
}
summaryText += ( tags.length > 0 ? ' tag' + ( tags.length > 1 ? 's' : '' ) : '' ) +
' to ' + Twinkle.tag.mode;
// avoid truncated summaries
if (summaryText.length > (254 - Twinkle.getPref('summaryAd').length)) {
summaryText = summaryText.replace(/\[\[[^\|]+\|([^\]]+)\]\]/g, "$1");
}
pageobj.setPageText(pageText);
pageobj.setEditSummary(summaryText + Twinkle.getPref('summaryAd'));
pageobj.setWatchlist(Twinkle.getFriendlyPref('watchTaggedPages'));
pageobj.setMinorEdit(Twinkle.getFriendlyPref('markTaggedPagesAsMinor'));
pageobj.setCreateOption('nocreate');
pageobj.save(function() {
// special functions for merge tags
if (params.mergeReason) {
// post the rationale on the talk page (only operates in main namespace)
var talkpageText = "\n\n== Proposed merge with [[" + params.nonDiscussArticle + "]] ==\n\n";
talkpageText += params.mergeReason.trim() + " ~~~~";
var talkpage = new Morebits.wiki.page("Talk:" + params.discussArticle, "Posting rationale on talk page");
talkpage.setAppendText(talkpageText);
talkpage.setEditSummary('Proposing to merge [[' + params.nonDiscussArticle + ']] ' +
(tags.indexOf("merge") !== -1 ? 'with' : 'into') + ' [[' + params.discussArticle + ']]' +
Twinkle.getPref('summaryAd'));
talkpage.setWatchlist(Twinkle.getFriendlyPref('watchMergeDiscussions'));
talkpage.setCreateOption('recreate');
talkpage.append();
}
if (params.mergeTagOther) {
// tag the target page if requested
var otherTagName = "merge";
if (tags.indexOf("merge from") !== -1) {
otherTagName = "merge to";
} else if (tags.indexOf("merge to") !== -1) {
otherTagName = "merge from";
}
var newParams = {
tags: [otherTagName],
mergeTarget: Morebits.pageNameNorm,
discussArticle: params.discussArticle,
talkDiscussionTitle: params.talkDiscussionTitle
};
var otherpage = new Morebits.wiki.page(params.mergeTarget, "Tagging other page (" +
params.mergeTarget + ")");
otherpage.setCallbackParameters(newParams);
otherpage.load(Twinkle.tag.callbacks.main);
}
// post at WP:PNT for {{not English}} and {{rough translation}} tag
if (params.translationPostAtPNT) {
var pntPage = new Morebits.wiki.page('Wikipedia:Pages needing translation into English',
"Listing article at Wikipedia:Pages needing translation into English");
pntPage.setFollowRedirect(true);
pntPage.setCallbackParameters({
template: params.tags.indexOf("rough translation") !== -1 ? "duflu" : "needtrans",
lang: params.translationLanguage,
reason: params.translationComments
});
pntPage.load(Twinkle.tag.callbacks.translationListPage);
}
if (params.translationNotify) {
pageobj.lookupCreator(function(innerPageobj) {
var initialContrib = innerPageobj.getCreator();
var userTalkPage = new Morebits.wiki.page('User talk:' + initialContrib,
'Notifying initial contributor (' + initialContrib + ')');
var notifytext = "\n\n== Your article [[" + Morebits.pageNameNorm + "]]==\n" +
"{{subst:uw-notenglish|1=" + Morebits.pageNameNorm +
(params.translationPostAtPNT ? "" : "|nopnt=yes") + "}} ~~~~";
userTalkPage.setAppendText(notifytext);
userTalkPage.setEditSummary("Notice: Please use English when contributing to the English Wikipedia." +
Twinkle.getPref('summaryAd'));
userTalkPage.setCreateOption('recreate');
userTalkPage.setFollowRedirect(true);
userTalkPage.append();
});
}
});
if( params.patrol ) {
pageobj.patrol();
}
},
translationListPage: function friendlytagCallbacksTranslationListPage(pageobj) {
var old_text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var templateText = "{{subst:" + params.template + "|pg=" + Morebits.pageNameNorm + "|Language=" +
(params.lang || "uncertain") + "|Comments=" + params.reason.trim() + "}} ~~~~";
var text, summary;
if (params.template === "duflu") {
text = old_text + "\n\n" + templateText;
summary = "Translation cleanup requested on ";
} else {
text = old_text.replace(/\n+(==\s?Translated pages that could still use some cleanup\s?==)/,
"\n\n" + templateText + "\n\n$1");
summary = "Translation" + (params.lang ? (" from " + params.lang) : "") + " requested on ";
}
if (text === old_text) {
statelem.error('failed to find target spot for the discussion');
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary(summary + " [[" + Morebits.pageNameNorm + "]]" + Twinkle.getPref('summaryAd'));
pageobj.setCreateOption('recreate');
pageobj.save();
},
file: function friendlytagCallbacksFile(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var summary = "Adding ";
// Add maintenance tags
if (params.tags.length) {
var tagtext = "", currentTag;
$.each(params.tags, function(k, tag) {
// when other commons-related tags are placed, remove "move to Commons" tag
if (["Keep local", "subst:ncd", "Do not move to Commons_reason", "Do not move to Commons",
"Now Commons"].indexOf(tag) !== -1) {
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, "");
}
if (tag === "SVG version available") {
text = text.replace(/\{\{((convert to |convertto|should be |shouldbe|to)?svg|badpng|vectorize)[^}]*\}\}/gi, "");
}
currentTag = "{{" + (tag === "Do not move to Commons_reason" ? "Do not move to Commons" : tag);
var input;
switch (tag) {
case "subst:ncd":
/* falls through */
case "Keep local":
input = prompt( "{{" + (tag === "subst:ncd" ? "Now Commons" : tag) +
"}} - Enter the name of the image on Commons (if different from local name), excluding the File: prefix:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += '|1=' + input;
}
break;
case "Rename media":
input = prompt( "{{Rename media}} - Enter the new name for the image (optional):", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
input = prompt( "{{Rename media}} - Enter the reason for the rename (optional):", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|2=" + input;
}
break;
case "Cleanup image":
/* falls through */
case "Cleanup SVG":
input = prompt( "{{" + tag + "}} - Enter the reason for cleanup (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
break;
case "Image-Poor-Quality":
input = prompt( "{{Image-Poor-Quality}} - Enter the reason why this image is so bad (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
break;
case "Low quality chem":
input = prompt( "{{Low quality chem}} - Enter the reason why the diagram is disputed (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
break;
case "PNG version available":
/* falls through */
case "SVG version available":
/* falls through */
case "Obsolete":
/* falls through */
case "Duplicate":
input = prompt( "{{" + tag + "}} - Enter the name of the file which replaces this one (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|1=" + input;
}
break;
case "Do not move to Commons_reason":
input = prompt( "{{Do not move to Commons}} - Enter the reason why this image should not be moved to Commons (required). To skip the tag, click Cancel:", "" );
if (input === null) {
return true; // continue
} else if (input !== "") {
currentTag += "|reason=" + input;
}
break;
case "Non-free reduced":
//remove {{non-free reduce}} and redirects
text = text.replace(/\{\{\s*(Template\s*:\s*)?(Non-free reduce|FairUseReduce|Fairusereduce|Fair Use Reduce|Fair use reduce|Reduce size|Reduce|Fair-use reduce|Image-toobig|Comic-ovrsize-img|Non-free-reduce|Nfr|Smaller image|Nonfree reduce)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/ig, "");
currentTag += "|date={{subst:date}}";
break;
case "Copy to Commons":
currentTag += "|human=" + mw.config.get("wgUserName");
break;
default:
break; // don't care
}
if (tag === "Should be SVG") {
currentTag += "|" + params.svgSubcategory;
}
currentTag += "}}\n";
tagtext += currentTag;
summary += "{{" + tag + "}}, ";
return true; // continue
});
if (!tagtext) {
pageobj.getStatusElement().warn("User canceled operation; nothing to do");
return;
}
text = tagtext + text;
}
pageobj.setPageText(text);
pageobj.setEditSummary(summary.substring(0, summary.length - 2) + Twinkle.getPref('summaryAd'));
pageobj.setWatchlist(Twinkle.getFriendlyPref('watchTaggedPages'));
pageobj.setMinorEdit(Twinkle.getFriendlyPref('markTaggedPagesAsMinor'));
pageobj.setCreateOption('nocreate');
pageobj.save();
if( params.patrol ) {
pageobj.patrol();
}
}
};
Twinkle.tag.callback.evaluate = function friendlytagCallbackEvaluate(e) {
var form = e.target;
var params = {};
if (form.patrolPage) {
params.patrol = form.patrolPage.checked;
}
switch (Twinkle.tag.mode) {
case 'article':
params.tags = form.getChecked( 'articleTags' );
params.group = form.group.checked;
params.tagParameters = {
cleanup: form["articleTags.cleanup"] ? form["articleTags.cleanup"].value : null,
copyEdit: form["articleTags.copyEdit"] ? form["articleTags.copyEdit"].value : null,
copypaste: form["articleTags.copypaste"] ? form["articleTags.copypaste"].value : null,
expertSubject: form["articleTags.expertSubject"] ? form["articleTags.expertSubject"].value : null,
globalize: form["articleTags.globalize"] ? form["articleTags.globalize"].value : null,
notability: form["articleTags.notability"] ? form["articleTags.notability"].value : null
};
// common to {{merge}}, {{merge from}}, {{merge to}}
params.mergeTarget = form["articleTags.mergeTarget"] ? form["articleTags.mergeTarget"].value : null;
params.mergeReason = form["articleTags.mergeReason"] ? form["articleTags.mergeReason"].value : null;
params.mergeTagOther = form["articleTags.mergeTagOther"] ? form["articleTags.mergeTagOther"].checked : false;
// common to {{not English}}, {{rough translation}}
params.translationLanguage = form["articleTags.translationLanguage"] ? form["articleTags.translationLanguage"].value : null;
params.translationNotify = form["articleTags.translationNotify"] ? form["articleTags.translationNotify"].checked : null;
params.translationPostAtPNT = form["articleTags.translationPostAtPNT"] ? form["articleTags.translationPostAtPNT"].checked : null;
params.translationComments = form["articleTags.translationComments"] ? form["articleTags.translationComments"].value : null;
break;
case 'file':
params.svgSubcategory = form["imageTags.svgCategory"] ? form["imageTags.svgCategory"].value : null;
params.tags = form.getChecked( 'imageTags' );
break;
case 'redirect':
params.tags = form.getChecked( 'redirectTags' );
break;
default:
alert("Twinkle.tag: unknown mode " + Twinkle.tag.mode);
break;
}
// form validation
if( !params.tags.length ) {
alert( 'You must select at least one tag!' );
return;
}
if( ((params.tags.indexOf("merge") !== -1) + (params.tags.indexOf("merge from") !== -1) +
(params.tags.indexOf("merge to") !== -1)) > 1 ) {
alert( 'Please select only one of {{merge}}, {{merge from}}, and {{merge to}}. If several merges are required, use {{merge}} and separate the article names with pipes (although in this case Twinkle cannot tag the other articles automatically).' );
return;
}
if( (params.tags.indexOf("not English") !== -1) && (params.tags.indexOf("rough translation") !== -1) ) {
alert( 'Please select only one of {{not English}} and {{rough translation}}.' );
return;
}
if( (params.mergeTagOther || params.mergeReason) && params.mergeTarget.indexOf('|') !== -1 ) {
alert( 'Tagging multiple articles in a merge, and starting a discussion for multiple articles, is not supported at the moment. Please turn off "tag other article", and/or clear out the "reason" box, and try again.' );
return;
}
if( params.tags.indexOf('cleanup') !== -1 && params.tagParameters.cleanup.trim && params.tagParameters.cleanup.trim() === "") {
alert( 'You must specify a reason for the {{cleanup}} tag.' );
return;
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Morebits.wiki.actionCompleted.redirect = Morebits.pageNameNorm;
Morebits.wiki.actionCompleted.notice = "Tagging complete, reloading article in a few seconds";
if (Twinkle.tag.mode === 'redirect') {
Morebits.wiki.actionCompleted.followRedirect = false;
}
var wikipedia_page = new Morebits.wiki.page(Morebits.pageNameNorm, "Tagging " + Twinkle.tag.mode);
wikipedia_page.setCallbackParameters(params);
switch (Twinkle.tag.mode) {
case 'article':
/* falls through */
case 'redirect':
wikipedia_page.load(Twinkle.tag.callbacks.main);
return;
case 'file':
wikipedia_page.load(Twinkle.tag.callbacks.file);
return;
default:
alert("Twinkle.tag: unknown mode " + Twinkle.tag.mode);
break;
}
};
})(jQuery);
//</nowiki>
95b4fe9ae962d6e49e32195793ee8ddab5196127
MediaWiki:Gadget-friendlytalkback.js
8
137
344
343
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** friendlytalkback.js: Talkback module
****************************************
* Mode of invocation: Tab ("TB")
* Active on: Existing user talk pages
* Config directives in: FriendlyConfig
*/
Twinkle.talkback = function() {
if ( Morebits.getPageAssociatedUser() === false ) {
return;
}
Twinkle.addPortletLink( Twinkle.talkback.callback, "TB", "friendly-talkback", "Easy talkback" );
};
Twinkle.talkback.callback = function( ) {
if( Morebits.getPageAssociatedUser() === mw.config.get("wgUserName") && !confirm("Is it really so bad that you're talking back to yourself?") ){
return;
}
var Window = new Morebits.simpleWindow( 600, 350 );
Window.setTitle("Talkback");
Window.setScriptName("Twinkle");
Window.addFooterLink( "About {{talkback}}", "Template:Talkback" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#talkback" );
var form = new Morebits.quickForm( callback_evaluate );
form.append({ type: "radio", name: "tbtarget",
list: [
{
label: "Talkback: my talk page",
value: "mytalk",
checked: "true"
},
{
label: "Talkback: other user talk page",
value: "usertalk"
},
{
label: "Talkback: other page",
value: "other"
},
{
label: "Noticeboard notification",
value: "notice"
},
{
label: "\"You've got mail\"",
value: "mail"
}
],
event: callback_change_target
});
form.append({
type: "field",
label: "Work area",
name: "work_area"
});
form.append({ type: "submit" });
var result = form.render();
Window.setContent( result );
Window.display();
// We must init the
var evt = document.createEvent("Event");
evt.initEvent( "change", true, true );
result.tbtarget[0].dispatchEvent( evt );
// Check whether the user has opted out from talkback
// TODO: wgCategories is only set on action=view (bug 45033)
var wgcat = mw.config.get("wgCategories");
if (wgcat.length && wgcat.indexOf("Users who do not wish to receive talkbacks") === -1) {
Twinkle.talkback.optout = false;
} else {
var query = {
action: 'query',
prop: 'extlinks',
titles: mw.config.get('wgPageName'),
elquery: 'userjs.invalid/noTalkback',
ellimit: '1'
};
var wpapi = new Morebits.wiki.api("Fetching talkback opt-out status", query, Twinkle.talkback.callback.optoutStatus);
wpapi.post();
}
};
Twinkle.talkback.optout = null;
Twinkle.talkback.callback.optoutStatus = function(apiobj) {
var xml = apiobj.getXML();
var $el = $(xml).find('el');
if ($el.length) {
Twinkle.talkback.optout = Morebits.getPageAssociatedUser() + " prefers not to receive talkbacks";
var url = $el.text();
if (url.indexOf("reason=") > -1) {
Twinkle.talkback.optout += ": " + decodeURIComponent(url.substring(url.indexOf("reason=") + 7)) + ".";
} else {
Twinkle.talkback.optout += ".";
}
} else {
Twinkle.talkback.optout = false;
}
var $status = $("#twinkle-talkback-optout-message");
if ($status.length) {
$status.append(Twinkle.talkback.optout);
}
};
var prev_page = "";
var prev_section = "";
var prev_message = "";
var callback_change_target = function( e ) {
var value = e.target.values;
var root = e.target.form;
var old_area = Morebits.quickForm.getElements(root, "work_area")[0];
if(root.section) {
prev_section = root.section.value;
}
if(root.message) {
prev_message = root.message.value;
}
if(root.page) {
prev_page = root.page.value;
}
var work_area = new Morebits.quickForm.element({
type: "field",
label: "Talkback information",
name: "work_area"
});
switch( value ) {
case "mytalk":
/* falls through */
default:
work_area.append({
type: "div",
label: "",
style: "color: red",
id: "twinkle-talkback-optout-message"
});
work_area.append({
type:"input",
name:"section",
label:"Linked section (optional)",
tooltip:"The section heading on your talk page where you left a message. Leave empty for no section to be linked.",
value: prev_section
});
break;
case "usertalk":
work_area.append({
type: "div",
label: "",
style: "color: red",
id: "twinkle-talkback-optout-message"
});
work_area.append({
type:"input",
name:"page",
label:"User",
tooltip:"The username of the user on whose talk page you left a message.",
value: prev_page
});
work_area.append({
type:"input",
name:"section",
label:"Linked section (optional)",
tooltip:"The section heading on the page where you left a message. Leave empty for no section to be linked.",
value: prev_section
});
break;
case "notice":
var noticeboard = work_area.append({
type: "select",
name: "noticeboard",
label: "Noticeboard:",
event: function(e) {
if (e.target.value === "afchd") {
Morebits.quickForm.overrideElementLabel(e.target.form.section, "Title of draft (excluding the prefix): ");
Morebits.quickForm.setElementTooltipVisibility(e.target.form.section, false);
} else {
Morebits.quickForm.resetElementLabel(e.target.form.section);
Morebits.quickForm.setElementTooltipVisibility(e.target.form.section, true);
}
}
});
noticeboard.append({
type: "option",
label: "WP:AN (Administrators' noticeboard)",
value: "an"
});
noticeboard.append({
type: "option",
label: "WP:AN3 (Administrators' noticeboard/Edit warring)",
value: "an3"
});
noticeboard.append({
type: "option",
label: "WP:ANI (Administrators' noticeboard/Incidents)",
selected: true,
value: "ani"
});
// let's keep AN and its cousins at the top
noticeboard.append({
type: "option",
label: "WP:AFCHD (Articles for creation/Help desk)",
value: "afchd"
});
noticeboard.append({
type: "option",
label: "WP:COIN (Conflict of interest noticeboard)",
value: "coin"
});
noticeboard.append({
type: "option",
label: "WP:DRN (Dispute resolution noticeboard)",
value: "drn"
});
noticeboard.append({
type: "option",
label: "WP:HD (Help desk)",
value: "hd"
});
noticeboard.append({
type: "option",
label: "WP:OTRS/N (OTRS noticeboard)",
value: "otrs"
});
noticeboard.append({
type: "option",
label: "WP:THQ (Teahouse question forum)",
value: "th"
});
work_area.append({
type:"input",
name:"section",
label:"Linked thread",
tooltip:"The heading of the relevant thread on the noticeboard page.",
value: prev_section
});
break;
case "other":
work_area.append({
type: "div",
label: "",
style: "color: red",
id: "twinkle-talkback-optout-message"
});
work_area.append({
type:"input",
name:"page",
label:"Full page name",
tooltip:"The full page name where you left the message. For example: 'Wikipedia talk:Twinkle'.",
value: prev_page
});
work_area.append({
type:"input",
name:"section",
label:"Linked section (optional)",
tooltip:"The section heading on the page where you left a message. Leave empty for no section to be linked.",
value: prev_section
});
break;
case "mail":
work_area.append({
type:"input",
name:"section",
label:"Subject of email (optional)",
tooltip:"The subject line of the email you sent."
});
break;
}
if (value !== "notice") {
work_area.append({ type:"textarea", label:"Additional message (optional):", name:"message", tooltip:"An additional message that you would like to leave below the talkback template. Your signature will be added to the end of the message if you leave one." });
}
work_area = work_area.render();
root.replaceChild( work_area, old_area );
if (root.message) {
root.message.value = prev_message;
}
if (Twinkle.talkback.optout) {
$("#twinkle-talkback-optout-message").append(Twinkle.talkback.optout);
}
};
var callback_evaluate = function( e ) {
var tbtarget = e.target.getChecked( "tbtarget" )[0];
var page = null;
var section = e.target.section.value;
var fullUserTalkPageName = mw.config.get("wgFormattedNamespaces")[ mw.config.get("wgNamespaceIds").user_talk ] + ":" + Morebits.getPageAssociatedUser();
if( tbtarget === "usertalk" || tbtarget === "other" ) {
page = e.target.page.value;
if( tbtarget === "usertalk" ) {
if( !page ) {
alert("You must specify the username of the user whose talk page you left a message on.");
return;
}
} else {
if( !page ) {
alert("You must specify the full page name when your message is not on a user talk page.");
return;
}
}
} else if (tbtarget === "notice") {
page = e.target.noticeboard.value;
}
var message;
if (e.target.message) {
message = e.target.message.value;
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( e.target );
Morebits.wiki.actionCompleted.redirect = fullUserTalkPageName;
Morebits.wiki.actionCompleted.notice = "Talkback complete; reloading talk page in a few seconds";
var talkpage = new Morebits.wiki.page(fullUserTalkPageName, "Adding talkback");
var tbPageName = (tbtarget === "mytalk") ? mw.config.get("wgUserName") : page;
var text;
if ( tbtarget === "notice" ) {
switch (page) {
case "afchd":
text += "\n\n{{subst:AFCHD/u|" + section + "}} ~~~~";
talkpage.setEditSummary( "You have replies at the [[Wikipedia:AFCHD|Articles for Creation Help Desk]]" + Twinkle.getPref("summaryAd") );
break;
case "an":
text = "\n\n== " + Twinkle.getFriendlyPref("adminNoticeHeading") + " ==\n";
text += "{{subst:ANI-notice|thread=" + section + "|noticeboard=Wikipedia:Administrators' noticeboard}} ~~~~";
talkpage.setEditSummary( "Notice of discussion at [[Wikipedia:Administrators' noticeboard]]" + Twinkle.getPref("summaryAd") );
break;
case "an3":
text = "\n\n{{subst:An3-notice|" + section + "}} ~~~~";
talkpage.setEditSummary( "Notice of discussion at [[Wikipedia:Administrators' noticeboard/Edit warring]]" + Twinkle.getPref("summaryAd") );
break;
case "ani":
text = "\n\n== " + Twinkle.getFriendlyPref("adminNoticeHeading") + " ==\n";
text += "{{subst:ANI-notice|thread=" + section + "|noticeboard=Wikipedia:Administrators' noticeboard/Incidents}} ~~~~";
talkpage.setEditSummary( "Notice of discussion at [[Wikipedia:Administrators' noticeboard/Incidents]]" + Twinkle.getPref("summaryAd") );
break;
case "coin":
text = "\n\n{{subst:Coin-notice|thread=" + section + "}} ~~~~";
talkpage.setEditSummary( "Notice of discussion at [[Wikipedia:Conflict of interest noticeboard]]" + Twinkle.getPref("summaryAd") );
break;
case "drn":
text = "\n\n{{subst:DRN-notice|thread=" + section + "}} ~~~~";
talkpage.setEditSummary( "Notice of discussion at [[Wikipedia:Dispute resolution noticeboard]]" + Twinkle.getPref("summaryAd") );
break;
case "hd":
text = "\n\n== Your question at the Help desk ==\n";
text += "{{helpdeskreply|1=" + section + "|ts=~~~~~}}";
talkpage.setEditSummary( "You have replies at the [[Wikipedia:Help desk|Wikipedia help desk]]" + Twinkle.getPref("summaryAd") );
break;
case "otrs":
text = "\n\n{{OTRSreply|1=" + section + "|2=~~~~}}";
talkpage.setEditSummary( "You have replies at the [[Wikipedia:OTRS noticeboard|OTRS noticeboard]]" + Twinkle.getPref("summaryAd") );
break;
case "th":
text = "\n\n== Teahouse talkback: you've got messages! ==\n{{WP:Teahouse/Teahouse talkback|WP:Teahouse/Questions|" + section + "|ts=~~~~}}";
talkpage.setEditSummary( "You have replies at the [[Wikipedia:Teahouse/Questions|Teahouse question board]]" + Twinkle.getPref("summaryAd") );
break;
default:
throw "Twinkle.talkback, function callback_evaluate: default case reached";
}
} else if ( tbtarget === "mail" ) {
text = "\n\n==" + Twinkle.getFriendlyPref("mailHeading") + "==\n{{you've got mail|subject=";
text += section + "|ts=~~~~~}}";
if( message ) {
text += "\n" + message.trim() + " ~~~~";
} else if( Twinkle.getFriendlyPref("insertTalkbackSignature") ) {
text += "\n~~~~";
}
talkpage.setEditSummary("Notification: You've got mail" + Twinkle.getPref("summaryAd"));
} else {
//clean talkback heading: strip section header markers, were erroneously suggested in the documentation
text = "\n\n==" + Twinkle.getFriendlyPref("talkbackHeading").replace( /^\s*=+\s*(.*?)\s*=+$\s*/, "$1" ) + "==\n{{talkback|";
text += tbPageName;
if( section ) {
text += "|" + section;
}
text += "|ts=~~~~~}}";
if( message ) {
text += "\n" + message.trim() + " ~~~~";
} else if( Twinkle.getFriendlyPref("insertTalkbackSignature") ) {
text += "\n~~~~";
}
talkpage.setEditSummary("Talkback ([[" + (tbtarget === "other" ? "" : "User talk:") + tbPageName +
(section ? ("#" + section) : "") + "]])" + Twinkle.getPref("summaryAd"));
}
talkpage.setAppendText( text );
talkpage.setCreateOption("recreate");
talkpage.setMinorEdit(Twinkle.getFriendlyPref("markTalkbackAsMinor"));
talkpage.setFollowRedirect( true );
talkpage.append();
};
})(jQuery);
//</nowiki>
e6ab37d28d7ae787b5fcec39717407ccfb08547e
343
2013-12-24T13:18:38Z
Amalthea
0
v2.0-675-gf30bb99: welcome: Add {{[[Template:welcometest|welcometest]]}}; talkback: Add AFC help desk talkbacks
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** friendlytalkback.js: Talkback module
****************************************
* Mode of invocation: Tab ("TB")
* Active on: Existing user talk pages
* Config directives in: FriendlyConfig
*/
Twinkle.talkback = function() {
if ( Morebits.getPageAssociatedUser() === false ) {
return;
}
Twinkle.addPortletLink( Twinkle.talkback.callback, "TB", "friendly-talkback", "Easy talkback" );
};
Twinkle.talkback.callback = function( ) {
if( Morebits.getPageAssociatedUser() === mw.config.get("wgUserName") && !confirm("Is it really so bad that you're talking back to yourself?") ){
return;
}
var Window = new Morebits.simpleWindow( 600, 350 );
Window.setTitle("Talkback");
Window.setScriptName("Twinkle");
Window.addFooterLink( "About {{talkback}}", "Template:Talkback" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#talkback" );
var form = new Morebits.quickForm( callback_evaluate );
form.append({ type: "radio", name: "tbtarget",
list: [
{
label: "Talkback: my talk page",
value: "mytalk",
checked: "true"
},
{
label: "Talkback: other user talk page",
value: "usertalk"
},
{
label: "Talkback: other page",
value: "other"
},
{
label: "Noticeboard notification",
value: "notice"
},
{
label: "\"You've got mail\"",
value: "mail"
}
],
event: callback_change_target
});
form.append({
type: "field",
label: "Work area",
name: "work_area"
});
form.append({ type: "submit" });
var result = form.render();
Window.setContent( result );
Window.display();
// We must init the
var evt = document.createEvent("Event");
evt.initEvent( "change", true, true );
result.tbtarget[0].dispatchEvent( evt );
// Check whether the user has opted out from talkback
// TODO: wgCategories is only set on action=view (bug 45033)
var wgcat = mw.config.get("wgCategories");
if (wgcat.length && wgcat.indexOf("Users who do not wish to receive talkbacks") === -1) {
Twinkle.talkback.optout = false;
} else {
var query = {
action: 'query',
prop: 'extlinks',
titles: mw.config.get('wgPageName'),
elquery: 'userjs.invalid/noTalkback',
ellimit: '1'
};
var wpapi = new Morebits.wiki.api("Fetching talkback opt-out status", query, Twinkle.talkback.callback.optoutStatus);
wpapi.post();
}
};
Twinkle.talkback.optout = null;
Twinkle.talkback.callback.optoutStatus = function(apiobj) {
var xml = apiobj.getXML();
var $el = $(xml).find('el');
if ($el.length) {
Twinkle.talkback.optout = Morebits.getPageAssociatedUser() + " prefers not to receive talkbacks";
var url = $el.text();
if (url.indexOf("reason=") > -1) {
Twinkle.talkback.optout += ": " + decodeURIComponent(url.substring(url.indexOf("reason=") + 7)) + ".";
} else {
Twinkle.talkback.optout += ".";
}
} else {
Twinkle.talkback.optout = false;
}
var $status = $("#twinkle-talkback-optout-message");
if ($status.length) {
$status.append(Twinkle.talkback.optout);
}
};
var prev_page = "";
var prev_section = "";
var prev_message = "";
var callback_change_target = function( e ) {
var value = e.target.values;
var root = e.target.form;
var old_area = Morebits.quickForm.getElements(root, "work_area")[0];
if(root.section) {
prev_section = root.section.value;
}
if(root.message) {
prev_message = root.message.value;
}
if(root.page) {
prev_page = root.page.value;
}
var work_area = new Morebits.quickForm.element({
type: "field",
label: "Talkback information",
name: "work_area"
});
switch( value ) {
case "mytalk":
/* falls through */
default:
work_area.append({
type: "div",
label: "",
style: "color: red",
id: "twinkle-talkback-optout-message"
});
work_area.append({
type:"input",
name:"section",
label:"Linked section (optional)",
tooltip:"The section heading on your talk page where you left a message. Leave empty for no section to be linked.",
value: prev_section
});
break;
case "usertalk":
work_area.append({
type: "div",
label: "",
style: "color: red",
id: "twinkle-talkback-optout-message"
});
work_area.append({
type:"input",
name:"page",
label:"User",
tooltip:"The username of the user on whose talk page you left a message.",
value: prev_page
});
work_area.append({
type:"input",
name:"section",
label:"Linked section (optional)",
tooltip:"The section heading on the page where you left a message. Leave empty for no section to be linked.",
value: prev_section
});
break;
case "notice":
var noticeboard = work_area.append({
type: "select",
name: "noticeboard",
label: "Noticeboard:",
event: function(e) {
if (e.target.value === "afchd") {
Morebits.quickForm.overrideElementLabel(e.target.form.section, "Title of draft (excluding the prefix): ");
Morebits.quickForm.setElementTooltipVisibility(e.target.form.section, false);
} else {
Morebits.quickForm.resetElementLabel(e.target.form.section);
Morebits.quickForm.setElementTooltipVisibility(e.target.form.section, true);
}
}
});
noticeboard.append({
type: "option",
label: "WP:AN (Administrators' noticeboard)",
value: "an"
});
noticeboard.append({
type: "option",
label: "WP:AN3 (Administrators' noticeboard/Edit warring)",
value: "an3"
});
noticeboard.append({
type: "option",
label: "WP:ANI (Administrators' noticeboard/Incidents)",
selected: true,
value: "ani"
});
// let's keep AN and its cousins at the top
noticeboard.append({
type: "option",
label: "WP:AFCHD (Articles for creation/Help desk)",
value: "afchd"
});
noticeboard.append({
type: "option",
label: "WP:COIN (Conflict of interest noticeboard)",
value: "coin"
});
noticeboard.append({
type: "option",
label: "WP:DRN (Dispute resolution noticeboard)",
value: "drn"
});
noticeboard.append({
type: "option",
label: "WP:HD (Help desk)",
value: "hd"
});
noticeboard.append({
type: "option",
label: "WP:OTRS/N (OTRS noticeboard)",
value: "otrs"
});
noticeboard.append({
type: "option",
label: "WP:THQ (Teahouse question forum)",
value: "th"
});
work_area.append({
type:"input",
name:"section",
label:"Linked thread",
tooltip:"The heading of the relevant thread on the noticeboard page.",
value: prev_section
});
break;
case "other":
work_area.append({
type: "div",
label: "",
style: "color: red",
id: "twinkle-talkback-optout-message"
});
work_area.append({
type:"input",
name:"page",
label:"Full page name",
tooltip:"The full page name where you left the message. For example: 'Wikipedia talk:Twinkle'.",
value: prev_page
});
work_area.append({
type:"input",
name:"section",
label:"Linked section (optional)",
tooltip:"The section heading on the page where you left a message. Leave empty for no section to be linked.",
value: prev_section
});
break;
case "mail":
work_area.append({
type:"input",
name:"section",
label:"Subject of email (optional)",
tooltip:"The subject line of the email you sent."
});
break;
}
if (value !== "notice") {
work_area.append({ type:"textarea", label:"Additional message (optional):", name:"message", tooltip:"An additional message that you would like to leave below the talkback template. Your signature will be added to the end of the message if you leave one." });
}
work_area = work_area.render();
root.replaceChild( work_area, old_area );
if (root.message) {
root.message.value = prev_message;
}
if (Twinkle.talkback.optout) {
$("#twinkle-talkback-optout-message").append(Twinkle.talkback.optout);
}
};
var callback_evaluate = function( e ) {
var tbtarget = e.target.getChecked( "tbtarget" )[0];
var page = null;
var section = e.target.section.value;
var fullUserTalkPageName = mw.config.get("wgFormattedNamespaces")[ mw.config.get("wgNamespaceIds").user_talk ] + ":" + Morebits.getPageAssociatedUser();
if( tbtarget === "usertalk" || tbtarget === "other" ) {
page = e.target.page.value;
if( tbtarget === "usertalk" ) {
if( !page ) {
alert("You must specify the username of the user whose talk page you left a message on.");
return;
}
} else {
if( !page ) {
alert("You must specify the full page name when your message is not on a user talk page.");
return;
}
}
} else if (tbtarget === "notice") {
page = e.target.noticeboard.value;
}
var message;
if (e.target.message) {
message = e.target.message.value;
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( e.target );
Morebits.wiki.actionCompleted.redirect = fullUserTalkPageName;
Morebits.wiki.actionCompleted.notice = "Talkback complete; reloading talk page in a few seconds";
var talkpage = new Morebits.wiki.page(fullUserTalkPageName, "Adding talkback");
var tbPageName = (tbtarget === "mytalk") ? mw.config.get("wgUserName") : page;
var text;
if ( tbtarget === "notice" ) {
switch (page) {
case "afchd":
text += "\n\n{{subst:AFCHD/u|" + section + "}} ~~~~";
talkpage.setEditSummary( "You have replies at the [[Wikipedia:AFCHD|Articles for Creation Help Desk]]" + Twinkle.getPref("summaryAd") );
break;
case "an":
text = "\n\n== " + Twinkle.getFriendlyPref("adminNoticeHeading") + " ==\n";
text += "{{subst:ANI-notice|thread=" + section + "|noticeboard=Wikipedia:Administrators' noticeboard}} ~~~~";
talkpage.setEditSummary( "Notice of discussion at [[Wikipedia:Administrators' noticeboard]]" + Twinkle.getPref("summaryAd") );
break;
case "an3":
text = "\n\n{{subst:An3-notice|" + section + "}} ~~~~";
talkpage.setEditSummary( "Notice of discussion at [[Wikipedia:Administrators' noticeboard/Edit warring]]" + Twinkle.getPref("summaryAd") );
break;
case "ani":
text = "\n\n== " + Twinkle.getFriendlyPref("adminNoticeHeading") + " ==\n";
text += "{{subst:ANI-notice|thread=" + section + "|noticeboard=Wikipedia:Administrators' noticeboard/Incidents}} ~~~~";
talkpage.setEditSummary( "Notice of discussion at [[Wikipedia:Administrators' noticeboard/Incidents]]" + Twinkle.getPref("summaryAd") );
break;
case "coin":
text = "\n\n{{subst:Coin-notice|thread=" + section + "}} ~~~~";
talkpage.setEditSummary( "Notice of discussion at [[Wikipedia:Conflict of interest noticeboard]]" + Twinkle.getPref("summaryAd") );
break;
case "drn":
text = "\n\n{{subst:DRN-notice|thread=" + section + "}} ~~~~";
talkpage.setEditSummary( "Notice of discussion at [[Wikipedia:Dispute resolution noticeboard]]" + Twinkle.getPref("summaryAd") );
break;
case "hd":
text = "\n\n== Your question at the Help desk ==\n";
text += "{{helpdeskreply|1=" + section + "|ts=~~~~~}}";
talkpage.setEditSummary( "You have replies at the [[Wikipedia:Help desk|Wikipedia help desk]]" + Twinkle.getPref("summaryAd") );
break;
case "otrs":
text = "\n\n{{OTRSreply|1=" + section + "|2=~~~~}}";
talkpage.setEditSummary( "You have replies at the [[Wikipedia:OTRS noticeboard|OTRS noticeboard]]" + Twinkle.getPref("summaryAd") );
break;
case "th":
text = "\n\n== Teahouse talkback: you've got messages! ==\n{{WP:Teahouse/Teahouse talkback|WP:Teahouse/Questions|" + section + "|ts=~~~~}}";
talkpage.setEditSummary( "You have replies at the [[Wikipedia:Teahouse/Questions|Teahouse question board]]" + Twinkle.getPref("summaryAd") );
break;
default:
throw "Twinkle.talkback, function callback_evaluate: default case reached";
}
} else if ( tbtarget === "mail" ) {
text = "\n\n==" + Twinkle.getFriendlyPref("mailHeading") + "==\n{{you've got mail|subject=";
text += section + "|ts=~~~~~}}";
if( message ) {
text += "\n" + message.trim() + " ~~~~";
} else if( Twinkle.getFriendlyPref("insertTalkbackSignature") ) {
text += "\n~~~~";
}
talkpage.setEditSummary("Notification: You've got mail" + Twinkle.getPref("summaryAd"));
} else {
//clean talkback heading: strip section header markers, were erroneously suggested in the documentation
text = "\n\n==" + Twinkle.getFriendlyPref("talkbackHeading").replace( /^\s*=+\s*(.*?)\s*=+$\s*/, "$1" ) + "==\n{{talkback|";
text += tbPageName;
if( section ) {
text += "|" + section;
}
text += "|ts=~~~~~}}";
if( message ) {
text += "\n" + message.trim() + " ~~~~";
} else if( Twinkle.getFriendlyPref("insertTalkbackSignature") ) {
text += "\n~~~~";
}
talkpage.setEditSummary("Talkback ([[" + (tbtarget === "other" ? "" : "User talk:") + tbPageName +
(section ? ("#" + section) : "") + "]])" + Twinkle.getPref("summaryAd"));
}
talkpage.setAppendText( text );
talkpage.setCreateOption("recreate");
talkpage.setMinorEdit(Twinkle.getFriendlyPref("markTalkbackAsMinor"));
talkpage.setFollowRedirect( true );
talkpage.append();
};
})(jQuery);
//</nowiki>
e6ab37d28d7ae787b5fcec39717407ccfb08547e
MediaWiki:Gadget-friendlywelcome.js
8
129
328
327
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** friendlywelcome.js: Welcome module
****************************************
* Mode of invocation: Tab ("Wel"), or from links on diff pages
* Active on: Existing user talk pages, diff pages
* Config directives in: FriendlyConfig
*/
Twinkle.welcome = function friendlywelcome() {
if( Morebits.queryString.exists( 'friendlywelcome' ) ) {
if( Morebits.queryString.get( 'friendlywelcome' ) === 'auto' ) {
Twinkle.welcome.auto();
} else {
Twinkle.welcome.semiauto();
}
} else {
Twinkle.welcome.normal();
}
};
Twinkle.welcome.auto = function() {
if( Morebits.queryString.get( 'action' ) !== 'edit' ) {
// userpage not empty, aborting auto-welcome
return;
}
Twinkle.welcome.welcomeUser();
};
Twinkle.welcome.semiauto = function() {
Twinkle.welcome.callback( mw.config.get( 'wgTitle' ).split( '/' )[0].replace( /\"/, "\\\"") );
};
Twinkle.welcome.normal = function() {
if( Morebits.queryString.exists( 'diff' ) ) {
// check whether the contributors' talk pages exist yet
var $oList = $("#mw-diff-otitle2").find("span.mw-usertoollinks a.new:contains(talk)").first();
var $nList = $("#mw-diff-ntitle2").find("span.mw-usertoollinks a.new:contains(talk)").first();
if( $oList.length > 0 || $nList.length > 0 ) {
var spanTag = function( color, content ) {
var span = document.createElement( 'span' );
span.style.color = color;
span.appendChild( document.createTextNode( content ) );
return span;
};
var welcomeNode = document.createElement('strong');
var welcomeLink = document.createElement('a');
welcomeLink.appendChild( spanTag( 'Black', '[' ) );
welcomeLink.appendChild( spanTag( 'Goldenrod', 'welcome' ) );
welcomeLink.appendChild( spanTag( 'Black', ']' ) );
welcomeNode.appendChild(welcomeLink);
if( $oList.length > 0 ) {
var oHref = $oList.attr("href");
var oWelcomeNode = welcomeNode.cloneNode( true );
oWelcomeNode.firstChild.setAttribute( 'href', oHref + '&' + Morebits.queryString.create( {
'friendlywelcome': Twinkle.getFriendlyPref('quickWelcomeMode') === 'auto' ? 'auto': 'norm',
'vanarticle': Morebits.pageNameNorm
} ) );
$oList[0].parentNode.parentNode.appendChild( document.createTextNode( ' ' ) );
$oList[0].parentNode.parentNode.appendChild( oWelcomeNode );
}
if( $nList.length > 0 ) {
var nHref = $nList.attr("href");
var nWelcomeNode = welcomeNode.cloneNode( true );
nWelcomeNode.firstChild.setAttribute( 'href', nHref + '&' + Morebits.queryString.create( {
'friendlywelcome': Twinkle.getFriendlyPref('quickWelcomeMode') === 'auto' ? 'auto': 'norm',
'vanarticle': Morebits.pageNameNorm
} ) );
$nList[0].parentNode.parentNode.appendChild( document.createTextNode( ' ' ) );
$nList[0].parentNode.parentNode.appendChild( nWelcomeNode );
}
}
}
if( mw.config.get( 'wgNamespaceNumber' ) === 3 ) {
var username = mw.config.get( 'wgTitle' ).split( '/' )[0].replace( /\"/, "\\\""); // only first part before any slashes
Twinkle.addPortletLink( function(){ Twinkle.welcome.callback(username); }, "Wel", "friendly-welcome", "Welcome user" );
}
};
Twinkle.welcome.welcomeUser = function welcomeUser() {
Morebits.status.init( document.getElementById('mw-content-text') );
$( '#catlinks' ).remove();
var params = {
value: Twinkle.getFriendlyPref('quickWelcomeTemplate'),
article: Morebits.queryString.exists( 'vanarticle' ) ? Morebits.queryString.get( 'vanarticle' ) : '',
mode: 'auto'
};
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Welcoming complete, reloading talk page in a few seconds";
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "User talk page modification");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.welcome.callbacks.main);
};
Twinkle.welcome.callback = function friendlywelcomeCallback( uid ) {
if( uid === mw.config.get('wgUserName') && !confirm( 'Are you really sure you want to welcome yourself?...' ) ){
return;
}
var Window = new Morebits.simpleWindow( 600, 420 );
Window.setTitle( "Welcome user" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Welcoming Committee", "WP:WC" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#welcome" );
var form = new Morebits.quickForm( Twinkle.welcome.callback.evaluate );
form.append({
type: 'select',
name: 'type',
label: 'Type of welcome: ',
event: Twinkle.welcome.populateWelcomeList,
list: [
{ type: 'option', value: 'standard', label: 'Standard welcomes', selected: !Morebits.isIPAddress(mw.config.get('wgTitle')) },
{ type: 'option', value: 'anonymous', label: 'IP user welcomes', selected: Morebits.isIPAddress(mw.config.get('wgTitle')) },
{ type: 'option', value: 'wikiProject', label: 'WikiProject welcomes' },
{ type: 'option', value: 'nonEnglish', label: 'Non-English welcomes' }
]
});
form.append( { type: 'div', id: 'welcomeWorkArea' } );
form.append( {
type: 'input',
name: 'article',
label: '* Linked article (if supported by template):',
value:( Morebits.queryString.exists( 'vanarticle' ) ? Morebits.queryString.get( 'vanarticle' ) : '' ),
tooltip: 'An article might be linked from within the welcome if the template supports it. Leave empty for no article to be linked. Templates that support a linked article are marked with an asterisk.'
} );
var previewlink = document.createElement( 'a' );
$(previewlink).click(function(){
Twinkle.welcome.callbacks.preview(result); // |result| is defined below
});
previewlink.style.cursor = "pointer";
previewlink.textContent = 'Preview';
form.append( { type: 'div', name: 'welcomepreview', label: [ previewlink ] } );
form.append( { type: 'submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
// initialize the welcome list
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.type.dispatchEvent( evt );
};
Twinkle.welcome.populateWelcomeList = function(e) {
var type = e.target.value;
var $workarea = $(e.target.form).find("div#welcomeWorkArea");
var div = new Morebits.quickForm.element({
type: "div",
id: "welcomeWorkArea"
});
if ((type === "standard" || type === "anonymous") && Twinkle.getFriendlyPref("customWelcomeList").length) {
div.append({ type: 'header', label: 'Custom welcome templates' });
div.append({
type: 'radio',
name: 'template',
list: Twinkle.getFriendlyPref("customWelcomeList"),
event: Twinkle.welcome.selectTemplate
});
}
var appendTemplates = function(list) {
div.append({
type: 'radio',
name: 'template',
list: list.map(function(obj) {
var properties = Twinkle.welcome.templates[obj];
var result = (properties ? {
value: obj,
label: "{{" + obj + "}}: " + properties.description + (properties.linkedArticle ? "\u00A0*" : ""), // U+00A0 NO-BREAK SPACE
tooltip: properties.tooltip // may be undefined
} : {
value: obj,
label: "{{" + obj + "}}"
});
return result;
}),
event: Twinkle.welcome.selectTemplate
});
};
switch (type) {
case "standard":
div.append({ type: 'header', label: 'General welcome templates' });
appendTemplates([
"welcome",
"welcome-short",
"welcome-personal",
"welcome-graphical",
"welcome-menu",
"welcome-screen",
"welcome-belated",
"welcome student",
"welcome teacher",
"welcome non-latin"
]);
div.append({ type: 'header', label: 'Problem user welcome templates' });
appendTemplates([
"welcomelaws",
"first article",
"welcometest",
"welcomevandal",
"welcomenpov",
"welcomespam",
"welcomeunsourced",
"welcomeauto",
"welcome-COI",
"welcome-image"
]);
break;
case "anonymous":
div.append({ type: 'header', label: 'Anonymous user welcome templates' });
appendTemplates([
"welcome-anon",
"welcome-anon-border",
"welcome-anon-test",
"welcome-anon-unconstructive",
"welcome-anon-constructive"
]);
break;
case "wikiProject":
div.append({ type: 'header', label: 'WikiProject-specific welcome templates' });
appendTemplates([
"welcome-au",
"welcome-bd",
"welcome-bio",
"welcome-cal",
"welcome-conserv",
"welcome-cycling",
"welcome-dbz",
"welcome-et",
"welcome-de",
"welcome-in",
"welcome-math",
"welcome-med",
"welcome-no",
"welcome-pk",
"welcome-phys",
"welcome-pl",
"welcome-roads",
"welcome-rugbyunion",
"welcome-ru",
"welcome-starwars",
"welcome-ch",
"welcome-uk",
"welcome-videogames"
]);
break;
case "nonEnglish":
div.append({ type: 'header', label: 'Non-English welcome templates' });
appendTemplates([
"welcomeen-sq",
"welcomeen-zh",
"welcomeen-nl",
"welcomeen-fi",
"welcomeen-fr",
"welcomeen-de",
"welcomeen-he",
"welcomeen-ja",
"welcomeen-ko",
"welcomeen-mr",
"welcomeen-ml",
"welcomeen-or",
"welcomeen-pt",
"welcomeen-ru",
"welcomeen-es",
"welcomeen-sv",
"welcomeen-uk"
]);
break;
default:
div.append({ type: 'div', label: 'Twinkle.welcome.populateWelcomeList: something went wrong' });
break;
}
var rendered = div.render();
rendered.className = "quickform-scrollbox";
$workarea.replaceWith(rendered);
var firstRadio = e.target.form.template[0];
firstRadio.checked = true;
Twinkle.welcome.selectTemplate({ target: firstRadio });
};
Twinkle.welcome.selectTemplate = function(e) {
var properties = Twinkle.welcome.templates[e.target.values];
e.target.form.article.disabled = (properties ? !properties.linkedArticle : false);
};
// A list of welcome templates and their properties and syntax
// The four fields that are available are "description", "linkedArticle", "syntax", and "tooltip".
// The three magic words that can be used in the "syntax" field are:
// - $USERNAME$ - replaced by the welcomer's username, depending on user's preferences
// - $ARTICLE$ - replaced by an article name, if "linkedArticle" is true
// - $HEADER$ - adds a level 2 header (most templates already include this)
Twinkle.welcome.templates = {
// GENERAL WELCOMES
"welcome": {
description: "standard welcome",
linkedArticle: true,
syntax: "{{subst:welcome|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-short": {
description: "a shorter welcome message",
linkedArticle: false,
syntax: "{{subst:welcome-short|$USERNAME$}} $EXTRA$ ~~~~"
},
"welcome-personal": {
description: "more personal welcome, including a plate of cookies",
linkedArticle: false,
syntax: "{{subst:welcome-personal|$USERNAME$}} ~~~~"
},
"welcome-graphical": {
description: "colorful welcome message with table of about 20 links",
linkedArticle: false,
syntax: "$HEADER$ {{subst:welcome-graphical|$EXTRA$}}"
},
"welcome-menu": {
description: "welcome message with large table of about 60 links",
linkedArticle: false,
syntax: "{{subst:welcome-menu}}"
},
"welcome-screen": {
description: "welcome message with clear, annotated table of 10 links",
linkedArticle: false,
syntax: "$HEADER$ {{subst:welcome-screen|static=true}}"
},
"welcome-belated": {
description: "welcome for users with more substantial contributions",
linkedArticle: false,
syntax: "{{subst:welcome-belated|$USERNAME$}}"
},
"welcome student": {
description: "welcome for students editing as part of an educational class project",
linkedArticle: false,
syntax: "$HEADER$ {{subst:welcome student|$USERNAME$}} ~~~~"
},
"welcome teacher": {
description: "welcome for course instructors involved in an educational class project",
linkedArticle: false,
syntax: "$HEADER$ {{subst:welcome teacher|$USERNAME$}} ~~~~"
},
"welcome non-latin": {
description: "welcome for users with a username containing non-Latin characters",
linkedArticle: false,
syntax: "{{subst:welcome non-latin|$USERNAME$}} ~~~~"
},
// PROBLEM USER WELCOMES
"welcomelaws": {
description: "welcome with information about copyrights, NPOV, the sandbox, and vandalism",
linkedArticle: false,
syntax: "{{subst:welcomelaws|$USERNAME$}} ~~~~"
},
"first article": {
description: "for someone whose first article did not meet page creation guidelines",
linkedArticle: true,
syntax: "{{subst:first article|$ARTICLE$|$USERNAME$}}"
},
"welcometest": {
description: "for someone whose initial efforts appear to be tests",
linkedArticle: true,
syntax: "{{subst:welcometest|$ARTICLE$|$USERNAME$}} ~~~~"
},
"welcomevandal": {
description: "for someone whose initial efforts appear to be vandalism",
linkedArticle: true,
syntax: "{{subst:welcomevandal|$ARTICLE$|$USERNAME$}}"
},
"welcomenpov": {
description: "for someone whose initial efforts do not adhere to the neutral point of view policy",
linkedArticle: true,
syntax: "{{subst:welcomenpov|$ARTICLE$|$USERNAME$}} ~~~~"
},
"welcomespam": {
description: "welcome with additional discussion of anti-spamming policies",
linkedArticle: true,
syntax: "{{subst:welcomespam|$ARTICLE$|$USERNAME$}} ~~~~"
},
"welcomeunsourced": {
description: "for someone whose initial efforts are unsourced",
linkedArticle: true,
syntax: "{{subst:welcomeunsourced|$ARTICLE$|$USERNAME$}} ~~~~"
},
"welcomeauto": {
description: "for someone who created an autobiographical article",
linkedArticle: true,
syntax: "{{subst:welcomeauto|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-COI": {
description: "for someone who has edited in areas where they may have a conflict of interest",
linkedArticle: true,
syntax: "{{subst:welcome-COI|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-image": {
description: "welcome with additional information about images (policy and procedure)",
linkedArticle: false,
syntax: "{{subst:welcome-image|$USERNAME$}}"
},
// ANONYMOUS USER WELCOMES
"welcome-anon": {
description: "for anonymous users; encourages creating an account",
linkedArticle: true,
syntax: "{{subst:welcome-anon|art=$ARTICLE$}} ~~~~"
},
"welcome-anon-border": {
description: "similar to {{welcome-anon}}, but has a border and uses clearer language",
linkedArticle: false,
syntax: "{{subst:welcome-anon-border}}"
},
"welcome-anon-test": {
description: "for anonymous users who have performed test edits",
linkedArticle: true,
syntax: "{{subst:welcome-anon-test|$ARTICLE$|$USERNAME$}} ~~~~"
},
"welcome-anon-unconstructive": {
description: "for anonymous users who have vandalized or made unhelpful edits",
linkedArticle: true,
syntax: "{{subst:welcome-anon-unconstructive|$ARTICLE$|$USERNAME$}}"
},
"welcome-anon-constructive": {
description: "for anonymous users who fight vandalism or edit constructively",
linkedArticle: true,
syntax: "{{subst:welcome-anon-constructive|art=$ARTICLE$}}"
},
// WIKIPROJECT-SPECIFIC WELCOMES
"welcome-au": {
description: "welcome for users with an apparent interest in Australia topics",
linkedArticle: false,
syntax: "{{subst:welcome-au}} ~~~~"
},
"welcome-bd": {
description: "welcome for users with an apparent interest in Bangladesh topics",
linkedArticle: true,
syntax: "{{subst:welcome-bd|$USERNAME$||$EXTRA$|art=$ARTICLE$}} ~~~~"
},
"welcome-bio": {
description: "welcome for users with an apparent interest in biographical topics",
linkedArticle: false,
syntax: "{{subst:welcome-bio}} ~~~~"
},
"welcome-cal": {
description: "welcome for users with an apparent interest in California topics",
linkedArticle: false,
syntax: "{{subst:welcome-cal}} ~~~~"
},
"welcome-conserv": {
description: "welcome for users with an apparent interest in conservatism topics",
linkedArticle: false,
syntax: "{{subst:welcome-conserv}}"
},
"welcome-cycling": {
description: "welcome for users with an apparent interest in cycling topics",
linkedArticle: false,
syntax: "{{subst:welcome-cycling}} ~~~~"
},
"welcome-dbz": {
description: "welcome for users with an apparent interest in Dragon Ball topics",
linkedArticle: false,
syntax: "{{subst:welcome-dbz|$EXTRA$|sig=~~~~}}"
},
"welcome-et": {
description: "welcome for users with an apparent interest in Estonia topics",
linkedArticle: false,
syntax: "{{subst:welcome-et}}"
},
"welcome-de": {
description: "welcome for users with an apparent interest in Germany topics",
linkedArticle: false,
syntax: "{{subst:welcome-de}} ~~~~"
},
"welcome-in": {
description: "welcome for users with an apparent interest in India topics",
linkedArticle: true,
syntax: "{{subst:welcome-in|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-math": {
description: "welcome for users with an apparent interest in mathematical topics",
linkedArticle: true,
syntax: "{{subst:welcome-math|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-med": {
description: "welcome for users with an apparent interest in medicine topics",
linkedArticle: true,
syntax: "{{subst:welcome-med|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-no": {
description: "welcome for users with an apparent interest in Norway topics",
linkedArticle: false,
syntax: "{{subst:welcome-no}} ~~~~"
},
"welcome-pk": {
description: "welcome for users with an apparent interest in Pakistan topics",
linkedArticle: true,
syntax: "{{subst:welcome-pk|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-phys": {
description: "welcome for users with an apparent interest in physics topics",
linkedArticle: true,
syntax: "{{subst:welcome-phys|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-pl": {
description: "welcome for users with an apparent interest in Poland topics",
linkedArticle: false,
syntax: "{{subst:welcome-pl}} ~~~~"
},
"welcome-rugbyunion": {
description: "welcome for users with an apparent interest in rugby union topics",
linkedArticle: false,
syntax: "{{subst:welcome-rugbyunion}} ~~~~"
},
"welcome-ru": {
description: "welcome for users with an apparent interest in Russia topics",
linkedArticle: false,
syntax: "{{subst:welcome-ru}} ~~~~"
},
"welcome-starwars": {
description: "welcome for users with an apparent interest in Star Wars topics",
linkedArticle: false,
syntax: "{{subst:welcome-starwars}} ~~~~"
},
"welcome-ch": {
description: "welcome for users with an apparent interest in Switzerland topics",
linkedArticle: true,
syntax: "{{subst:welcome-ch|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-uk": {
description: "welcome for users with an apparent interest in Ukraine topics",
linkedArticle: false,
syntax: "{{subst:welcome-uk}} ~~~~"
},
"welcome-roads": {
description: "welcome for users with an apparent interest in roads and highways topics",
linkedArticle: false,
syntax: "{{subst:welcome-roads}}"
},
"welcome-videogames": {
description: "welcome for users with an apparent interest in video game topics",
linkedArticle: false,
syntax: "{{subst:welcome-videogames}}"
},
// NON-ENGLISH WELCOMES
"welcomeen-sq": {
description: "welcome for users whose first language appears to be Albanian",
linkedArticle: false,
syntax: "{{subst:welcomeen-sq}}"
},
"welcomeen-zh": {
description: "welcome for users whose first language appears to be Chinese",
linkedArticle: false,
syntax: "{{subst:welcomeen-zh}}"
},
"welcomeen-nl": {
description: "welcome for users whose first language appears to be Dutch",
linkedArticle: false,
syntax: "{{subst:welcomeen-nl}}"
},
"welcomeen-fi": {
description: "welcome for users whose first language appears to be Finnish",
linkedArticle: false,
syntax: "{{subst:welcomeen-fi}}"
},
"welcomeen-fr": {
description: "welcome for users whose first language appears to be French",
linkedArticle: false,
syntax: "{{subst:welcomeen-fr}}"
},
"welcomeen-de": {
description: "welcome for users whose first language appears to be German",
linkedArticle: false,
syntax: "{{subst:welcomeen-de}}"
},
"welcomeen-he": {
description: "welcome for users whose first language appears to be Hebrew",
linkedArticle: false,
syntax: "{{subst:welcomeen-he}}"
},
"welcomeen-ja": {
description: "welcome for users whose first language appears to be Japanese",
linkedArticle: false,
syntax: "{{subst:welcomeen-ja}}"
},
"welcomeen-ko": {
description: "welcome for users whose first language appears to be Korean",
linkedArticle: false,
syntax: "{{subst:welcomeen-ko}}"
},
"welcomeen-mr": {
description: "welcome for users whose first language appears to be Marathi",
linkedArticle: false,
syntax: "{{subst:welcomeen-mr}}"
},
"welcomeen-ml": {
description: "welcome for users whose first language appears to be Malayalam",
linkedArticle: false,
syntax: "{{subst:welcomeen-ml}}"
},
"welcomeen-or": {
description: "welcome for users whose first language appears to be Oriya (Odia)",
linkedArticle: false,
syntax: "{{subst:welcomeen-or}}"
},
"welcomeen-pt": {
description: "welcome for users whose first language appears to be Portuguese",
linkedArticle: false,
syntax: "{{subst:welcomeen-pt}}"
},
"welcomeen-ru": {
description: "welcome for users whose first language appears to be Russian",
linkedArticle: false,
syntax: "{{subst:welcomeen-ru}}"
},
"welcomeen-es": {
description: "welcome for users whose first language appears to be Spanish",
linkedArticle: false,
syntax: "{{subst:welcomeen-es}}"
},
"welcomeen-sv": {
description: "welcome for users whose first language appears to be Swedish",
linkedArticle: false,
syntax: "{{subst:welcomeen-sv}}"
},
"welcomeen-uk": {
description: "welcome for users whose first language appears to be Ukrainian",
linkedArticle: false,
syntax: "{{subst:welcomeen-uk}}"
}
};
Twinkle.welcome.getTemplateWikitext = function(template, article) {
var properties = Twinkle.welcome.templates[template];
if (properties) {
return properties.syntax.
replace("$USERNAME$", Twinkle.getFriendlyPref("insertUsername") ? mw.config.get("wgUserName") : "").
replace("$ARTICLE$", article ? article : "").
replace(/\$HEADER\$\s*/, "== Welcome ==\n\n").
replace("$EXTRA$", ""); // EXTRA is not implemented yet
} else {
return "{{subst:" + template + (article ? ("|art=" + article) : "") + "}}" +
(Twinkle.getFriendlyPref("customWelcomeSignature") ? " ~~~~" : "");
}
};
Twinkle.welcome.callbacks = {
preview: function(form) {
var previewDialog = new Morebits.simpleWindow(750, 400);
previewDialog.setTitle("Welcome template preview");
previewDialog.setScriptName("Welcome user");
previewDialog.setModality(true);
var previewdiv = document.createElement("div");
previewdiv.style.marginLeft = previewdiv.style.marginRight = "0.5em";
previewdiv.style.fontSize = "small";
previewDialog.setContent(previewdiv);
var previewer = new Morebits.wiki.preview(previewdiv);
previewer.beginRender(Twinkle.welcome.getTemplateWikitext(form.getChecked("template"), form.article.value));
var submit = document.createElement("input");
submit.setAttribute("type", "submit");
submit.setAttribute("value", "Close");
previewDialog.addContent(submit);
previewDialog.display();
$(submit).click(function(e) {
previewDialog.close();
});
},
main: function( pageobj ) {
var params = pageobj.getCallbackParameters();
var text = pageobj.getPageText();
// abort if mode is auto and form is not empty
if( pageobj.exists() && params.mode === 'auto' ) {
Morebits.status.info( 'Warning', 'User talk page not empty; aborting automatic welcome' );
Morebits.wiki.actionCompleted.event();
return;
}
var welcomeText = Twinkle.welcome.getTemplateWikitext(params.value, params.article);
if( Twinkle.getFriendlyPref('topWelcomes') ) {
text = welcomeText + '\n\n' + text;
} else {
text += "\n" + welcomeText;
}
var summaryText = "Welcome to Wikipedia!";
pageobj.setPageText(text);
pageobj.setEditSummary(summaryText + Twinkle.getPref('summaryAd'));
pageobj.setWatchlist(Twinkle.getFriendlyPref('watchWelcomes'));
pageobj.setCreateOption('recreate');
pageobj.save();
}
};
Twinkle.welcome.callback.evaluate = function friendlywelcomeCallbackEvaluate(e) {
var form = e.target;
var params = {
value: form.getChecked("template"),
article: form.article.value,
mode: 'manual'
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Welcoming complete, reloading talk page in a few seconds";
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "User talk page modification");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.welcome.callbacks.main);
};
})(jQuery);
//</nowiki>
c2b725b89ba409eacba08b192c8c4f3c048ca09a
327
2013-12-24T13:17:01Z
Amalthea
0
v2.0-675-gf30bb99: welcome: Add {{[[Template:welcometest|welcometest]]}}; talkback: Add AFC help desk talkbacks
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** friendlywelcome.js: Welcome module
****************************************
* Mode of invocation: Tab ("Wel"), or from links on diff pages
* Active on: Existing user talk pages, diff pages
* Config directives in: FriendlyConfig
*/
Twinkle.welcome = function friendlywelcome() {
if( Morebits.queryString.exists( 'friendlywelcome' ) ) {
if( Morebits.queryString.get( 'friendlywelcome' ) === 'auto' ) {
Twinkle.welcome.auto();
} else {
Twinkle.welcome.semiauto();
}
} else {
Twinkle.welcome.normal();
}
};
Twinkle.welcome.auto = function() {
if( Morebits.queryString.get( 'action' ) !== 'edit' ) {
// userpage not empty, aborting auto-welcome
return;
}
Twinkle.welcome.welcomeUser();
};
Twinkle.welcome.semiauto = function() {
Twinkle.welcome.callback( mw.config.get( 'wgTitle' ).split( '/' )[0].replace( /\"/, "\\\"") );
};
Twinkle.welcome.normal = function() {
if( Morebits.queryString.exists( 'diff' ) ) {
// check whether the contributors' talk pages exist yet
var $oList = $("#mw-diff-otitle2").find("span.mw-usertoollinks a.new:contains(talk)").first();
var $nList = $("#mw-diff-ntitle2").find("span.mw-usertoollinks a.new:contains(talk)").first();
if( $oList.length > 0 || $nList.length > 0 ) {
var spanTag = function( color, content ) {
var span = document.createElement( 'span' );
span.style.color = color;
span.appendChild( document.createTextNode( content ) );
return span;
};
var welcomeNode = document.createElement('strong');
var welcomeLink = document.createElement('a');
welcomeLink.appendChild( spanTag( 'Black', '[' ) );
welcomeLink.appendChild( spanTag( 'Goldenrod', 'welcome' ) );
welcomeLink.appendChild( spanTag( 'Black', ']' ) );
welcomeNode.appendChild(welcomeLink);
if( $oList.length > 0 ) {
var oHref = $oList.attr("href");
var oWelcomeNode = welcomeNode.cloneNode( true );
oWelcomeNode.firstChild.setAttribute( 'href', oHref + '&' + Morebits.queryString.create( {
'friendlywelcome': Twinkle.getFriendlyPref('quickWelcomeMode') === 'auto' ? 'auto': 'norm',
'vanarticle': Morebits.pageNameNorm
} ) );
$oList[0].parentNode.parentNode.appendChild( document.createTextNode( ' ' ) );
$oList[0].parentNode.parentNode.appendChild( oWelcomeNode );
}
if( $nList.length > 0 ) {
var nHref = $nList.attr("href");
var nWelcomeNode = welcomeNode.cloneNode( true );
nWelcomeNode.firstChild.setAttribute( 'href', nHref + '&' + Morebits.queryString.create( {
'friendlywelcome': Twinkle.getFriendlyPref('quickWelcomeMode') === 'auto' ? 'auto': 'norm',
'vanarticle': Morebits.pageNameNorm
} ) );
$nList[0].parentNode.parentNode.appendChild( document.createTextNode( ' ' ) );
$nList[0].parentNode.parentNode.appendChild( nWelcomeNode );
}
}
}
if( mw.config.get( 'wgNamespaceNumber' ) === 3 ) {
var username = mw.config.get( 'wgTitle' ).split( '/' )[0].replace( /\"/, "\\\""); // only first part before any slashes
Twinkle.addPortletLink( function(){ Twinkle.welcome.callback(username); }, "Wel", "friendly-welcome", "Welcome user" );
}
};
Twinkle.welcome.welcomeUser = function welcomeUser() {
Morebits.status.init( document.getElementById('mw-content-text') );
$( '#catlinks' ).remove();
var params = {
value: Twinkle.getFriendlyPref('quickWelcomeTemplate'),
article: Morebits.queryString.exists( 'vanarticle' ) ? Morebits.queryString.get( 'vanarticle' ) : '',
mode: 'auto'
};
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Welcoming complete, reloading talk page in a few seconds";
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "User talk page modification");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.welcome.callbacks.main);
};
Twinkle.welcome.callback = function friendlywelcomeCallback( uid ) {
if( uid === mw.config.get('wgUserName') && !confirm( 'Are you really sure you want to welcome yourself?...' ) ){
return;
}
var Window = new Morebits.simpleWindow( 600, 420 );
Window.setTitle( "Welcome user" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Welcoming Committee", "WP:WC" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#welcome" );
var form = new Morebits.quickForm( Twinkle.welcome.callback.evaluate );
form.append({
type: 'select',
name: 'type',
label: 'Type of welcome: ',
event: Twinkle.welcome.populateWelcomeList,
list: [
{ type: 'option', value: 'standard', label: 'Standard welcomes', selected: !Morebits.isIPAddress(mw.config.get('wgTitle')) },
{ type: 'option', value: 'anonymous', label: 'IP user welcomes', selected: Morebits.isIPAddress(mw.config.get('wgTitle')) },
{ type: 'option', value: 'wikiProject', label: 'WikiProject welcomes' },
{ type: 'option', value: 'nonEnglish', label: 'Non-English welcomes' }
]
});
form.append( { type: 'div', id: 'welcomeWorkArea' } );
form.append( {
type: 'input',
name: 'article',
label: '* Linked article (if supported by template):',
value:( Morebits.queryString.exists( 'vanarticle' ) ? Morebits.queryString.get( 'vanarticle' ) : '' ),
tooltip: 'An article might be linked from within the welcome if the template supports it. Leave empty for no article to be linked. Templates that support a linked article are marked with an asterisk.'
} );
var previewlink = document.createElement( 'a' );
$(previewlink).click(function(){
Twinkle.welcome.callbacks.preview(result); // |result| is defined below
});
previewlink.style.cursor = "pointer";
previewlink.textContent = 'Preview';
form.append( { type: 'div', name: 'welcomepreview', label: [ previewlink ] } );
form.append( { type: 'submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
// initialize the welcome list
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.type.dispatchEvent( evt );
};
Twinkle.welcome.populateWelcomeList = function(e) {
var type = e.target.value;
var $workarea = $(e.target.form).find("div#welcomeWorkArea");
var div = new Morebits.quickForm.element({
type: "div",
id: "welcomeWorkArea"
});
if ((type === "standard" || type === "anonymous") && Twinkle.getFriendlyPref("customWelcomeList").length) {
div.append({ type: 'header', label: 'Custom welcome templates' });
div.append({
type: 'radio',
name: 'template',
list: Twinkle.getFriendlyPref("customWelcomeList"),
event: Twinkle.welcome.selectTemplate
});
}
var appendTemplates = function(list) {
div.append({
type: 'radio',
name: 'template',
list: list.map(function(obj) {
var properties = Twinkle.welcome.templates[obj];
var result = (properties ? {
value: obj,
label: "{{" + obj + "}}: " + properties.description + (properties.linkedArticle ? "\u00A0*" : ""), // U+00A0 NO-BREAK SPACE
tooltip: properties.tooltip // may be undefined
} : {
value: obj,
label: "{{" + obj + "}}"
});
return result;
}),
event: Twinkle.welcome.selectTemplate
});
};
switch (type) {
case "standard":
div.append({ type: 'header', label: 'General welcome templates' });
appendTemplates([
"welcome",
"welcome-short",
"welcome-personal",
"welcome-graphical",
"welcome-menu",
"welcome-screen",
"welcome-belated",
"welcome student",
"welcome teacher",
"welcome non-latin"
]);
div.append({ type: 'header', label: 'Problem user welcome templates' });
appendTemplates([
"welcomelaws",
"first article",
"welcometest",
"welcomevandal",
"welcomenpov",
"welcomespam",
"welcomeunsourced",
"welcomeauto",
"welcome-COI",
"welcome-image"
]);
break;
case "anonymous":
div.append({ type: 'header', label: 'Anonymous user welcome templates' });
appendTemplates([
"welcome-anon",
"welcome-anon-border",
"welcome-anon-test",
"welcome-anon-unconstructive",
"welcome-anon-constructive"
]);
break;
case "wikiProject":
div.append({ type: 'header', label: 'WikiProject-specific welcome templates' });
appendTemplates([
"welcome-au",
"welcome-bd",
"welcome-bio",
"welcome-cal",
"welcome-conserv",
"welcome-cycling",
"welcome-dbz",
"welcome-et",
"welcome-de",
"welcome-in",
"welcome-math",
"welcome-med",
"welcome-no",
"welcome-pk",
"welcome-phys",
"welcome-pl",
"welcome-roads",
"welcome-rugbyunion",
"welcome-ru",
"welcome-starwars",
"welcome-ch",
"welcome-uk",
"welcome-videogames"
]);
break;
case "nonEnglish":
div.append({ type: 'header', label: 'Non-English welcome templates' });
appendTemplates([
"welcomeen-sq",
"welcomeen-zh",
"welcomeen-nl",
"welcomeen-fi",
"welcomeen-fr",
"welcomeen-de",
"welcomeen-he",
"welcomeen-ja",
"welcomeen-ko",
"welcomeen-mr",
"welcomeen-ml",
"welcomeen-or",
"welcomeen-pt",
"welcomeen-ru",
"welcomeen-es",
"welcomeen-sv",
"welcomeen-uk"
]);
break;
default:
div.append({ type: 'div', label: 'Twinkle.welcome.populateWelcomeList: something went wrong' });
break;
}
var rendered = div.render();
rendered.className = "quickform-scrollbox";
$workarea.replaceWith(rendered);
var firstRadio = e.target.form.template[0];
firstRadio.checked = true;
Twinkle.welcome.selectTemplate({ target: firstRadio });
};
Twinkle.welcome.selectTemplate = function(e) {
var properties = Twinkle.welcome.templates[e.target.values];
e.target.form.article.disabled = (properties ? !properties.linkedArticle : false);
};
// A list of welcome templates and their properties and syntax
// The four fields that are available are "description", "linkedArticle", "syntax", and "tooltip".
// The three magic words that can be used in the "syntax" field are:
// - $USERNAME$ - replaced by the welcomer's username, depending on user's preferences
// - $ARTICLE$ - replaced by an article name, if "linkedArticle" is true
// - $HEADER$ - adds a level 2 header (most templates already include this)
Twinkle.welcome.templates = {
// GENERAL WELCOMES
"welcome": {
description: "standard welcome",
linkedArticle: true,
syntax: "{{subst:welcome|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-short": {
description: "a shorter welcome message",
linkedArticle: false,
syntax: "{{subst:welcome-short|$USERNAME$}} $EXTRA$ ~~~~"
},
"welcome-personal": {
description: "more personal welcome, including a plate of cookies",
linkedArticle: false,
syntax: "{{subst:welcome-personal|$USERNAME$}} ~~~~"
},
"welcome-graphical": {
description: "colorful welcome message with table of about 20 links",
linkedArticle: false,
syntax: "$HEADER$ {{subst:welcome-graphical|$EXTRA$}}"
},
"welcome-menu": {
description: "welcome message with large table of about 60 links",
linkedArticle: false,
syntax: "{{subst:welcome-menu}}"
},
"welcome-screen": {
description: "welcome message with clear, annotated table of 10 links",
linkedArticle: false,
syntax: "$HEADER$ {{subst:welcome-screen|static=true}}"
},
"welcome-belated": {
description: "welcome for users with more substantial contributions",
linkedArticle: false,
syntax: "{{subst:welcome-belated|$USERNAME$}}"
},
"welcome student": {
description: "welcome for students editing as part of an educational class project",
linkedArticle: false,
syntax: "$HEADER$ {{subst:welcome student|$USERNAME$}} ~~~~"
},
"welcome teacher": {
description: "welcome for course instructors involved in an educational class project",
linkedArticle: false,
syntax: "$HEADER$ {{subst:welcome teacher|$USERNAME$}} ~~~~"
},
"welcome non-latin": {
description: "welcome for users with a username containing non-Latin characters",
linkedArticle: false,
syntax: "{{subst:welcome non-latin|$USERNAME$}} ~~~~"
},
// PROBLEM USER WELCOMES
"welcomelaws": {
description: "welcome with information about copyrights, NPOV, the sandbox, and vandalism",
linkedArticle: false,
syntax: "{{subst:welcomelaws|$USERNAME$}} ~~~~"
},
"first article": {
description: "for someone whose first article did not meet page creation guidelines",
linkedArticle: true,
syntax: "{{subst:first article|$ARTICLE$|$USERNAME$}}"
},
"welcometest": {
description: "for someone whose initial efforts appear to be tests",
linkedArticle: true,
syntax: "{{subst:welcometest|$ARTICLE$|$USERNAME$}} ~~~~"
},
"welcomevandal": {
description: "for someone whose initial efforts appear to be vandalism",
linkedArticle: true,
syntax: "{{subst:welcomevandal|$ARTICLE$|$USERNAME$}}"
},
"welcomenpov": {
description: "for someone whose initial efforts do not adhere to the neutral point of view policy",
linkedArticle: true,
syntax: "{{subst:welcomenpov|$ARTICLE$|$USERNAME$}} ~~~~"
},
"welcomespam": {
description: "welcome with additional discussion of anti-spamming policies",
linkedArticle: true,
syntax: "{{subst:welcomespam|$ARTICLE$|$USERNAME$}} ~~~~"
},
"welcomeunsourced": {
description: "for someone whose initial efforts are unsourced",
linkedArticle: true,
syntax: "{{subst:welcomeunsourced|$ARTICLE$|$USERNAME$}} ~~~~"
},
"welcomeauto": {
description: "for someone who created an autobiographical article",
linkedArticle: true,
syntax: "{{subst:welcomeauto|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-COI": {
description: "for someone who has edited in areas where they may have a conflict of interest",
linkedArticle: true,
syntax: "{{subst:welcome-COI|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-image": {
description: "welcome with additional information about images (policy and procedure)",
linkedArticle: false,
syntax: "{{subst:welcome-image|$USERNAME$}}"
},
// ANONYMOUS USER WELCOMES
"welcome-anon": {
description: "for anonymous users; encourages creating an account",
linkedArticle: true,
syntax: "{{subst:welcome-anon|art=$ARTICLE$}} ~~~~"
},
"welcome-anon-border": {
description: "similar to {{welcome-anon}}, but has a border and uses clearer language",
linkedArticle: false,
syntax: "{{subst:welcome-anon-border}}"
},
"welcome-anon-test": {
description: "for anonymous users who have performed test edits",
linkedArticle: true,
syntax: "{{subst:welcome-anon-test|$ARTICLE$|$USERNAME$}} ~~~~"
},
"welcome-anon-unconstructive": {
description: "for anonymous users who have vandalized or made unhelpful edits",
linkedArticle: true,
syntax: "{{subst:welcome-anon-unconstructive|$ARTICLE$|$USERNAME$}}"
},
"welcome-anon-constructive": {
description: "for anonymous users who fight vandalism or edit constructively",
linkedArticle: true,
syntax: "{{subst:welcome-anon-constructive|art=$ARTICLE$}}"
},
// WIKIPROJECT-SPECIFIC WELCOMES
"welcome-au": {
description: "welcome for users with an apparent interest in Australia topics",
linkedArticle: false,
syntax: "{{subst:welcome-au}} ~~~~"
},
"welcome-bd": {
description: "welcome for users with an apparent interest in Bangladesh topics",
linkedArticle: true,
syntax: "{{subst:welcome-bd|$USERNAME$||$EXTRA$|art=$ARTICLE$}} ~~~~"
},
"welcome-bio": {
description: "welcome for users with an apparent interest in biographical topics",
linkedArticle: false,
syntax: "{{subst:welcome-bio}} ~~~~"
},
"welcome-cal": {
description: "welcome for users with an apparent interest in California topics",
linkedArticle: false,
syntax: "{{subst:welcome-cal}} ~~~~"
},
"welcome-conserv": {
description: "welcome for users with an apparent interest in conservatism topics",
linkedArticle: false,
syntax: "{{subst:welcome-conserv}}"
},
"welcome-cycling": {
description: "welcome for users with an apparent interest in cycling topics",
linkedArticle: false,
syntax: "{{subst:welcome-cycling}} ~~~~"
},
"welcome-dbz": {
description: "welcome for users with an apparent interest in Dragon Ball topics",
linkedArticle: false,
syntax: "{{subst:welcome-dbz|$EXTRA$|sig=~~~~}}"
},
"welcome-et": {
description: "welcome for users with an apparent interest in Estonia topics",
linkedArticle: false,
syntax: "{{subst:welcome-et}}"
},
"welcome-de": {
description: "welcome for users with an apparent interest in Germany topics",
linkedArticle: false,
syntax: "{{subst:welcome-de}} ~~~~"
},
"welcome-in": {
description: "welcome for users with an apparent interest in India topics",
linkedArticle: true,
syntax: "{{subst:welcome-in|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-math": {
description: "welcome for users with an apparent interest in mathematical topics",
linkedArticle: true,
syntax: "{{subst:welcome-math|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-med": {
description: "welcome for users with an apparent interest in medicine topics",
linkedArticle: true,
syntax: "{{subst:welcome-med|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-no": {
description: "welcome for users with an apparent interest in Norway topics",
linkedArticle: false,
syntax: "{{subst:welcome-no}} ~~~~"
},
"welcome-pk": {
description: "welcome for users with an apparent interest in Pakistan topics",
linkedArticle: true,
syntax: "{{subst:welcome-pk|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-phys": {
description: "welcome for users with an apparent interest in physics topics",
linkedArticle: true,
syntax: "{{subst:welcome-phys|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-pl": {
description: "welcome for users with an apparent interest in Poland topics",
linkedArticle: false,
syntax: "{{subst:welcome-pl}} ~~~~"
},
"welcome-rugbyunion": {
description: "welcome for users with an apparent interest in rugby union topics",
linkedArticle: false,
syntax: "{{subst:welcome-rugbyunion}} ~~~~"
},
"welcome-ru": {
description: "welcome for users with an apparent interest in Russia topics",
linkedArticle: false,
syntax: "{{subst:welcome-ru}} ~~~~"
},
"welcome-starwars": {
description: "welcome for users with an apparent interest in Star Wars topics",
linkedArticle: false,
syntax: "{{subst:welcome-starwars}} ~~~~"
},
"welcome-ch": {
description: "welcome for users with an apparent interest in Switzerland topics",
linkedArticle: true,
syntax: "{{subst:welcome-ch|$USERNAME$|art=$ARTICLE$}} ~~~~"
},
"welcome-uk": {
description: "welcome for users with an apparent interest in Ukraine topics",
linkedArticle: false,
syntax: "{{subst:welcome-uk}} ~~~~"
},
"welcome-roads": {
description: "welcome for users with an apparent interest in roads and highways topics",
linkedArticle: false,
syntax: "{{subst:welcome-roads}}"
},
"welcome-videogames": {
description: "welcome for users with an apparent interest in video game topics",
linkedArticle: false,
syntax: "{{subst:welcome-videogames}}"
},
// NON-ENGLISH WELCOMES
"welcomeen-sq": {
description: "welcome for users whose first language appears to be Albanian",
linkedArticle: false,
syntax: "{{subst:welcomeen-sq}}"
},
"welcomeen-zh": {
description: "welcome for users whose first language appears to be Chinese",
linkedArticle: false,
syntax: "{{subst:welcomeen-zh}}"
},
"welcomeen-nl": {
description: "welcome for users whose first language appears to be Dutch",
linkedArticle: false,
syntax: "{{subst:welcomeen-nl}}"
},
"welcomeen-fi": {
description: "welcome for users whose first language appears to be Finnish",
linkedArticle: false,
syntax: "{{subst:welcomeen-fi}}"
},
"welcomeen-fr": {
description: "welcome for users whose first language appears to be French",
linkedArticle: false,
syntax: "{{subst:welcomeen-fr}}"
},
"welcomeen-de": {
description: "welcome for users whose first language appears to be German",
linkedArticle: false,
syntax: "{{subst:welcomeen-de}}"
},
"welcomeen-he": {
description: "welcome for users whose first language appears to be Hebrew",
linkedArticle: false,
syntax: "{{subst:welcomeen-he}}"
},
"welcomeen-ja": {
description: "welcome for users whose first language appears to be Japanese",
linkedArticle: false,
syntax: "{{subst:welcomeen-ja}}"
},
"welcomeen-ko": {
description: "welcome for users whose first language appears to be Korean",
linkedArticle: false,
syntax: "{{subst:welcomeen-ko}}"
},
"welcomeen-mr": {
description: "welcome for users whose first language appears to be Marathi",
linkedArticle: false,
syntax: "{{subst:welcomeen-mr}}"
},
"welcomeen-ml": {
description: "welcome for users whose first language appears to be Malayalam",
linkedArticle: false,
syntax: "{{subst:welcomeen-ml}}"
},
"welcomeen-or": {
description: "welcome for users whose first language appears to be Oriya (Odia)",
linkedArticle: false,
syntax: "{{subst:welcomeen-or}}"
},
"welcomeen-pt": {
description: "welcome for users whose first language appears to be Portuguese",
linkedArticle: false,
syntax: "{{subst:welcomeen-pt}}"
},
"welcomeen-ru": {
description: "welcome for users whose first language appears to be Russian",
linkedArticle: false,
syntax: "{{subst:welcomeen-ru}}"
},
"welcomeen-es": {
description: "welcome for users whose first language appears to be Spanish",
linkedArticle: false,
syntax: "{{subst:welcomeen-es}}"
},
"welcomeen-sv": {
description: "welcome for users whose first language appears to be Swedish",
linkedArticle: false,
syntax: "{{subst:welcomeen-sv}}"
},
"welcomeen-uk": {
description: "welcome for users whose first language appears to be Ukrainian",
linkedArticle: false,
syntax: "{{subst:welcomeen-uk}}"
}
};
Twinkle.welcome.getTemplateWikitext = function(template, article) {
var properties = Twinkle.welcome.templates[template];
if (properties) {
return properties.syntax.
replace("$USERNAME$", Twinkle.getFriendlyPref("insertUsername") ? mw.config.get("wgUserName") : "").
replace("$ARTICLE$", article ? article : "").
replace(/\$HEADER\$\s*/, "== Welcome ==\n\n").
replace("$EXTRA$", ""); // EXTRA is not implemented yet
} else {
return "{{subst:" + template + (article ? ("|art=" + article) : "") + "}}" +
(Twinkle.getFriendlyPref("customWelcomeSignature") ? " ~~~~" : "");
}
};
Twinkle.welcome.callbacks = {
preview: function(form) {
var previewDialog = new Morebits.simpleWindow(750, 400);
previewDialog.setTitle("Welcome template preview");
previewDialog.setScriptName("Welcome user");
previewDialog.setModality(true);
var previewdiv = document.createElement("div");
previewdiv.style.marginLeft = previewdiv.style.marginRight = "0.5em";
previewdiv.style.fontSize = "small";
previewDialog.setContent(previewdiv);
var previewer = new Morebits.wiki.preview(previewdiv);
previewer.beginRender(Twinkle.welcome.getTemplateWikitext(form.getChecked("template"), form.article.value));
var submit = document.createElement("input");
submit.setAttribute("type", "submit");
submit.setAttribute("value", "Close");
previewDialog.addContent(submit);
previewDialog.display();
$(submit).click(function(e) {
previewDialog.close();
});
},
main: function( pageobj ) {
var params = pageobj.getCallbackParameters();
var text = pageobj.getPageText();
// abort if mode is auto and form is not empty
if( pageobj.exists() && params.mode === 'auto' ) {
Morebits.status.info( 'Warning', 'User talk page not empty; aborting automatic welcome' );
Morebits.wiki.actionCompleted.event();
return;
}
var welcomeText = Twinkle.welcome.getTemplateWikitext(params.value, params.article);
if( Twinkle.getFriendlyPref('topWelcomes') ) {
text = welcomeText + '\n\n' + text;
} else {
text += "\n" + welcomeText;
}
var summaryText = "Welcome to Wikipedia!";
pageobj.setPageText(text);
pageobj.setEditSummary(summaryText + Twinkle.getPref('summaryAd'));
pageobj.setWatchlist(Twinkle.getFriendlyPref('watchWelcomes'));
pageobj.setCreateOption('recreate');
pageobj.save();
}
};
Twinkle.welcome.callback.evaluate = function friendlywelcomeCallbackEvaluate(e) {
var form = e.target;
var params = {
value: form.getChecked("template"),
article: form.article.value,
mode: 'manual'
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Welcoming complete, reloading talk page in a few seconds";
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "User talk page modification");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.welcome.callbacks.main);
};
})(jQuery);
//</nowiki>
c2b725b89ba409eacba08b192c8c4f3c048ca09a
MediaWiki:Gadget-gConfig
8
111
290
289
2014-01-17T00:32:53Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
'''ext.gadget.gConfig''' – preferencje dla gadżetów.
a69c2aa81eb13ddb68a2e5bad310459de8562e8d
289
2012-10-28T18:32:01Z
Matma Rex
0
[[Wikipedia:Patrolowanie nowych stron|Nowa strona]]: '''ext.gadget.gConfig''' – preferencje dla gadżetów.
wikitext
text/x-wiki
'''ext.gadget.gConfig''' – preferencje dla gadżetów.
a69c2aa81eb13ddb68a2e5bad310459de8562e8d
MediaWiki:Gadget-gConfig.css
8
113
294
293
2014-01-17T00:32:53Z
Ffkapa
2
1 wersja
css
text/css
/**
* gConfig is a handy tool to allow users to modify settings of your gadget, with little hassle on your or their side.
*
* See gConfig.js.
*
* Version: 0.3
* Dual-licensed CC-BY-SA 3.0 or newer, GFDL 1.3 or newer
* Author: [[w:pl:User:Matma Rex]]
*/
#gconfig-form table td:first-child { text-align: right; }
#gconfig-form table td:last-child { text-align: left; }
#gconfig-form table td:first-child { vertical-align: top; }
#gconfig-form table td:last-child p:first-child { margin-top: 0 }
.gconfig-pref-legacy-note { font-style: italic; font-size: smaller; line-height: 1em; }
.gconfig-pref-error { color: #a81919; line-height: 1em; }
#gconfig-save-status { display: inline; margin-left: 1em; }
#gconfig-save-button { margin-top: 1em; }
.gconfig-save-error { color: #a81919; }
.gconfig-save-success { color: #519548; }
d1ebb1fb391c0682344626bdb9cc9ccf1e782aa7
293
2012-11-02T18:01:34Z
Matma Rex
0
v0.3
css
text/css
/**
* gConfig is a handy tool to allow users to modify settings of your gadget, with little hassle on your or their side.
*
* See gConfig.js.
*
* Version: 0.3
* Dual-licensed CC-BY-SA 3.0 or newer, GFDL 1.3 or newer
* Author: [[w:pl:User:Matma Rex]]
*/
#gconfig-form table td:first-child { text-align: right; }
#gconfig-form table td:last-child { text-align: left; }
#gconfig-form table td:first-child { vertical-align: top; }
#gconfig-form table td:last-child p:first-child { margin-top: 0 }
.gconfig-pref-legacy-note { font-style: italic; font-size: smaller; line-height: 1em; }
.gconfig-pref-error { color: #a81919; line-height: 1em; }
#gconfig-save-status { display: inline; margin-left: 1em; }
#gconfig-save-button { margin-top: 1em; }
.gconfig-save-error { color: #a81919; }
.gconfig-save-success { color: #519548; }
d1ebb1fb391c0682344626bdb9cc9ccf1e782aa7
MediaWiki:Gadget-gConfig.js
8
112
292
291
2014-01-17T00:32:53Z
Ffkapa
2
1 wersja
javascript
text/javascript
/**
* gConfig is a handy tool to allow users to modify settings of your gadget, with little hassle on your or their side.
*
* Synopsis:
* - register your gadget with its settings: gConfig.register('lipsum', 'Lorem ipsum gadget', [...])
* - access the configuration: gConfig.get('lipsum', 'setting')
*
* For more examples, see per-function docs below.
*
* See also gConfig.css.
*
* Version: 0.4
* Dual-licensed CC-BY-SA 3.0 or newer, GFDL 1.3 or newer
* Author: [[w:pl:User:Matma Rex]], patches: [[w:pl:User:Kaligula]]
*/
(function(mw, $){
mw.loader.using(['jquery.cookie', 'mediawiki', 'mediawiki.api', 'mediawiki.jqueryMsg'], function(){
mw.messages.set({
'gConfig-prefs-page-info': "<p>Na tej stronie możesz zmienić ustawienia włączonych gadżetów.</p><p>Informacje i dokumentacja: <a href='/wiki/Wikipedia:Narzędzia/gConfig'>Wikipedia:Narzędzia/gConfig</a>.</p>",
'gConfig-prefs-page-title': "Preferencje gadżetów",
'gConfig-prefs-no-gadgets': "Obecnie nie masz włączonych żadnych gadżetów korzystających z gConfiga.",
'gConfig-prefs-save': "Zapisz",
'gConfig-prefs-saving': "Zapisywanie...",
'gConfig-prefs-saved': "Zapisano!",
'gConfig-prefs-invalid-values': "Nieprawidłowe wartości.",
'gConfig-prefs-legacy-setting': "To ustawienie jest w tej chwili wpisane na stałe w jednym z twoich plików .js. Usuń je stamtąd, aby stało się modyfikowalne.",
'gConfig-prefs-not-an-integer': "Podana wartość nie jest liczbą całkowitą.",
'gConfig-prefs-out-of-range-min': "Podana wartość jest mniejsza od minimalnej dozwolonej.",
'gConfig-prefs-out-of-range-max': "Podana wartość jest większa od maksymalnej dozwolonej."
});
// Global gConfig object.
var gConfig = {};
// Data of all managed gadgets and settings.
gConfig.data = {};
// Current values of gadgets' settings.
gConfig.settings = {};
var api = new mw.Api();
var optionsToken = null;
// generate internal name for this setting.
// used as input names, cookie names, options' names...
function internalName(gadget, setting)
{
return 'gconfig-'+gadget+'-'+setting;
}
// parse internal name. returns array of [gadget, setting].
function parseInternalName(name)
{
var match = name.match(/^gconfig-([a-zA-Z0-9_]+)-(.+)$/);
var gadget = match[1], setting = match[2];
return [gadget, setting];
}
var totalSettingsCount = 0;
var settingsCurrentCount = 0;
var saveSettingsUserCallback = null;
// saves settings in cookies and in prefs
// settings - array of arrays: [gadget, settingName, value]
// calls saveSettingsCallback after every successful request
function saveSettings(settings, callback)
{
if(!optionsToken) return false;
totalSettingsCount = settings.length;
settingsCurrentCount = 0;
saveSettingsUserCallback = callback;
var grouped = []
for(var i=0; i<settings.length; i++) {
var name = internalName(settings[i][0], settings[i][1]);
var value = settings[i][2];
$.cookie(name, value, {expires: 365, path:'/'});
if((''+value).match(/\|/)) {
api.post({
action:'options', optionname:'userjs-'+name, optionvalue:value, token:optionsToken
}).done(function(j){ saveSettingsCallback(1) });
}
else {
grouped.push('userjs-'+name+'='+value);
}
}
api.post({
action:'options', change:grouped.join('|'), token:optionsToken
}).done(function(j){ saveSettingsCallback(grouped.length) });
return true;
}
function saveSettingsCallback(increment)
{
settingsCurrentCount += increment;
if(settingsCurrentCount == totalSettingsCount)
{
if(saveSettingsUserCallback) saveSettingsUserCallback();
}
}
// reads raw setting from mw.user.options or cookies.
// returns undefined if it's not saved anywhere.
// sets needSynchro to true if data differs or setting is missing.
function readRawSetting(gadget, settingName)
{
var name = internalName(gadget, settingName);
var value = mw.user.options.get('userjs-'+name);
if(value == undefined) value = $.cookie(name);
if(value == undefined || mw.user.options.get('userjs-'+name) != $.cookie(name) ) needSynchro = true;
return value;
}
// validates and canonicalizes setting's values.
// doesn't catch errors raised by validation().
// can throw further errors (for numeric values: not an int, out of range)
function validateAndCanonicalize(value, type, validation)
{
if(type == 'boolean') {
value = (value ? '1' : '');
} else if(type == 'string') {
value = '' + value;
} else if(type == 'integer') {
if(parseInt(value, 10) != parseFloat(value)) throw mw.msg('gConfig-prefs-not-an-integer');
value = parseInt(value, 10);
} else if(type == 'numeric') {
value = parseFloat(value);
}
if(typeof validation == 'function') {
value = validation(value);
} else if($.isArray(validation) && (type == 'integer' || type == 'numeric')) {
var min = validation[0], max = validation[1];
if(value < min) throw mw.msg('gConfig-prefs-out-of-range-min');
if(value > max) throw mw.msg('gConfig-prefs-out-of-range-max');
}
return value;
}
// List of all registered gadgets.
gConfig.registeredGadgets = [];
// Map of internal gadget names => gadget infos (e.g. user-visible gadget names, links).
gConfig.gadgetsInfo = {};
// List of internal names of settings which were loaded using the legacy method.
gConfig.legacySettings = [];
// Register configuration for a new gadget.
//
// * gadget is an internal name, must consist only of ASCII letters, numbers or underscore.
// * gadgetInfo is an object with following keys:
// * name [required]: user-visible name, shown in preferences' headings.
// * descriptionPage: name of gadget's description page.
// * settings is an array of configuration options for this gadget. Each option is an object with the following keys:
// * name [required]: internal name of this setting, not shown anywhere
// * desc [required]: description shown on the prefs page
// * descMode: how to treat the description text. 'plain' (default) for plain text, 'wikitext' for basic wikicode
// parsing (links, text formatting) using jqueryMsg
// * type [required]: boolean / integer / numeric / string, each type is handled differently on the prefs page and validated
// * deflt [required]: default value
// * validation: either an array [min, max] (for numeric/integer types), or a function that performs the validation.
// The function will receive value inputted by user as first (and only) parameter, and to indicate that the value
// is unacceptable must throw an error; the message used will be displayed on the prefs page to the user.
// It may also merely process values - it's return value will be used as the final value for the pref.
// * legacy: intended for migration of old scripts to gConfig. Can be either an array of [object, property] or
// just object, property will be assumed to be the same as setting's name. If object[property] will not be undefined,
// it's value will be taken as the value for this pref and the pref will be marked as legacy and become non-editable.
//
// A lengthy example:
// gConfig.register(
// 'lipsum',
// {
// name: 'Lorem ipsum gadget',
// descriptionPage: 'Wikipedia:Lorem ipsum gadget'
// },
// [
// {
// name: 'boolean',
// desc: 'Boolean value.',
// type: 'boolean',
// deflt: true
// }, {
// name: 'integer',
// desc: 'Integral number between 0 and 30.',
// type: 'integer',
// deflt: 20,
// validation: [0, 30]
// }, {
// name: 'float',
// desc: '[[Floating-point number]] between -1 and 1.',
// descMode: 'wikitext',
// type: 'numeric',
// deflt: 0.5,
// validation: [-1, 1]
// }, {
// name: 'string',
// desc: 'Text value.',
// type: 'string',
// deflt: 'test'
// }, {
// name: 'evenonly-passive',
// desc: 'Even numbers only. Will be rounded down if an odd number is given.',
// type: 'integer',
// deflt: 0,
// validation: function(n){ return n%2!=0 ? n-1 : n; }
// }, {
// name: 'evenonly-agressive',
// desc: 'Even numbers only. Will prevent saving if an odd number is given.',
// type: 'integer',
// deflt: 0,
// validation: function(n){ if(n%2!=0){ throw 'Requires an even number!' }; return n; }
// }
// ]
// );
gConfig.register = function(gadget, gadgetInfo, settings)
{
gConfig.data[gadget] = settings;
gConfig.settings[gadget] = {};
for(var i=0; i<settings.length; i++) {
var sett = settings[i];
var value;
// do some basic input validation to prevent nondescriptive errors later
var errorMessage = "missing % in setting #"+i+" for "+gadget;
if(!sett.name) throw errorMessage.replace('%', 'name')
if(!sett.desc) throw errorMessage.replace('%', 'desc')
if(!sett.type) throw errorMessage.replace('%', 'type')
if(sett.deflt == undefined) throw errorMessage.replace('%', 'deflt')
var isLegacy = false;
if(sett.legacy) {
var object, property;
if($.isArray(sett.legacy)) { // [object, 'prop name']
object = sett.legacy[0]; property = sett.legacy[1];
} else { // object, prop name = sett.name
object = sett.legacy; property = sett.name;
}
if(object[property] != undefined) {
try {
value = validateAndCanonicalize(object[property], sett.type, sett.validation);
gConfig.legacySettings.push( internalName(gadget, sett.name) );
isLegacy = true;
} catch(er) {} // if validation error, ignore this
}
}
if(!isLegacy) {
value = readRawSetting(gadget, sett.name)
if(value == undefined) value = sett.deflt;
value = validateAndCanonicalize(value, sett.type, sett.validation);
}
gConfig.settings[gadget][sett.name] = value;
}
gConfig.registeredGadgets.push(gadget);
gConfig.gadgetsInfo[gadget] = (typeof gadgetInfo == 'string')
? {name: gadgetInfo}
: gadgetInfo;
if(needSynchro) {
needSynchro = false;
gConfig.synchronise(function(){});
}
specialPage();
}
// Return the current value for given setting.
//
// Do note that while integer, numeric and string values will always be of the corresponding JavaScript type,
// boolean values need not be true/false, but merely truthy/falsy.
gConfig.get = function(gadget, setting)
{
return gConfig.settings[gadget][setting];
}
// Set the current value for given setting. It is not validated.
//
// For the value to be actually saved, you need to call gConfig.synchronise().
gConfig.set = function(gadget, setting, value)
{
return gConfig.settings[gadget][setting] = value;
}
var needSynchro = false;
var synchroRunning = false;
var synchroDelayedCallbacks = [];
// Asynchronously saves current values of all settings.
gConfig.synchronise = function(callback)
{
// a lot of ugly elaborate code to make sure bad things don't happen
// if synchronise() is called when a synchro is already running.
if(synchroRunning) {
synchroDelayedCallbacks.push(callback);
return;
}
synchroRunning = true;
var meat = function(){
var toSave = [];
for(var i=0; i<gConfig.registeredGadgets.length; i++) {
var gadget = gConfig.registeredGadgets[i];
for(var j=0; j<gConfig.data[gadget].length; j++) {
var setting = gConfig.data[gadget][j].name;
toSave.push([gadget, setting, gConfig.get(gadget, setting)]);
}
}
saveSettings(toSave, function(){
synchroRunning = false;
callback();
if(synchroDelayedCallbacks.length > 0) {
// this means there were calls to synchronise() while we were working.
// we need to synchronise again, then call the callbacks.
var cbs = synchroDelayedCallbacks;
synchroDelayedCallbacks = [];
gConfig.synchronise(function(){
for(var i=0; i<cbs.length; i++) cbs[i]();
})
}
});
}
if(!optionsToken) {
api.get({action:'tokens', type:'options'}).done(function(json){
optionsToken = json['tokens']['optionstoken'];
meat();
});
} else {
meat();
}
}
function inputFor(value, type, validation)
{
input = null;
if(type == 'boolean') {
input = $('<input type=checkbox>').prop('checked', !!value);
} else if(type == 'string') {
input = $('<input type=text>').prop('value', value);
} else if(type == 'integer' || type == 'numeric') {
input = $('<input type=number>').attr('step', (type == 'integer' ? 1 : 'any'))
if(validation && $.isArray(validation)) {
var min = validation[0], max = validation[1];
input.attr({min: min, max: max});
}
input.prop('value', value);
}
return input;
}
// Needed to work around bug 52042...
var jqueryMsgParseCounter = 0;
function jqueryMsgParse(wikitext)
{
jqueryMsgParseCounter++;
var map = new mw.Map();
map.set('tmp'+jqueryMsgParseCounter, wikitext);
var parser = new mw.jqueryMsg.parser({messages: map});
return parser.parse('tmp'+jqueryMsgParseCounter).contents();
}
var nowSaving = false;
function specialPage()
{
if(mw.config.get('wgTitle') != "GadgetPrefs" || mw.config.get('wgCanonicalNamespace') != "Special") return false;
api.get({action:'tokens', type:'options'}).done(function(json){ optionsToken = json['tokens']['optionstoken'] });
var onsubmit = function(e){
if(!nowSaving) {
nowSaving = true;
$content.find('.gconfig-pref-error').empty(); // remove infos about invalid values, if any
var toSave = [];
var errors = [];
var $inputs = $content.find('input');
for(var i=0; i<$inputs.length; i++) {
var input = $inputs[i];
if(input.type == 'submit') continue;
var name = parseInternalName(input.name);
var gadget = name[0], setting = name[1];
var value = (input.type=='checkbox' ? input.checked : input.value);
try {
value = validateAndCanonicalize( value, $(input).data('gconfig-type'), $(input).data('gconfig-validation') );
}
catch(err) {
errors.push([input.name, err]);
continue;
}
toSave.push([gadget, setting, value]);
}
if(errors.length > 0) {
$('#gconfig-save-status').attr('class', 'gconfig-save-error').text( mw.msg('gConfig-prefs-invalid-values') );
for(var i=0; i<errors.length; i++) {
var id = errors[i][0], info = errors[i][1];
$('#'+id).closest('tr').find('.gconfig-pref-error').text(info)
}
nowSaving = false;
}
else {
$('#gconfig-save-status').attr('class', '').text( mw.msg('gConfig-prefs-saving') );
saveSettings(toSave, function(){
nowSaving = false;
$('#gconfig-save-status').attr('class', 'gconfig-save-success').text( mw.msg('gConfig-prefs-saved') );
})
}
}
e.preventDefault();
return false;
}
var $content;
if(gConfig.registeredGadgets.length > 0) {
$content = $('<table>');
for(var i=0; i<gConfig.registeredGadgets.length; i++) {
var gadget = gConfig.registeredGadgets[i];
var gadgetName = (typeof gConfig.gadgetsInfo[gadget].descriptionPage == 'string')
? $('<a>').attr({
href: '/wiki/'+encodeURIComponent(gConfig.gadgetsInfo[gadget].descriptionPage),
title: gConfig.gadgetsInfo[gadget].descriptionPage
}).text(gConfig.gadgetsInfo[gadget].name)
: $( document.createTextNode(gConfig.gadgetsInfo[gadget].name) );
$content.append(
$('<tr>').append(
$('<td>').attr('colspan', 2).append(
$('<h2>').append(gadgetName)
)
)
);
for(var j=0; j<gConfig.data[gadget].length; j++) {
var setting = gConfig.data[gadget][j];
var inputName = internalName(gadget, setting.name);
var $input = inputFor( gConfig.get(gadget, setting.name), setting.type, setting.validation );
$input.attr('name', inputName).attr('id', inputName);
$input.data({ 'gconfig-type': setting.type, 'gconfig-validation': setting.validation });
var isLegacy = !!($.inArray(inputName, gConfig.legacySettings) != -1);
var settingDesc = setting.descMode == 'wikitext'
? jqueryMsgParse(setting.desc)
: $( document.createTextNode(setting.desc) );
$content.append(
$('<tr>').append(
$('<td>').append( $input.prop('disabled', !!isLegacy) ),
$('<td>').append(
$('<p>').addClass('gconfig-pref-label').append( $('<label>').attr('for', inputName).append(settingDesc) ),
$('<p>').addClass('gconfig-pref-legacy-note').text( isLegacy ? mw.msg('gConfig-prefs-legacy-setting') : '' ),
$('<p>').addClass('gconfig-pref-error')
)
)
)
}
}
// save button
$content.append(
$('<tr>').append(
$('<td>'),
$('<td>').append(
$('<input type=submit>').attr('id', 'gconfig-save-button').attr('value', mw.msg('gConfig-prefs-save') ),
$('<p>').attr('id', 'gconfig-save-status')
)
)
)
}
else {
$content = $('<p>').text( mw.msg('gConfig-prefs-no-gadgets') );
}
$form = $('<form>').attr('id', 'gconfig-form').append( $content );
$form.on('submit', onsubmit);
$form.on('invalid', onsubmit); // we do our own validation - stop the browser from showing its error messages
var info = $.parseHTML( mw.msg('gConfig-prefs-page-info') );
document.title = mw.msg('gConfig-prefs-page-title');
$('h1').first().text( mw.msg('gConfig-prefs-page-title') );
$('#mw-content-text').empty().append(info, $form);
}
window.gConfig = gConfig;
specialPage();
})
})(mediaWiki, jQuery);
3031ad14a7f09984bc262e77e31d3376342ce435
291
2013-08-01T11:47:28Z
Matma Rex
0
update z https://github.com/MatmaRex/gConfig
javascript
text/javascript
/**
* gConfig is a handy tool to allow users to modify settings of your gadget, with little hassle on your or their side.
*
* Synopsis:
* - register your gadget with its settings: gConfig.register('lipsum', 'Lorem ipsum gadget', [...])
* - access the configuration: gConfig.get('lipsum', 'setting')
*
* For more examples, see per-function docs below.
*
* See also gConfig.css.
*
* Version: 0.4
* Dual-licensed CC-BY-SA 3.0 or newer, GFDL 1.3 or newer
* Author: [[w:pl:User:Matma Rex]], patches: [[w:pl:User:Kaligula]]
*/
(function(mw, $){
mw.loader.using(['jquery.cookie', 'mediawiki', 'mediawiki.api', 'mediawiki.jqueryMsg'], function(){
mw.messages.set({
'gConfig-prefs-page-info': "<p>Na tej stronie możesz zmienić ustawienia włączonych gadżetów.</p><p>Informacje i dokumentacja: <a href='/wiki/Wikipedia:Narzędzia/gConfig'>Wikipedia:Narzędzia/gConfig</a>.</p>",
'gConfig-prefs-page-title': "Preferencje gadżetów",
'gConfig-prefs-no-gadgets': "Obecnie nie masz włączonych żadnych gadżetów korzystających z gConfiga.",
'gConfig-prefs-save': "Zapisz",
'gConfig-prefs-saving': "Zapisywanie...",
'gConfig-prefs-saved': "Zapisano!",
'gConfig-prefs-invalid-values': "Nieprawidłowe wartości.",
'gConfig-prefs-legacy-setting': "To ustawienie jest w tej chwili wpisane na stałe w jednym z twoich plików .js. Usuń je stamtąd, aby stało się modyfikowalne.",
'gConfig-prefs-not-an-integer': "Podana wartość nie jest liczbą całkowitą.",
'gConfig-prefs-out-of-range-min': "Podana wartość jest mniejsza od minimalnej dozwolonej.",
'gConfig-prefs-out-of-range-max': "Podana wartość jest większa od maksymalnej dozwolonej."
});
// Global gConfig object.
var gConfig = {};
// Data of all managed gadgets and settings.
gConfig.data = {};
// Current values of gadgets' settings.
gConfig.settings = {};
var api = new mw.Api();
var optionsToken = null;
// generate internal name for this setting.
// used as input names, cookie names, options' names...
function internalName(gadget, setting)
{
return 'gconfig-'+gadget+'-'+setting;
}
// parse internal name. returns array of [gadget, setting].
function parseInternalName(name)
{
var match = name.match(/^gconfig-([a-zA-Z0-9_]+)-(.+)$/);
var gadget = match[1], setting = match[2];
return [gadget, setting];
}
var totalSettingsCount = 0;
var settingsCurrentCount = 0;
var saveSettingsUserCallback = null;
// saves settings in cookies and in prefs
// settings - array of arrays: [gadget, settingName, value]
// calls saveSettingsCallback after every successful request
function saveSettings(settings, callback)
{
if(!optionsToken) return false;
totalSettingsCount = settings.length;
settingsCurrentCount = 0;
saveSettingsUserCallback = callback;
var grouped = []
for(var i=0; i<settings.length; i++) {
var name = internalName(settings[i][0], settings[i][1]);
var value = settings[i][2];
$.cookie(name, value, {expires: 365, path:'/'});
if((''+value).match(/\|/)) {
api.post({
action:'options', optionname:'userjs-'+name, optionvalue:value, token:optionsToken
}).done(function(j){ saveSettingsCallback(1) });
}
else {
grouped.push('userjs-'+name+'='+value);
}
}
api.post({
action:'options', change:grouped.join('|'), token:optionsToken
}).done(function(j){ saveSettingsCallback(grouped.length) });
return true;
}
function saveSettingsCallback(increment)
{
settingsCurrentCount += increment;
if(settingsCurrentCount == totalSettingsCount)
{
if(saveSettingsUserCallback) saveSettingsUserCallback();
}
}
// reads raw setting from mw.user.options or cookies.
// returns undefined if it's not saved anywhere.
// sets needSynchro to true if data differs or setting is missing.
function readRawSetting(gadget, settingName)
{
var name = internalName(gadget, settingName);
var value = mw.user.options.get('userjs-'+name);
if(value == undefined) value = $.cookie(name);
if(value == undefined || mw.user.options.get('userjs-'+name) != $.cookie(name) ) needSynchro = true;
return value;
}
// validates and canonicalizes setting's values.
// doesn't catch errors raised by validation().
// can throw further errors (for numeric values: not an int, out of range)
function validateAndCanonicalize(value, type, validation)
{
if(type == 'boolean') {
value = (value ? '1' : '');
} else if(type == 'string') {
value = '' + value;
} else if(type == 'integer') {
if(parseInt(value, 10) != parseFloat(value)) throw mw.msg('gConfig-prefs-not-an-integer');
value = parseInt(value, 10);
} else if(type == 'numeric') {
value = parseFloat(value);
}
if(typeof validation == 'function') {
value = validation(value);
} else if($.isArray(validation) && (type == 'integer' || type == 'numeric')) {
var min = validation[0], max = validation[1];
if(value < min) throw mw.msg('gConfig-prefs-out-of-range-min');
if(value > max) throw mw.msg('gConfig-prefs-out-of-range-max');
}
return value;
}
// List of all registered gadgets.
gConfig.registeredGadgets = [];
// Map of internal gadget names => gadget infos (e.g. user-visible gadget names, links).
gConfig.gadgetsInfo = {};
// List of internal names of settings which were loaded using the legacy method.
gConfig.legacySettings = [];
// Register configuration for a new gadget.
//
// * gadget is an internal name, must consist only of ASCII letters, numbers or underscore.
// * gadgetInfo is an object with following keys:
// * name [required]: user-visible name, shown in preferences' headings.
// * descriptionPage: name of gadget's description page.
// * settings is an array of configuration options for this gadget. Each option is an object with the following keys:
// * name [required]: internal name of this setting, not shown anywhere
// * desc [required]: description shown on the prefs page
// * descMode: how to treat the description text. 'plain' (default) for plain text, 'wikitext' for basic wikicode
// parsing (links, text formatting) using jqueryMsg
// * type [required]: boolean / integer / numeric / string, each type is handled differently on the prefs page and validated
// * deflt [required]: default value
// * validation: either an array [min, max] (for numeric/integer types), or a function that performs the validation.
// The function will receive value inputted by user as first (and only) parameter, and to indicate that the value
// is unacceptable must throw an error; the message used will be displayed on the prefs page to the user.
// It may also merely process values - it's return value will be used as the final value for the pref.
// * legacy: intended for migration of old scripts to gConfig. Can be either an array of [object, property] or
// just object, property will be assumed to be the same as setting's name. If object[property] will not be undefined,
// it's value will be taken as the value for this pref and the pref will be marked as legacy and become non-editable.
//
// A lengthy example:
// gConfig.register(
// 'lipsum',
// {
// name: 'Lorem ipsum gadget',
// descriptionPage: 'Wikipedia:Lorem ipsum gadget'
// },
// [
// {
// name: 'boolean',
// desc: 'Boolean value.',
// type: 'boolean',
// deflt: true
// }, {
// name: 'integer',
// desc: 'Integral number between 0 and 30.',
// type: 'integer',
// deflt: 20,
// validation: [0, 30]
// }, {
// name: 'float',
// desc: '[[Floating-point number]] between -1 and 1.',
// descMode: 'wikitext',
// type: 'numeric',
// deflt: 0.5,
// validation: [-1, 1]
// }, {
// name: 'string',
// desc: 'Text value.',
// type: 'string',
// deflt: 'test'
// }, {
// name: 'evenonly-passive',
// desc: 'Even numbers only. Will be rounded down if an odd number is given.',
// type: 'integer',
// deflt: 0,
// validation: function(n){ return n%2!=0 ? n-1 : n; }
// }, {
// name: 'evenonly-agressive',
// desc: 'Even numbers only. Will prevent saving if an odd number is given.',
// type: 'integer',
// deflt: 0,
// validation: function(n){ if(n%2!=0){ throw 'Requires an even number!' }; return n; }
// }
// ]
// );
gConfig.register = function(gadget, gadgetInfo, settings)
{
gConfig.data[gadget] = settings;
gConfig.settings[gadget] = {};
for(var i=0; i<settings.length; i++) {
var sett = settings[i];
var value;
// do some basic input validation to prevent nondescriptive errors later
var errorMessage = "missing % in setting #"+i+" for "+gadget;
if(!sett.name) throw errorMessage.replace('%', 'name')
if(!sett.desc) throw errorMessage.replace('%', 'desc')
if(!sett.type) throw errorMessage.replace('%', 'type')
if(sett.deflt == undefined) throw errorMessage.replace('%', 'deflt')
var isLegacy = false;
if(sett.legacy) {
var object, property;
if($.isArray(sett.legacy)) { // [object, 'prop name']
object = sett.legacy[0]; property = sett.legacy[1];
} else { // object, prop name = sett.name
object = sett.legacy; property = sett.name;
}
if(object[property] != undefined) {
try {
value = validateAndCanonicalize(object[property], sett.type, sett.validation);
gConfig.legacySettings.push( internalName(gadget, sett.name) );
isLegacy = true;
} catch(er) {} // if validation error, ignore this
}
}
if(!isLegacy) {
value = readRawSetting(gadget, sett.name)
if(value == undefined) value = sett.deflt;
value = validateAndCanonicalize(value, sett.type, sett.validation);
}
gConfig.settings[gadget][sett.name] = value;
}
gConfig.registeredGadgets.push(gadget);
gConfig.gadgetsInfo[gadget] = (typeof gadgetInfo == 'string')
? {name: gadgetInfo}
: gadgetInfo;
if(needSynchro) {
needSynchro = false;
gConfig.synchronise(function(){});
}
specialPage();
}
// Return the current value for given setting.
//
// Do note that while integer, numeric and string values will always be of the corresponding JavaScript type,
// boolean values need not be true/false, but merely truthy/falsy.
gConfig.get = function(gadget, setting)
{
return gConfig.settings[gadget][setting];
}
// Set the current value for given setting. It is not validated.
//
// For the value to be actually saved, you need to call gConfig.synchronise().
gConfig.set = function(gadget, setting, value)
{
return gConfig.settings[gadget][setting] = value;
}
var needSynchro = false;
var synchroRunning = false;
var synchroDelayedCallbacks = [];
// Asynchronously saves current values of all settings.
gConfig.synchronise = function(callback)
{
// a lot of ugly elaborate code to make sure bad things don't happen
// if synchronise() is called when a synchro is already running.
if(synchroRunning) {
synchroDelayedCallbacks.push(callback);
return;
}
synchroRunning = true;
var meat = function(){
var toSave = [];
for(var i=0; i<gConfig.registeredGadgets.length; i++) {
var gadget = gConfig.registeredGadgets[i];
for(var j=0; j<gConfig.data[gadget].length; j++) {
var setting = gConfig.data[gadget][j].name;
toSave.push([gadget, setting, gConfig.get(gadget, setting)]);
}
}
saveSettings(toSave, function(){
synchroRunning = false;
callback();
if(synchroDelayedCallbacks.length > 0) {
// this means there were calls to synchronise() while we were working.
// we need to synchronise again, then call the callbacks.
var cbs = synchroDelayedCallbacks;
synchroDelayedCallbacks = [];
gConfig.synchronise(function(){
for(var i=0; i<cbs.length; i++) cbs[i]();
})
}
});
}
if(!optionsToken) {
api.get({action:'tokens', type:'options'}).done(function(json){
optionsToken = json['tokens']['optionstoken'];
meat();
});
} else {
meat();
}
}
function inputFor(value, type, validation)
{
input = null;
if(type == 'boolean') {
input = $('<input type=checkbox>').prop('checked', !!value);
} else if(type == 'string') {
input = $('<input type=text>').prop('value', value);
} else if(type == 'integer' || type == 'numeric') {
input = $('<input type=number>').attr('step', (type == 'integer' ? 1 : 'any'))
if(validation && $.isArray(validation)) {
var min = validation[0], max = validation[1];
input.attr({min: min, max: max});
}
input.prop('value', value);
}
return input;
}
// Needed to work around bug 52042...
var jqueryMsgParseCounter = 0;
function jqueryMsgParse(wikitext)
{
jqueryMsgParseCounter++;
var map = new mw.Map();
map.set('tmp'+jqueryMsgParseCounter, wikitext);
var parser = new mw.jqueryMsg.parser({messages: map});
return parser.parse('tmp'+jqueryMsgParseCounter).contents();
}
var nowSaving = false;
function specialPage()
{
if(mw.config.get('wgTitle') != "GadgetPrefs" || mw.config.get('wgCanonicalNamespace') != "Special") return false;
api.get({action:'tokens', type:'options'}).done(function(json){ optionsToken = json['tokens']['optionstoken'] });
var onsubmit = function(e){
if(!nowSaving) {
nowSaving = true;
$content.find('.gconfig-pref-error').empty(); // remove infos about invalid values, if any
var toSave = [];
var errors = [];
var $inputs = $content.find('input');
for(var i=0; i<$inputs.length; i++) {
var input = $inputs[i];
if(input.type == 'submit') continue;
var name = parseInternalName(input.name);
var gadget = name[0], setting = name[1];
var value = (input.type=='checkbox' ? input.checked : input.value);
try {
value = validateAndCanonicalize( value, $(input).data('gconfig-type'), $(input).data('gconfig-validation') );
}
catch(err) {
errors.push([input.name, err]);
continue;
}
toSave.push([gadget, setting, value]);
}
if(errors.length > 0) {
$('#gconfig-save-status').attr('class', 'gconfig-save-error').text( mw.msg('gConfig-prefs-invalid-values') );
for(var i=0; i<errors.length; i++) {
var id = errors[i][0], info = errors[i][1];
$('#'+id).closest('tr').find('.gconfig-pref-error').text(info)
}
nowSaving = false;
}
else {
$('#gconfig-save-status').attr('class', '').text( mw.msg('gConfig-prefs-saving') );
saveSettings(toSave, function(){
nowSaving = false;
$('#gconfig-save-status').attr('class', 'gconfig-save-success').text( mw.msg('gConfig-prefs-saved') );
})
}
}
e.preventDefault();
return false;
}
var $content;
if(gConfig.registeredGadgets.length > 0) {
$content = $('<table>');
for(var i=0; i<gConfig.registeredGadgets.length; i++) {
var gadget = gConfig.registeredGadgets[i];
var gadgetName = (typeof gConfig.gadgetsInfo[gadget].descriptionPage == 'string')
? $('<a>').attr({
href: '/wiki/'+encodeURIComponent(gConfig.gadgetsInfo[gadget].descriptionPage),
title: gConfig.gadgetsInfo[gadget].descriptionPage
}).text(gConfig.gadgetsInfo[gadget].name)
: $( document.createTextNode(gConfig.gadgetsInfo[gadget].name) );
$content.append(
$('<tr>').append(
$('<td>').attr('colspan', 2).append(
$('<h2>').append(gadgetName)
)
)
);
for(var j=0; j<gConfig.data[gadget].length; j++) {
var setting = gConfig.data[gadget][j];
var inputName = internalName(gadget, setting.name);
var $input = inputFor( gConfig.get(gadget, setting.name), setting.type, setting.validation );
$input.attr('name', inputName).attr('id', inputName);
$input.data({ 'gconfig-type': setting.type, 'gconfig-validation': setting.validation });
var isLegacy = !!($.inArray(inputName, gConfig.legacySettings) != -1);
var settingDesc = setting.descMode == 'wikitext'
? jqueryMsgParse(setting.desc)
: $( document.createTextNode(setting.desc) );
$content.append(
$('<tr>').append(
$('<td>').append( $input.prop('disabled', !!isLegacy) ),
$('<td>').append(
$('<p>').addClass('gconfig-pref-label').append( $('<label>').attr('for', inputName).append(settingDesc) ),
$('<p>').addClass('gconfig-pref-legacy-note').text( isLegacy ? mw.msg('gConfig-prefs-legacy-setting') : '' ),
$('<p>').addClass('gconfig-pref-error')
)
)
)
}
}
// save button
$content.append(
$('<tr>').append(
$('<td>'),
$('<td>').append(
$('<input type=submit>').attr('id', 'gconfig-save-button').attr('value', mw.msg('gConfig-prefs-save') ),
$('<p>').attr('id', 'gconfig-save-status')
)
)
)
}
else {
$content = $('<p>').text( mw.msg('gConfig-prefs-no-gadgets') );
}
$form = $('<form>').attr('id', 'gconfig-form').append( $content );
$form.on('submit', onsubmit);
$form.on('invalid', onsubmit); // we do our own validation - stop the browser from showing its error messages
var info = $.parseHTML( mw.msg('gConfig-prefs-page-info') );
document.title = mw.msg('gConfig-prefs-page-title');
$('h1').first().text( mw.msg('gConfig-prefs-page-title') );
$('#mw-content-text').empty().append(info, $form);
}
window.gConfig = gConfig;
specialPage();
})
})(mediaWiki, jQuery);
3031ad14a7f09984bc262e77e31d3376342ce435
MediaWiki:Gadget-lib-toolbar
8
107
281
280
2014-01-17T00:28:33Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
'''ext.gadget.lib-toolbar''' – biblioteka do obsługi paska narzędziowego.
4109e0537bebf1d9fb32a31b5d387bb2972c9c9d
280
2012-03-01T16:40:56Z
Beau
0
za [[s:MediaWiki:Gadget-lib-toolbar]]
wikitext
text/x-wiki
'''ext.gadget.lib-toolbar''' – biblioteka do obsługi paska narzędziowego.
4109e0537bebf1d9fb32a31b5d387bb2972c9c9d
MediaWiki:Gadget-lib-toolbar.js
8
108
283
282
2014-01-17T00:28:33Z
Ffkapa
2
1 wersja
javascript
text/javascript
/*
* @author: [[:pl:User:Beau]]
*/
if ( !window.toolbarGadget ) {
window.toolbarGadget = {
/** Version of the gadget */
version: 7,
/** A status of the gadget */
ready: false,
/** Indicates wheter the user has enabled the new toolbar */
wikieditor: null,
/** An array of buttons, which were added before a toolbar was constructed */
buttons: [],
/**
* Adds a button to the toolbar
* @param button An object describing the button, its values:
* title - a title of the button
* alt - an alternative text displayed when image is not loaded
* id - an identifier of the button (img)
* href - a link
* onclick - a callback
* icon - an icon of the button
* oldIcon - an icon for the old toolbar (by default icon parameter is used)
* newIcon - an icon for the new toolbar (by default icon parameter is used)
* section - a name of a section to which the button should be added
* group - a name of a group to which the button should be added (it will be created if not exists)
* oncreate - a callback invoked after the button has been created
*/
addButton: function( button ) {
if ( !this.ready ) {
this.buttons.push( button );
return;
}
var title = button.title ? button.title : "";
// New toolbar
var toolbar = document.getElementById( 'wikiEditor-ui-toolbar' );
if ( toolbar ) {
// FIXME: rewrite it using a toolbar api
var image = document.createElement( 'img' );
image.alt = button.alt ? button.alt : title;
image.title = title;
image.className = "tool tool-button";
image.style.cssText = "height: 18px; padding-top:4px";
if ( button.id ) {
image.id = button.id;
}
if ( button.newIcon ) {
image.src = button.newIcon;
} else if ( button.icon ) {
image.src = button.icon;
}
var link = document.createElement( 'a' );
if ( button.href ) {
link.href = button.href;
}
if ( button.onclick ) {
link.onclick = button.onclick;
}
link.appendChild( image );
// A section of the button
var section;
if ( button.section ) {
var sections = $( toolbar ).find( "div.section-" + button.section );
if ( sections.length ) {
section = sections[0];
}
}
// A group of the button
var group;
var groupName = button.group ? button.group : 'custom';
if ( !group ) {
var groups = $( section ? section : toolbar ).find( "div.group-" + groupName );
if ( groups.length ) {
group = groups[0];
}
}
if ( !group ) {
// If the section does not exist, place the button in main section
if ( !section ) {
var sections = $( toolbar ).find( "div.section-main" );
if ( sections.length ) {
section = sections[0];
}
}
group = document.createElement( 'div' );
group.className = 'group group-' + groupName;
group.rel = groupName;
section.appendChild( group );
}
group.appendChild( link );
if ( button.oncreate ) {
button.oncreate( image );
}
return;
}
// Old toolbar
toolbar = document.getElementById( 'toolbar' );
if ( toolbar ) {
var image = document.createElement( 'img' );
image.alt = button.alt ? button.alt : title;
image.title = title;
image.className = 'mw-toolbar-editbutton';
if ( button.id ) {
image.id = button.id;
}
if ( button.oldIcon ) {
image.src = button.oldIcon;
} else if ( button.icon ) {
image.src = button.icon;
}
image.style.cursor = 'pointer';
if ( button.onclick ) {
image.onclick = button.onclick;
}
if ( button.href ) {
var link = document.createElement( 'a' );
link.href = button.href;
link.appendChild( image );
toolbar.appendChild( link );
} else {
toolbar.appendChild( image );
}
if ( button.oncreate ) {
button.oncreate( image );
}
return;
}
},
/** Sets up the gadget */
init: function() {
this.wikieditor = mw.user.options.get( 'usebetatoolbar' ) === 1;
var that = this;
var addButtons = function() {
jQuery( document ).ready( function() {
that.ready = true;
for ( var i = 0; i < that.buttons.length; i++ ) {
that.addButton( that.buttons[i] );
}
that.buttons = null;
} );
};
if ( this.wikieditor ) {
mw.loader.using( "ext.wikiEditor.toolbar", function() {
addButtons();
} );
} else {
mw.loader.using( "mediawiki.action.edit", function() {
addButtons();
} );
}
}
};
toolbarGadget.init();
}
135ea2b48dedcdd476913388acd8f48f2809cf54
282
2013-11-07T20:01:10Z
Matma Rex
0
globalna funkcja getElementsByClassName już nie istnieje (https://gerrit.wikimedia.org/r/#/c/92457/), zamiana na jQuery
javascript
text/javascript
/*
* @author: [[:pl:User:Beau]]
*/
if ( !window.toolbarGadget ) {
window.toolbarGadget = {
/** Version of the gadget */
version: 7,
/** A status of the gadget */
ready: false,
/** Indicates wheter the user has enabled the new toolbar */
wikieditor: null,
/** An array of buttons, which were added before a toolbar was constructed */
buttons: [],
/**
* Adds a button to the toolbar
* @param button An object describing the button, its values:
* title - a title of the button
* alt - an alternative text displayed when image is not loaded
* id - an identifier of the button (img)
* href - a link
* onclick - a callback
* icon - an icon of the button
* oldIcon - an icon for the old toolbar (by default icon parameter is used)
* newIcon - an icon for the new toolbar (by default icon parameter is used)
* section - a name of a section to which the button should be added
* group - a name of a group to which the button should be added (it will be created if not exists)
* oncreate - a callback invoked after the button has been created
*/
addButton: function( button ) {
if ( !this.ready ) {
this.buttons.push( button );
return;
}
var title = button.title ? button.title : "";
// New toolbar
var toolbar = document.getElementById( 'wikiEditor-ui-toolbar' );
if ( toolbar ) {
// FIXME: rewrite it using a toolbar api
var image = document.createElement( 'img' );
image.alt = button.alt ? button.alt : title;
image.title = title;
image.className = "tool tool-button";
image.style.cssText = "height: 18px; padding-top:4px";
if ( button.id ) {
image.id = button.id;
}
if ( button.newIcon ) {
image.src = button.newIcon;
} else if ( button.icon ) {
image.src = button.icon;
}
var link = document.createElement( 'a' );
if ( button.href ) {
link.href = button.href;
}
if ( button.onclick ) {
link.onclick = button.onclick;
}
link.appendChild( image );
// A section of the button
var section;
if ( button.section ) {
var sections = $( toolbar ).find( "div.section-" + button.section );
if ( sections.length ) {
section = sections[0];
}
}
// A group of the button
var group;
var groupName = button.group ? button.group : 'custom';
if ( !group ) {
var groups = $( section ? section : toolbar ).find( "div.group-" + groupName );
if ( groups.length ) {
group = groups[0];
}
}
if ( !group ) {
// If the section does not exist, place the button in main section
if ( !section ) {
var sections = $( toolbar ).find( "div.section-main" );
if ( sections.length ) {
section = sections[0];
}
}
group = document.createElement( 'div' );
group.className = 'group group-' + groupName;
group.rel = groupName;
section.appendChild( group );
}
group.appendChild( link );
if ( button.oncreate ) {
button.oncreate( image );
}
return;
}
// Old toolbar
toolbar = document.getElementById( 'toolbar' );
if ( toolbar ) {
var image = document.createElement( 'img' );
image.alt = button.alt ? button.alt : title;
image.title = title;
image.className = 'mw-toolbar-editbutton';
if ( button.id ) {
image.id = button.id;
}
if ( button.oldIcon ) {
image.src = button.oldIcon;
} else if ( button.icon ) {
image.src = button.icon;
}
image.style.cursor = 'pointer';
if ( button.onclick ) {
image.onclick = button.onclick;
}
if ( button.href ) {
var link = document.createElement( 'a' );
link.href = button.href;
link.appendChild( image );
toolbar.appendChild( link );
} else {
toolbar.appendChild( image );
}
if ( button.oncreate ) {
button.oncreate( image );
}
return;
}
},
/** Sets up the gadget */
init: function() {
this.wikieditor = mw.user.options.get( 'usebetatoolbar' ) === 1;
var that = this;
var addButtons = function() {
jQuery( document ).ready( function() {
that.ready = true;
for ( var i = 0; i < that.buttons.length; i++ ) {
that.addButton( that.buttons[i] );
}
that.buttons = null;
} );
};
if ( this.wikieditor ) {
mw.loader.using( "ext.wikiEditor.toolbar", function() {
addButtons();
} );
} else {
mw.loader.using( "mediawiki.action.edit", function() {
addButtons();
} );
}
}
};
toolbarGadget.init();
}
135ea2b48dedcdd476913388acd8f48f2809cf54
MediaWiki:Gadget-main-page
8
101
264
263
2014-01-17T00:00:44Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Style i skrypty wykorzystywane na stronie głównej.
3ae6b82e983bb0be9762fe096a1b4394e20df901
263
2013-05-30T19:10:50Z
Matma Rex
0
meh
wikitext
text/x-wiki
Style i skrypty wykorzystywane na stronie głównej.
3ae6b82e983bb0be9762fe096a1b4394e20df901
MediaWiki:Gadget-main-page.css
8
103
268
267
2014-01-17T00:00:44Z
Ffkapa
2
1 wersja
css
text/css
/* Hide elements useless for a casual visitor */
.action-view.page-Strona_główna h1,
.action-view.page-Strona_główna #catlinks,
.action-view.page-Wikipedia_Strona_główna h1,
.action-view.page-Wikipedia_Strona_główna #catlinks,
.action-view.page-Wikipedia_Strona_główna #contentSub {
display: none;
}
/* Header */
#main-page #main-page-header {
background: url("//upload.wikimedia.org/wikipedia/commons/3/3e/MP-open-book4.png") -20px -15px no-repeat;
border: 1px solid #c5c5c5;
border-radius: 1em;
font-size: 1.1em;
padding: 5px 15px 0px;
}
#main-page #main-page-welcome { display: block; }
#main-page #main-page-header strong { font-size: 1.2em; }
#main-page #main-page-header #main-page-welcome strong { font-size: 1.8em; }
#main-page #main-page-intro {
float: left;
width: 60%;
}
#main-page #main-page-portals {
float: right;
width: 40%;
text-align: center;
}
#main-page #main-page-wiki-events {
clear: both;
text-align: center;
border-top: 1px solid #c5c5c5;
}
#main-page #main-page-wiki-events:empty {
border-top: 0;
}
#main-page #main-page-portals span {
display: block;
margin-bottom: .5em;
}
/* Search */
#main-page #main-page-searchbox {
margin-top: 1em;
position: relative;
}
#main-page #main-page-searchbox .searchboxSearchButton {
display: none;
}
#main-page #main-page-searchbox input,
#main-page #main-page-searchbox .searchbox {
height: 30px;
}
#main-page #main-page-searchbox input {
font-size: 1.5em;
border-radius: 0.5em;
/* Defaults seem to differ between submit buttons and text inputs */
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#main-page #main-page-searchbox form {
margin-right: 130px;
}
#main-page #main-page-searchbox .searchboxInput {
display: block;
width: 100%;
border: 1px solid #c5c5c5;
text-indent: 5px;
}
#main-page #main-page-searchbox .searchboxGoButton {
position: absolute;
right: 0;
top: 0;
width: 120px;
border: 1px solid;
border-color: #aaa #555 #555 #aaa;
background-color: #f2f2f2;
background-image: -moz-linear-gradient(top, #fcfcfc, #e0e0e0);
background-image: -o-linear-gradient(top, #fcfcfc, #e0e0e0);
background-image: -webkit-linear-gradient(top, #fcfcfc, #e0e0e0);
background-image: linear-gradient(top, #fcfcfc, #e0e0e0);
}
#main-page #main-page-searchbox .floatleft {
margin: 0;
position: absolute;
right: 132px;
top: 3px;
}
/* Content styles */
#main-page #main-page-content {
padding-top: 1em;
}
#main-page #main-page-content h2,
#main-page #main-page-footer h2 {
clear: both;
padding: .15em .5em;
margin-top: 1em;
border-width: 0;
font-size: 1.3em;
font-weight: bold;
background: left center no-repeat;
}
#main-page #main-page-content h2 {
/* broken in Firefox? */
/*background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="25" wifth="350" style="background: white;"><defs><linearGradient id="g1"><stop stop-color="%23c2dfff" offset="0%"/><stop stop-color="white" offset="350"/></linearGradient></defs><rect x="0" y="0" width="357" height="25" rx="7" ry="12" style="fill: url(%23g1);"/></svg>');*/
background-image: url("//upload.wikimedia.org/wikipedia/commons/4/46/Bluebg_rounded.png");
}
#main-page #main-page-footer h2 {
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="25" wifth="100%" style="background: white;"><rect x="0" y="0" width="100%" height="25" rx="7" ry="12" style="fill: %23c6fec8;"/></svg>');
}
#main-page .section .footer {
clear: both;
text-align: right;
font-style: italic;
margin-top: .5em;
}
/* Minor adjustments */
#main-page #main-page-content h2 {
margin-left: -.2em;
}
#main-page #main-page-footer h2 {
margin-left: -.2em;
margin-right: -.2em;
}
#main-page #main-page-didyouknow h2,
#main-page #main-page-featured-article h2,
#main-page #main-page-footer h2 {
margin-top: -.5em; /* negate the padding */
}
/* Columns */
#main-page #main-page-column1,
#main-page #main-page-column2,
#main-page #main-page-footer .section {
margin-bottom: 1em;
border-width: 1px;
border-style: solid;
border-radius: 1em;
padding: 1em;
}
#main-page #main-page-column1,
#main-page #main-page-column2 { border-color: #a7d7f9; }
#main-page #main-page-footer .section { border-color: #a7f9ab; }
#main-page #main-page-column1,
#main-page #main-page-column2 {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 49.5%;
}
#main-page #main-page-column1 { float: left; }
#main-page #main-page-column2 { float: right; }
/* Footer */
#main-page #main-page-footer {
clear: both;
}
#main-page #main-page-wikimedia .main-page-threecol p {
width: 33%;
float: left;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 1em
}
#main-page #main-page-wikimedia .main-page-threecol p img {
float: left;
margin-right: 1em
}
#main-page #main-page-wikimedia div {
clear: both;
}
/* IE<=7 */
#main-page #main-page-column1,
#main-page #main-page-column2 {
* width: 45%;
}
#main-page #main-page-wikimedia .main-page-threecol p {
* width: 30%;
}
0ff1c39ec445bdb0073bf4a97d28406ed2a2c2ab
267
2013-09-09T12:51:14Z
Matma Rex
0
+.action-view.page-Wikipedia_Strona_główna #contentSub
css
text/css
/* Hide elements useless for a casual visitor */
.action-view.page-Strona_główna h1,
.action-view.page-Strona_główna #catlinks,
.action-view.page-Wikipedia_Strona_główna h1,
.action-view.page-Wikipedia_Strona_główna #catlinks,
.action-view.page-Wikipedia_Strona_główna #contentSub {
display: none;
}
/* Header */
#main-page #main-page-header {
background: url("//upload.wikimedia.org/wikipedia/commons/3/3e/MP-open-book4.png") -20px -15px no-repeat;
border: 1px solid #c5c5c5;
border-radius: 1em;
font-size: 1.1em;
padding: 5px 15px 0px;
}
#main-page #main-page-welcome { display: block; }
#main-page #main-page-header strong { font-size: 1.2em; }
#main-page #main-page-header #main-page-welcome strong { font-size: 1.8em; }
#main-page #main-page-intro {
float: left;
width: 60%;
}
#main-page #main-page-portals {
float: right;
width: 40%;
text-align: center;
}
#main-page #main-page-wiki-events {
clear: both;
text-align: center;
border-top: 1px solid #c5c5c5;
}
#main-page #main-page-wiki-events:empty {
border-top: 0;
}
#main-page #main-page-portals span {
display: block;
margin-bottom: .5em;
}
/* Search */
#main-page #main-page-searchbox {
margin-top: 1em;
position: relative;
}
#main-page #main-page-searchbox .searchboxSearchButton {
display: none;
}
#main-page #main-page-searchbox input,
#main-page #main-page-searchbox .searchbox {
height: 30px;
}
#main-page #main-page-searchbox input {
font-size: 1.5em;
border-radius: 0.5em;
/* Defaults seem to differ between submit buttons and text inputs */
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#main-page #main-page-searchbox form {
margin-right: 130px;
}
#main-page #main-page-searchbox .searchboxInput {
display: block;
width: 100%;
border: 1px solid #c5c5c5;
text-indent: 5px;
}
#main-page #main-page-searchbox .searchboxGoButton {
position: absolute;
right: 0;
top: 0;
width: 120px;
border: 1px solid;
border-color: #aaa #555 #555 #aaa;
background-color: #f2f2f2;
background-image: -moz-linear-gradient(top, #fcfcfc, #e0e0e0);
background-image: -o-linear-gradient(top, #fcfcfc, #e0e0e0);
background-image: -webkit-linear-gradient(top, #fcfcfc, #e0e0e0);
background-image: linear-gradient(top, #fcfcfc, #e0e0e0);
}
#main-page #main-page-searchbox .floatleft {
margin: 0;
position: absolute;
right: 132px;
top: 3px;
}
/* Content styles */
#main-page #main-page-content {
padding-top: 1em;
}
#main-page #main-page-content h2,
#main-page #main-page-footer h2 {
clear: both;
padding: .15em .5em;
margin-top: 1em;
border-width: 0;
font-size: 1.3em;
font-weight: bold;
background: left center no-repeat;
}
#main-page #main-page-content h2 {
/* broken in Firefox? */
/*background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="25" wifth="350" style="background: white;"><defs><linearGradient id="g1"><stop stop-color="%23c2dfff" offset="0%"/><stop stop-color="white" offset="350"/></linearGradient></defs><rect x="0" y="0" width="357" height="25" rx="7" ry="12" style="fill: url(%23g1);"/></svg>');*/
background-image: url("//upload.wikimedia.org/wikipedia/commons/4/46/Bluebg_rounded.png");
}
#main-page #main-page-footer h2 {
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="25" wifth="100%" style="background: white;"><rect x="0" y="0" width="100%" height="25" rx="7" ry="12" style="fill: %23c6fec8;"/></svg>');
}
#main-page .section .footer {
clear: both;
text-align: right;
font-style: italic;
margin-top: .5em;
}
/* Minor adjustments */
#main-page #main-page-content h2 {
margin-left: -.2em;
}
#main-page #main-page-footer h2 {
margin-left: -.2em;
margin-right: -.2em;
}
#main-page #main-page-didyouknow h2,
#main-page #main-page-featured-article h2,
#main-page #main-page-footer h2 {
margin-top: -.5em; /* negate the padding */
}
/* Columns */
#main-page #main-page-column1,
#main-page #main-page-column2,
#main-page #main-page-footer .section {
margin-bottom: 1em;
border-width: 1px;
border-style: solid;
border-radius: 1em;
padding: 1em;
}
#main-page #main-page-column1,
#main-page #main-page-column2 { border-color: #a7d7f9; }
#main-page #main-page-footer .section { border-color: #a7f9ab; }
#main-page #main-page-column1,
#main-page #main-page-column2 {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 49.5%;
}
#main-page #main-page-column1 { float: left; }
#main-page #main-page-column2 { float: right; }
/* Footer */
#main-page #main-page-footer {
clear: both;
}
#main-page #main-page-wikimedia .main-page-threecol p {
width: 33%;
float: left;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 1em
}
#main-page #main-page-wikimedia .main-page-threecol p img {
float: left;
margin-right: 1em
}
#main-page #main-page-wikimedia div {
clear: both;
}
/* IE<=7 */
#main-page #main-page-column1,
#main-page #main-page-column2 {
* width: 45%;
}
#main-page #main-page-wikimedia .main-page-threecol p {
* width: 30%;
}
0ff1c39ec445bdb0073bf4a97d28406ed2a2c2ab
MediaWiki:Gadget-main-page.js
8
102
266
265
2014-01-17T00:00:44Z
Ffkapa
2
1 wersja
javascript
text/javascript
if ( mw.config.get( 'wgPageName' ) == "Strona_główna" || mw.config.get( 'wgPageName' ) == "Wikipedia:Strona_główna" ) {
// kompletna lista języków
mw.loader.using( "mediawiki.util", function() {
jQuery( document ).ready( function() {
mw.util.addPortletLink( 'p-lang', mw.util.wikiGetlink( 'Wikipedia:Lista wersji językowych' ), 'Wszystkie języki', 'interwiki-all', 'Kompletna lista języków' )
} );
} );
// "Focus the cursor in the search bar on loading the Main Page"
// Autor: [[:en:User:Nihiltres]]
// Zaimportowany z http://en.wikipedia.org/wiki/MediaWiki:Gadget-searchFocus.js wg stanu na 7 paź. 2008
//
// opis działania: skrypt ustawia automatycznie kursor w polu wyszukiwania.
$(document).ready(function() {
var searchInput = document.getElementById("searchInput");
if (searchInput)
searchInput.focus();
});
}
3f8f081383e6fbfd9c8788cea5a7f876a41d2131
265
2013-08-06T13:50:07Z
Matma Rex
0
także [[Wikipedia:Strona główna]]
javascript
text/javascript
if ( mw.config.get( 'wgPageName' ) == "Strona_główna" || mw.config.get( 'wgPageName' ) == "Wikipedia:Strona_główna" ) {
// kompletna lista języków
mw.loader.using( "mediawiki.util", function() {
jQuery( document ).ready( function() {
mw.util.addPortletLink( 'p-lang', mw.util.wikiGetlink( 'Wikipedia:Lista wersji językowych' ), 'Wszystkie języki', 'interwiki-all', 'Kompletna lista języków' )
} );
} );
// "Focus the cursor in the search bar on loading the Main Page"
// Autor: [[:en:User:Nihiltres]]
// Zaimportowany z http://en.wikipedia.org/wiki/MediaWiki:Gadget-searchFocus.js wg stanu na 7 paź. 2008
//
// opis działania: skrypt ustawia automatycznie kursor w polu wyszukiwania.
$(document).ready(function() {
var searchInput = document.getElementById("searchInput");
if (searchInput)
searchInput.focus();
});
}
3f8f081383e6fbfd9c8788cea5a7f876a41d2131
MediaWiki:Gadget-moment.js
8
115
300
299
2014-01-17T00:43:56Z
Ffkapa
2
1 wersja
javascript
text/javascript
//! moment.js
//! version : 2.4.0
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
(function (undefined) {
/************************************
Constants
************************************/
var moment,
VERSION = "2.4.0",
global = this,
round = Math.round,
i,
YEAR = 0,
MONTH = 1,
DATE = 2,
HOUR = 3,
MINUTE = 4,
SECOND = 5,
MILLISECOND = 6,
// internal storage for language config files
languages = {},
// check for nodeJS
hasModule = (typeof module !== 'undefined' && module.exports && typeof require !== 'undefined'),
// ASP.NET json date format regex
aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,
aspNetTimeSpanJsonRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,
// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
isoDurationRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,
// format tokens
formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,
localFormattingTokens = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,
// parsing token regexes
parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99
parseTokenOneToThreeDigits = /\d{1,3}/, // 0 - 999
parseTokenOneToFourDigits = /\d{1,4}/, // 0 - 9999
parseTokenOneToSixDigits = /[+\-]?\d{1,6}/, // -999,999 - 999,999
parseTokenDigits = /\d+/, // nonzero number of digits
parseTokenWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, // any word (or two) characters or numbers including two/three word month in arabic.
parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
parseTokenT = /T/i, // T (ISO separator)
parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
//strict parsing regexes
parseTokenOneDigit = /\d/, // 0 - 9
parseTokenTwoDigits = /\d\d/, // 00 - 99
parseTokenThreeDigits = /\d{3}/, // 000 - 999
parseTokenFourDigits = /\d{4}/, // 0000 - 9999
parseTokenSixDigits = /[+\-]?\d{6}/, // -999,999 - 999,999
// iso 8601 regex
// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
isoRegex = /^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
isoFormat = 'YYYY-MM-DDTHH:mm:ssZ',
isoDates = [
'YYYY-MM-DD',
'GGGG-[W]WW',
'GGGG-[W]WW-E',
'YYYY-DDD'
],
// iso time formats and regexes
isoTimes = [
['HH:mm:ss.SSSS', /(T| )\d\d:\d\d:\d\d\.\d{1,3}/],
['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/],
['HH:mm', /(T| )\d\d:\d\d/],
['HH', /(T| )\d\d/]
],
// timezone chunker "+10:00" > ["10", "00"] or "-1530" > ["-15", "30"]
parseTimezoneChunker = /([\+\-]|\d\d)/gi,
// getter and setter names
proxyGettersAndSetters = 'Date|Hours|Minutes|Seconds|Milliseconds'.split('|'),
unitMillisecondFactors = {
'Milliseconds' : 1,
'Seconds' : 1e3,
'Minutes' : 6e4,
'Hours' : 36e5,
'Days' : 864e5,
'Months' : 2592e6,
'Years' : 31536e6
},
unitAliases = {
ms : 'millisecond',
s : 'second',
m : 'minute',
h : 'hour',
d : 'day',
D : 'date',
w : 'week',
W : 'isoWeek',
M : 'month',
y : 'year',
DDD : 'dayOfYear',
e : 'weekday',
E : 'isoWeekday',
gg: 'weekYear',
GG: 'isoWeekYear'
},
camelFunctions = {
dayofyear : 'dayOfYear',
isoweekday : 'isoWeekday',
isoweek : 'isoWeek',
weekyear : 'weekYear',
isoweekyear : 'isoWeekYear'
},
// format function strings
formatFunctions = {},
// tokens to ordinalize and pad
ordinalizeTokens = 'DDD w W M D d'.split(' '),
paddedTokens = 'M D H h m s w W'.split(' '),
formatTokenFunctions = {
M : function () {
return this.month() + 1;
},
MMM : function (format) {
return this.lang().monthsShort(this, format);
},
MMMM : function (format) {
return this.lang().months(this, format);
},
D : function () {
return this.date();
},
DDD : function () {
return this.dayOfYear();
},
d : function () {
return this.day();
},
dd : function (format) {
return this.lang().weekdaysMin(this, format);
},
ddd : function (format) {
return this.lang().weekdaysShort(this, format);
},
dddd : function (format) {
return this.lang().weekdays(this, format);
},
w : function () {
return this.week();
},
W : function () {
return this.isoWeek();
},
YY : function () {
return leftZeroFill(this.year() % 100, 2);
},
YYYY : function () {
return leftZeroFill(this.year(), 4);
},
YYYYY : function () {
return leftZeroFill(this.year(), 5);
},
YYYYYY : function () {
var y = this.year(), sign = y >= 0 ? '+' : '-';
return sign + leftZeroFill(Math.abs(y), 6);
},
gg : function () {
return leftZeroFill(this.weekYear() % 100, 2);
},
gggg : function () {
return this.weekYear();
},
ggggg : function () {
return leftZeroFill(this.weekYear(), 5);
},
GG : function () {
return leftZeroFill(this.isoWeekYear() % 100, 2);
},
GGGG : function () {
return this.isoWeekYear();
},
GGGGG : function () {
return leftZeroFill(this.isoWeekYear(), 5);
},
e : function () {
return this.weekday();
},
E : function () {
return this.isoWeekday();
},
a : function () {
return this.lang().meridiem(this.hours(), this.minutes(), true);
},
A : function () {
return this.lang().meridiem(this.hours(), this.minutes(), false);
},
H : function () {
return this.hours();
},
h : function () {
return this.hours() % 12 || 12;
},
m : function () {
return this.minutes();
},
s : function () {
return this.seconds();
},
S : function () {
return toInt(this.milliseconds() / 100);
},
SS : function () {
return leftZeroFill(toInt(this.milliseconds() / 10), 2);
},
SSS : function () {
return leftZeroFill(this.milliseconds(), 3);
},
SSSS : function () {
return leftZeroFill(this.milliseconds(), 3);
},
Z : function () {
var a = -this.zone(),
b = "+";
if (a < 0) {
a = -a;
b = "-";
}
return b + leftZeroFill(toInt(a / 60), 2) + ":" + leftZeroFill(toInt(a) % 60, 2);
},
ZZ : function () {
var a = -this.zone(),
b = "+";
if (a < 0) {
a = -a;
b = "-";
}
return b + leftZeroFill(toInt(a / 60), 2) + leftZeroFill(toInt(a) % 60, 2);
},
z : function () {
return this.zoneAbbr();
},
zz : function () {
return this.zoneName();
},
X : function () {
return this.unix();
},
Q : function () {
return this.quarter();
}
},
lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'];
function padToken(func, count) {
return function (a) {
return leftZeroFill(func.call(this, a), count);
};
}
function ordinalizeToken(func, period) {
return function (a) {
return this.lang().ordinal(func.call(this, a), period);
};
}
while (ordinalizeTokens.length) {
i = ordinalizeTokens.pop();
formatTokenFunctions[i + 'o'] = ordinalizeToken(formatTokenFunctions[i], i);
}
while (paddedTokens.length) {
i = paddedTokens.pop();
formatTokenFunctions[i + i] = padToken(formatTokenFunctions[i], 2);
}
formatTokenFunctions.DDDD = padToken(formatTokenFunctions.DDD, 3);
/************************************
Constructors
************************************/
function Language() {
}
// Moment prototype object
function Moment(config) {
checkOverflow(config);
extend(this, config);
}
// Duration Constructor
function Duration(duration) {
var normalizedInput = normalizeObjectUnits(duration),
years = normalizedInput.year || 0,
months = normalizedInput.month || 0,
weeks = normalizedInput.week || 0,
days = normalizedInput.day || 0,
hours = normalizedInput.hour || 0,
minutes = normalizedInput.minute || 0,
seconds = normalizedInput.second || 0,
milliseconds = normalizedInput.millisecond || 0;
// representation for dateAddRemove
this._milliseconds = +milliseconds +
seconds * 1e3 + // 1000
minutes * 6e4 + // 1000 * 60
hours * 36e5; // 1000 * 60 * 60
// Because of dateAddRemove treats 24 hours as different from a
// day when working around DST, we need to store them separately
this._days = +days +
weeks * 7;
// It is impossible translate months into days without knowing
// which months you are are talking about, so we have to store
// it separately.
this._months = +months +
years * 12;
this._data = {};
this._bubble();
}
/************************************
Helpers
************************************/
function extend(a, b) {
for (var i in b) {
if (b.hasOwnProperty(i)) {
a[i] = b[i];
}
}
if (b.hasOwnProperty("toString")) {
a.toString = b.toString;
}
if (b.hasOwnProperty("valueOf")) {
a.valueOf = b.valueOf;
}
return a;
}
function absRound(number) {
if (number < 0) {
return Math.ceil(number);
} else {
return Math.floor(number);
}
}
// left zero fill a number
// see http://jsperf.com/left-zero-filling for performance comparison
function leftZeroFill(number, targetLength, forceSign) {
var output = Math.abs(number) + '',
sign = number >= 0;
while (output.length < targetLength) {
output = '0' + output;
}
return (sign ? (forceSign ? '+' : '') : '-') + output;
}
// helper function for _.addTime and _.subtractTime
function addOrSubtractDurationFromMoment(mom, duration, isAdding, ignoreUpdateOffset) {
var milliseconds = duration._milliseconds,
days = duration._days,
months = duration._months,
minutes,
hours;
if (milliseconds) {
mom._d.setTime(+mom._d + milliseconds * isAdding);
}
// store the minutes and hours so we can restore them
if (days || months) {
minutes = mom.minute();
hours = mom.hour();
}
if (days) {
mom.date(mom.date() + days * isAdding);
}
if (months) {
mom.month(mom.month() + months * isAdding);
}
if (milliseconds && !ignoreUpdateOffset) {
moment.updateOffset(mom);
}
// restore the minutes and hours after possibly changing dst
if (days || months) {
mom.minute(minutes);
mom.hour(hours);
}
}
// check if is an array
function isArray(input) {
return Object.prototype.toString.call(input) === '[object Array]';
}
function isDate(input) {
return Object.prototype.toString.call(input) === '[object Date]' ||
input instanceof Date;
}
// compare two arrays, return the number of differences
function compareArrays(array1, array2, dontConvert) {
var len = Math.min(array1.length, array2.length),
lengthDiff = Math.abs(array1.length - array2.length),
diffs = 0,
i;
for (i = 0; i < len; i++) {
if ((dontConvert && array1[i] !== array2[i]) ||
(!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
diffs++;
}
}
return diffs + lengthDiff;
}
function normalizeUnits(units) {
if (units) {
var lowered = units.toLowerCase().replace(/(.)s$/, '$1');
units = unitAliases[units] || camelFunctions[lowered] || lowered;
}
return units;
}
function normalizeObjectUnits(inputObject) {
var normalizedInput = {},
normalizedProp,
prop;
for (prop in inputObject) {
if (inputObject.hasOwnProperty(prop)) {
normalizedProp = normalizeUnits(prop);
if (normalizedProp) {
normalizedInput[normalizedProp] = inputObject[prop];
}
}
}
return normalizedInput;
}
function makeList(field) {
var count, setter;
if (field.indexOf('week') === 0) {
count = 7;
setter = 'day';
}
else if (field.indexOf('month') === 0) {
count = 12;
setter = 'month';
}
else {
return;
}
moment[field] = function (format, index) {
var i, getter,
method = moment.fn._lang[field],
results = [];
if (typeof format === 'number') {
index = format;
format = undefined;
}
getter = function (i) {
var m = moment().utc().set(setter, i);
return method.call(moment.fn._lang, m, format || '');
};
if (index != null) {
return getter(index);
}
else {
for (i = 0; i < count; i++) {
results.push(getter(i));
}
return results;
}
};
}
function toInt(argumentForCoercion) {
var coercedNumber = +argumentForCoercion,
value = 0;
if (coercedNumber !== 0 && isFinite(coercedNumber)) {
if (coercedNumber >= 0) {
value = Math.floor(coercedNumber);
} else {
value = Math.ceil(coercedNumber);
}
}
return value;
}
function daysInMonth(year, month) {
return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
}
function daysInYear(year) {
return isLeapYear(year) ? 366 : 365;
}
function isLeapYear(year) {
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
}
function checkOverflow(m) {
var overflow;
if (m._a && m._pf.overflow === -2) {
overflow =
m._a[MONTH] < 0 || m._a[MONTH] > 11 ? MONTH :
m._a[DATE] < 1 || m._a[DATE] > daysInMonth(m._a[YEAR], m._a[MONTH]) ? DATE :
m._a[HOUR] < 0 || m._a[HOUR] > 23 ? HOUR :
m._a[MINUTE] < 0 || m._a[MINUTE] > 59 ? MINUTE :
m._a[SECOND] < 0 || m._a[SECOND] > 59 ? SECOND :
m._a[MILLISECOND] < 0 || m._a[MILLISECOND] > 999 ? MILLISECOND :
-1;
if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
overflow = DATE;
}
m._pf.overflow = overflow;
}
}
function initializeParsingFlags(config) {
config._pf = {
empty : false,
unusedTokens : [],
unusedInput : [],
overflow : -2,
charsLeftOver : 0,
nullInput : false,
invalidMonth : null,
invalidFormat : false,
userInvalidated : false,
iso: false
};
}
function isValid(m) {
if (m._isValid == null) {
m._isValid = !isNaN(m._d.getTime()) &&
m._pf.overflow < 0 &&
!m._pf.empty &&
!m._pf.invalidMonth &&
!m._pf.nullInput &&
!m._pf.invalidFormat &&
!m._pf.userInvalidated;
if (m._strict) {
m._isValid = m._isValid &&
m._pf.charsLeftOver === 0 &&
m._pf.unusedTokens.length === 0;
}
}
return m._isValid;
}
function normalizeLanguage(key) {
return key ? key.toLowerCase().replace('_', '-') : key;
}
/************************************
Languages
************************************/
extend(Language.prototype, {
set : function (config) {
var prop, i;
for (i in config) {
prop = config[i];
if (typeof prop === 'function') {
this[i] = prop;
} else {
this['_' + i] = prop;
}
}
},
_months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
months : function (m) {
return this._months[m.month()];
},
_monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
monthsShort : function (m) {
return this._monthsShort[m.month()];
},
monthsParse : function (monthName) {
var i, mom, regex;
if (!this._monthsParse) {
this._monthsParse = [];
}
for (i = 0; i < 12; i++) {
// make the regex if we don't have it already
if (!this._monthsParse[i]) {
mom = moment.utc([2000, i]);
regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
// test the regex
if (this._monthsParse[i].test(monthName)) {
return i;
}
}
},
_weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
weekdays : function (m) {
return this._weekdays[m.day()];
},
_weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
weekdaysShort : function (m) {
return this._weekdaysShort[m.day()];
},
_weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
weekdaysMin : function (m) {
return this._weekdaysMin[m.day()];
},
weekdaysParse : function (weekdayName) {
var i, mom, regex;
if (!this._weekdaysParse) {
this._weekdaysParse = [];
}
for (i = 0; i < 7; i++) {
// make the regex if we don't have it already
if (!this._weekdaysParse[i]) {
mom = moment([2000, 1]).day(i);
regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
// test the regex
if (this._weekdaysParse[i].test(weekdayName)) {
return i;
}
}
},
_longDateFormat : {
LT : "h:mm A",
L : "MM/DD/YYYY",
LL : "MMMM D YYYY",
LLL : "MMMM D YYYY LT",
LLLL : "dddd, MMMM D YYYY LT"
},
longDateFormat : function (key) {
var output = this._longDateFormat[key];
if (!output && this._longDateFormat[key.toUpperCase()]) {
output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) {
return val.slice(1);
});
this._longDateFormat[key] = output;
}
return output;
},
isPM : function (input) {
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
// Using charAt should be more compatible.
return ((input + '').toLowerCase().charAt(0) === 'p');
},
_meridiemParse : /[ap]\.?m?\.?/i,
meridiem : function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'pm' : 'PM';
} else {
return isLower ? 'am' : 'AM';
}
},
_calendar : {
sameDay : '[Today at] LT',
nextDay : '[Tomorrow at] LT',
nextWeek : 'dddd [at] LT',
lastDay : '[Yesterday at] LT',
lastWeek : '[Last] dddd [at] LT',
sameElse : 'L'
},
calendar : function (key, mom) {
var output = this._calendar[key];
return typeof output === 'function' ? output.apply(mom) : output;
},
_relativeTime : {
future : "in %s",
past : "%s ago",
s : "a few seconds",
m : "a minute",
mm : "%d minutes",
h : "an hour",
hh : "%d hours",
d : "a day",
dd : "%d days",
M : "a month",
MM : "%d months",
y : "a year",
yy : "%d years"
},
relativeTime : function (number, withoutSuffix, string, isFuture) {
var output = this._relativeTime[string];
return (typeof output === 'function') ?
output(number, withoutSuffix, string, isFuture) :
output.replace(/%d/i, number);
},
pastFuture : function (diff, output) {
var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
return typeof format === 'function' ? format(output) : format.replace(/%s/i, output);
},
ordinal : function (number) {
return this._ordinal.replace("%d", number);
},
_ordinal : "%d",
preparse : function (string) {
return string;
},
postformat : function (string) {
return string;
},
week : function (mom) {
return weekOfYear(mom, this._week.dow, this._week.doy).week;
},
_week : {
dow : 0, // Sunday is the first day of the week.
doy : 6 // The week that contains Jan 1st is the first week of the year.
},
_invalidDate: 'Invalid date',
invalidDate: function () {
return this._invalidDate;
}
});
// Loads a language definition into the `languages` cache. The function
// takes a key and optionally values. If not in the browser and no values
// are provided, it will load the language file module. As a convenience,
// this function also returns the language values.
function loadLang(key, values) {
values.abbr = key;
if (!languages[key]) {
languages[key] = new Language();
}
languages[key].set(values);
return languages[key];
}
// Remove a language from the `languages` cache. Mostly useful in tests.
function unloadLang(key) {
delete languages[key];
}
// Determines which language definition to use and returns it.
//
// With no parameters, it will return the global language. If you
// pass in a language key, such as 'en', it will return the
// definition for 'en', so long as 'en' has already been loaded using
// moment.lang.
function getLangDefinition(key) {
var i = 0, j, lang, next, split,
get = function (k) {
if (!languages[k] && hasModule) {
try {
require('./lang/' + k);
} catch (e) { }
}
return languages[k];
};
if (!key) {
return moment.fn._lang;
}
if (!isArray(key)) {
//short-circuit everything else
lang = get(key);
if (lang) {
return lang;
}
key = [key];
}
//pick the language from the array
//try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
//substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
while (i < key.length) {
split = normalizeLanguage(key[i]).split('-');
j = split.length;
next = normalizeLanguage(key[i + 1]);
next = next ? next.split('-') : null;
while (j > 0) {
lang = get(split.slice(0, j).join('-'));
if (lang) {
return lang;
}
if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
//the next array item is better than a shallower substring of this one
break;
}
j--;
}
i++;
}
return moment.fn._lang;
}
/************************************
Formatting
************************************/
function removeFormattingTokens(input) {
if (input.match(/\[[\s\S]/)) {
return input.replace(/^\[|\]$/g, "");
}
return input.replace(/\\/g, "");
}
function makeFormatFunction(format) {
var array = format.match(formattingTokens), i, length;
for (i = 0, length = array.length; i < length; i++) {
if (formatTokenFunctions[array[i]]) {
array[i] = formatTokenFunctions[array[i]];
} else {
array[i] = removeFormattingTokens(array[i]);
}
}
return function (mom) {
var output = "";
for (i = 0; i < length; i++) {
output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
}
return output;
};
}
// format date using native date object
function formatMoment(m, format) {
if (!m.isValid()) {
return m.lang().invalidDate();
}
format = expandFormat(format, m.lang());
if (!formatFunctions[format]) {
formatFunctions[format] = makeFormatFunction(format);
}
return formatFunctions[format](m);
}
function expandFormat(format, lang) {
var i = 5;
function replaceLongDateFormatTokens(input) {
return lang.longDateFormat(input) || input;
}
localFormattingTokens.lastIndex = 0;
while (i >= 0 && localFormattingTokens.test(format)) {
format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
localFormattingTokens.lastIndex = 0;
i -= 1;
}
return format;
}
/************************************
Parsing
************************************/
// get the regex to find the next token
function getParseRegexForToken(token, config) {
var a, strict = config._strict;
switch (token) {
case 'DDDD':
return parseTokenThreeDigits;
case 'YYYY':
case 'GGGG':
case 'gggg':
return strict ? parseTokenFourDigits : parseTokenOneToFourDigits;
case 'YYYYYY':
case 'YYYYY':
case 'GGGGG':
case 'ggggg':
return strict ? parseTokenSixDigits : parseTokenOneToSixDigits;
case 'S':
if (strict) { return parseTokenOneDigit; }
/* falls through */
case 'SS':
if (strict) { return parseTokenTwoDigits; }
/* falls through */
case 'SSS':
case 'DDD':
return strict ? parseTokenThreeDigits : parseTokenOneToThreeDigits;
case 'MMM':
case 'MMMM':
case 'dd':
case 'ddd':
case 'dddd':
return parseTokenWord;
case 'a':
case 'A':
return getLangDefinition(config._l)._meridiemParse;
case 'X':
return parseTokenTimestampMs;
case 'Z':
case 'ZZ':
return parseTokenTimezone;
case 'T':
return parseTokenT;
case 'SSSS':
return parseTokenDigits;
case 'MM':
case 'DD':
case 'YY':
case 'GG':
case 'gg':
case 'HH':
case 'hh':
case 'mm':
case 'ss':
case 'ww':
case 'WW':
return strict ? parseTokenTwoDigits : parseTokenOneOrTwoDigits;
case 'M':
case 'D':
case 'd':
case 'H':
case 'h':
case 'm':
case 's':
case 'w':
case 'W':
case 'e':
case 'E':
return strict ? parseTokenOneDigit : parseTokenOneOrTwoDigits;
default :
a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), "i"));
return a;
}
}
function timezoneMinutesFromString(string) {
string = string || "";
var possibleTzMatches = (string.match(parseTokenTimezone) || []),
tzChunk = possibleTzMatches[possibleTzMatches.length - 1] || [],
parts = (tzChunk + '').match(parseTimezoneChunker) || ['-', 0, 0],
minutes = +(parts[1] * 60) + toInt(parts[2]);
return parts[0] === '+' ? -minutes : minutes;
}
// function to convert string input to date
function addTimeToArrayFromToken(token, input, config) {
var a, datePartArray = config._a;
switch (token) {
// MONTH
case 'M' : // fall through to MM
case 'MM' :
if (input != null) {
datePartArray[MONTH] = toInt(input) - 1;
}
break;
case 'MMM' : // fall through to MMMM
case 'MMMM' :
a = getLangDefinition(config._l).monthsParse(input);
// if we didn't find a month name, mark the date as invalid.
if (a != null) {
datePartArray[MONTH] = a;
} else {
config._pf.invalidMonth = input;
}
break;
// DAY OF MONTH
case 'D' : // fall through to DD
case 'DD' :
if (input != null) {
datePartArray[DATE] = toInt(input);
}
break;
// DAY OF YEAR
case 'DDD' : // fall through to DDDD
case 'DDDD' :
if (input != null) {
config._dayOfYear = toInt(input);
}
break;
// YEAR
case 'YY' :
datePartArray[YEAR] = toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
break;
case 'YYYY' :
case 'YYYYY' :
case 'YYYYYY' :
datePartArray[YEAR] = toInt(input);
break;
// AM / PM
case 'a' : // fall through to A
case 'A' :
config._isPm = getLangDefinition(config._l).isPM(input);
break;
// 24 HOUR
case 'H' : // fall through to hh
case 'HH' : // fall through to hh
case 'h' : // fall through to hh
case 'hh' :
datePartArray[HOUR] = toInt(input);
break;
// MINUTE
case 'm' : // fall through to mm
case 'mm' :
datePartArray[MINUTE] = toInt(input);
break;
// SECOND
case 's' : // fall through to ss
case 'ss' :
datePartArray[SECOND] = toInt(input);
break;
// MILLISECOND
case 'S' :
case 'SS' :
case 'SSS' :
case 'SSSS' :
datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000);
break;
// UNIX TIMESTAMP WITH MS
case 'X':
config._d = new Date(parseFloat(input) * 1000);
break;
// TIMEZONE
case 'Z' : // fall through to ZZ
case 'ZZ' :
config._useUTC = true;
config._tzm = timezoneMinutesFromString(input);
break;
case 'w':
case 'ww':
case 'W':
case 'WW':
case 'd':
case 'dd':
case 'ddd':
case 'dddd':
case 'e':
case 'E':
token = token.substr(0, 1);
/* falls through */
case 'gg':
case 'gggg':
case 'GG':
case 'GGGG':
case 'GGGGG':
token = token.substr(0, 2);
if (input) {
config._w = config._w || {};
config._w[token] = input;
}
break;
}
}
// convert an array to a date.
// the array should mirror the parameters below
// note: all values past the year are optional and will default to the lowest possible value.
// [year, month, day , hour, minute, second, millisecond]
function dateFromConfig(config) {
var i, date, input = [], currentDate,
yearToUse, fixYear, w, temp, lang, weekday, week;
if (config._d) {
return;
}
currentDate = currentDateArray(config);
//compute day of the year from weeks and weekdays
if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
fixYear = function (val) {
var int_val = parseInt(val, 10);
return val ?
(val.length < 3 ? (int_val > 68 ? 1900 + int_val : 2000 + int_val) : int_val) :
(config._a[YEAR] == null ? moment().weekYear() : config._a[YEAR]);
};
w = config._w;
if (w.GG != null || w.W != null || w.E != null) {
temp = dayOfYearFromWeeks(fixYear(w.GG), w.W || 1, w.E, 4, 1);
}
else {
lang = getLangDefinition(config._l);
weekday = w.d != null ? parseWeekday(w.d, lang) :
(w.e != null ? parseInt(w.e, 10) + lang._week.dow : 0);
week = parseInt(w.w, 10) || 1;
//if we're parsing 'd', then the low day numbers may be next week
if (w.d != null && weekday < lang._week.dow) {
week++;
}
temp = dayOfYearFromWeeks(fixYear(w.gg), week, weekday, lang._week.doy, lang._week.dow);
}
config._a[YEAR] = temp.year;
config._dayOfYear = temp.dayOfYear;
}
//if the day of the year is set, figure out what it is
if (config._dayOfYear) {
yearToUse = config._a[YEAR] == null ? currentDate[YEAR] : config._a[YEAR];
if (config._dayOfYear > daysInYear(yearToUse)) {
config._pf._overflowDayOfYear = true;
}
date = makeUTCDate(yearToUse, 0, config._dayOfYear);
config._a[MONTH] = date.getUTCMonth();
config._a[DATE] = date.getUTCDate();
}
// Default to current date.
// * if no year, month, day of month are given, default to today
// * if day of month is given, default month and year
// * if month is given, default only year
// * if year is given, don't default anything
for (i = 0; i < 3 && config._a[i] == null; ++i) {
config._a[i] = input[i] = currentDate[i];
}
// Zero out whatever was not defaulted, including time
for (; i < 7; i++) {
config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
}
// add the offsets to the time to be parsed so that we can have a clean array for checking isValid
input[HOUR] += toInt((config._tzm || 0) / 60);
input[MINUTE] += toInt((config._tzm || 0) % 60);
config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input);
}
function dateFromObject(config) {
var normalizedInput;
if (config._d) {
return;
}
normalizedInput = normalizeObjectUnits(config._i);
config._a = [
normalizedInput.year,
normalizedInput.month,
normalizedInput.day,
normalizedInput.hour,
normalizedInput.minute,
normalizedInput.second,
normalizedInput.millisecond
];
dateFromConfig(config);
}
function currentDateArray(config) {
var now = new Date();
if (config._useUTC) {
return [
now.getUTCFullYear(),
now.getUTCMonth(),
now.getUTCDate()
];
} else {
return [now.getFullYear(), now.getMonth(), now.getDate()];
}
}
// date from string and format string
function makeDateFromStringAndFormat(config) {
config._a = [];
config._pf.empty = true;
// This array is used to make a Date, either with `new Date` or `Date.UTC`
var lang = getLangDefinition(config._l),
string = '' + config._i,
i, parsedInput, tokens, token, skipped,
stringLength = string.length,
totalParsedInputLength = 0;
tokens = expandFormat(config._f, lang).match(formattingTokens) || [];
for (i = 0; i < tokens.length; i++) {
token = tokens[i];
parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
if (parsedInput) {
skipped = string.substr(0, string.indexOf(parsedInput));
if (skipped.length > 0) {
config._pf.unusedInput.push(skipped);
}
string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
totalParsedInputLength += parsedInput.length;
}
// don't parse if it's not a known token
if (formatTokenFunctions[token]) {
if (parsedInput) {
config._pf.empty = false;
}
else {
config._pf.unusedTokens.push(token);
}
addTimeToArrayFromToken(token, parsedInput, config);
}
else if (config._strict && !parsedInput) {
config._pf.unusedTokens.push(token);
}
}
// add remaining unparsed input length to the string
config._pf.charsLeftOver = stringLength - totalParsedInputLength;
if (string.length > 0) {
config._pf.unusedInput.push(string);
}
// handle am pm
if (config._isPm && config._a[HOUR] < 12) {
config._a[HOUR] += 12;
}
// if is 12 am, change hours to 0
if (config._isPm === false && config._a[HOUR] === 12) {
config._a[HOUR] = 0;
}
dateFromConfig(config);
checkOverflow(config);
}
function unescapeFormat(s) {
return s.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
return p1 || p2 || p3 || p4;
});
}
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
function regexpEscape(s) {
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
}
// date from string and array of format strings
function makeDateFromStringAndArray(config) {
var tempConfig,
bestMoment,
scoreToBeat,
i,
currentScore;
if (config._f.length === 0) {
config._pf.invalidFormat = true;
config._d = new Date(NaN);
return;
}
for (i = 0; i < config._f.length; i++) {
currentScore = 0;
tempConfig = extend({}, config);
initializeParsingFlags(tempConfig);
tempConfig._f = config._f[i];
makeDateFromStringAndFormat(tempConfig);
if (!isValid(tempConfig)) {
continue;
}
// if there is any input that was not parsed add a penalty for that format
currentScore += tempConfig._pf.charsLeftOver;
//or tokens
currentScore += tempConfig._pf.unusedTokens.length * 10;
tempConfig._pf.score = currentScore;
if (scoreToBeat == null || currentScore < scoreToBeat) {
scoreToBeat = currentScore;
bestMoment = tempConfig;
}
}
extend(config, bestMoment || tempConfig);
}
// date from iso format
function makeDateFromString(config) {
var i,
string = config._i,
match = isoRegex.exec(string);
if (match) {
config._pf.iso = true;
for (i = 4; i > 0; i--) {
if (match[i]) {
// match[5] should be "T" or undefined
config._f = isoDates[i - 1] + (match[6] || " ");
break;
}
}
for (i = 0; i < 4; i++) {
if (isoTimes[i][1].exec(string)) {
config._f += isoTimes[i][0];
break;
}
}
if (string.match(parseTokenTimezone)) {
config._f += "Z";
}
makeDateFromStringAndFormat(config);
}
else {
config._d = new Date(string);
}
}
function makeDateFromInput(config) {
var input = config._i,
matched = aspNetJsonRegex.exec(input);
if (input === undefined) {
config._d = new Date();
} else if (matched) {
config._d = new Date(+matched[1]);
} else if (typeof input === 'string') {
makeDateFromString(config);
} else if (isArray(input)) {
config._a = input.slice(0);
dateFromConfig(config);
} else if (isDate(input)) {
config._d = new Date(+input);
} else if (typeof(input) === 'object') {
dateFromObject(config);
} else {
config._d = new Date(input);
}
}
function makeDate(y, m, d, h, M, s, ms) {
//can't just apply() to create a date:
//http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
var date = new Date(y, m, d, h, M, s, ms);
//the date constructor doesn't accept years < 1970
if (y < 1970) {
date.setFullYear(y);
}
return date;
}
function makeUTCDate(y) {
var date = new Date(Date.UTC.apply(null, arguments));
if (y < 1970) {
date.setUTCFullYear(y);
}
return date;
}
function parseWeekday(input, language) {
if (typeof input === 'string') {
if (!isNaN(input)) {
input = parseInt(input, 10);
}
else {
input = language.weekdaysParse(input);
if (typeof input !== 'number') {
return null;
}
}
}
return input;
}
/************************************
Relative Time
************************************/
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
function substituteTimeAgo(string, number, withoutSuffix, isFuture, lang) {
return lang.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
}
function relativeTime(milliseconds, withoutSuffix, lang) {
var seconds = round(Math.abs(milliseconds) / 1000),
minutes = round(seconds / 60),
hours = round(minutes / 60),
days = round(hours / 24),
years = round(days / 365),
args = seconds < 45 && ['s', seconds] ||
minutes === 1 && ['m'] ||
minutes < 45 && ['mm', minutes] ||
hours === 1 && ['h'] ||
hours < 22 && ['hh', hours] ||
days === 1 && ['d'] ||
days <= 25 && ['dd', days] ||
days <= 45 && ['M'] ||
days < 345 && ['MM', round(days / 30)] ||
years === 1 && ['y'] || ['yy', years];
args[2] = withoutSuffix;
args[3] = milliseconds > 0;
args[4] = lang;
return substituteTimeAgo.apply({}, args);
}
/************************************
Week of Year
************************************/
// firstDayOfWeek 0 = sun, 6 = sat
// the day of the week that starts the week
// (usually sunday or monday)
// firstDayOfWeekOfYear 0 = sun, 6 = sat
// the first week is the week that contains the first
// of this day of the week
// (eg. ISO weeks use thursday (4))
function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) {
var end = firstDayOfWeekOfYear - firstDayOfWeek,
daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(),
adjustedMoment;
if (daysToDayOfWeek > end) {
daysToDayOfWeek -= 7;
}
if (daysToDayOfWeek < end - 7) {
daysToDayOfWeek += 7;
}
adjustedMoment = moment(mom).add('d', daysToDayOfWeek);
return {
week: Math.ceil(adjustedMoment.dayOfYear() / 7),
year: adjustedMoment.year()
};
}
//http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {
// The only solid way to create an iso date from year is to use
// a string format (Date.UTC handles only years > 1900). Don't ask why
// it doesn't need Z at the end.
var d = new Date(leftZeroFill(year, 6, true) + '-01-01').getUTCDay(),
daysToAdd, dayOfYear;
weekday = weekday != null ? weekday : firstDayOfWeek;
daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0);
dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1;
return {
year: dayOfYear > 0 ? year : year - 1,
dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear
};
}
/************************************
Top Level Functions
************************************/
function makeMoment(config) {
var input = config._i,
format = config._f;
if (typeof config._pf === 'undefined') {
initializeParsingFlags(config);
}
if (input === null) {
return moment.invalid({nullInput: true});
}
if (typeof input === 'string') {
config._i = input = getLangDefinition().preparse(input);
}
if (moment.isMoment(input)) {
config = extend({}, input);
config._d = new Date(+input._d);
} else if (format) {
if (isArray(format)) {
makeDateFromStringAndArray(config);
} else {
makeDateFromStringAndFormat(config);
}
} else {
makeDateFromInput(config);
}
return new Moment(config);
}
moment = function (input, format, lang, strict) {
if (typeof(lang) === "boolean") {
strict = lang;
lang = undefined;
}
return makeMoment({
_i : input,
_f : format,
_l : lang,
_strict : strict,
_isUTC : false
});
};
// creating with utc
moment.utc = function (input, format, lang, strict) {
var m;
if (typeof(lang) === "boolean") {
strict = lang;
lang = undefined;
}
m = makeMoment({
_useUTC : true,
_isUTC : true,
_l : lang,
_i : input,
_f : format,
_strict : strict
}).utc();
return m;
};
// creating with unix timestamp (in seconds)
moment.unix = function (input) {
return moment(input * 1000);
};
// duration
moment.duration = function (input, key) {
var duration = input,
// matching against regexp is expensive, do it on demand
match = null,
sign,
ret,
parseIso;
if (moment.isDuration(input)) {
duration = {
ms: input._milliseconds,
d: input._days,
M: input._months
};
} else if (typeof input === 'number') {
duration = {};
if (key) {
duration[key] = input;
} else {
duration.milliseconds = input;
}
} else if (!!(match = aspNetTimeSpanJsonRegex.exec(input))) {
sign = (match[1] === "-") ? -1 : 1;
duration = {
y: 0,
d: toInt(match[DATE]) * sign,
h: toInt(match[HOUR]) * sign,
m: toInt(match[MINUTE]) * sign,
s: toInt(match[SECOND]) * sign,
ms: toInt(match[MILLISECOND]) * sign
};
} else if (!!(match = isoDurationRegex.exec(input))) {
sign = (match[1] === "-") ? -1 : 1;
parseIso = function (inp) {
// We'd normally use ~~inp for this, but unfortunately it also
// converts floats to ints.
// inp may be undefined, so careful calling replace on it.
var res = inp && parseFloat(inp.replace(',', '.'));
// apply sign while we're at it
return (isNaN(res) ? 0 : res) * sign;
};
duration = {
y: parseIso(match[2]),
M: parseIso(match[3]),
d: parseIso(match[4]),
h: parseIso(match[5]),
m: parseIso(match[6]),
s: parseIso(match[7]),
w: parseIso(match[8])
};
}
ret = new Duration(duration);
if (moment.isDuration(input) && input.hasOwnProperty('_lang')) {
ret._lang = input._lang;
}
return ret;
};
// version number
moment.version = VERSION;
// default format
moment.defaultFormat = isoFormat;
// This function will be called whenever a moment is mutated.
// It is intended to keep the offset in sync with the timezone.
moment.updateOffset = function () {};
// This function will load languages and then set the global language. If
// no arguments are passed in, it will simply return the current global
// language key.
moment.lang = function (key, values) {
var r;
if (!key) {
return moment.fn._lang._abbr;
}
if (values) {
loadLang(normalizeLanguage(key), values);
} else if (values === null) {
unloadLang(key);
key = 'en';
} else if (!languages[key]) {
getLangDefinition(key);
}
r = moment.duration.fn._lang = moment.fn._lang = getLangDefinition(key);
return r._abbr;
};
// returns language data
moment.langData = function (key) {
if (key && key._lang && key._lang._abbr) {
key = key._lang._abbr;
}
return getLangDefinition(key);
};
// compare moment object
moment.isMoment = function (obj) {
return obj instanceof Moment;
};
// for typechecking Duration objects
moment.isDuration = function (obj) {
return obj instanceof Duration;
};
for (i = lists.length - 1; i >= 0; --i) {
makeList(lists[i]);
}
moment.normalizeUnits = function (units) {
return normalizeUnits(units);
};
moment.invalid = function (flags) {
var m = moment.utc(NaN);
if (flags != null) {
extend(m._pf, flags);
}
else {
m._pf.userInvalidated = true;
}
return m;
};
moment.parseZone = function (input) {
return moment(input).parseZone();
};
/************************************
Moment Prototype
************************************/
extend(moment.fn = Moment.prototype, {
clone : function () {
return moment(this);
},
valueOf : function () {
return +this._d + ((this._offset || 0) * 60000);
},
unix : function () {
return Math.floor(+this / 1000);
},
toString : function () {
return this.clone().lang('en').format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
},
toDate : function () {
return this._offset ? new Date(+this) : this._d;
},
toISOString : function () {
var m = moment(this).utc();
if (0 < m.year() && m.year() <= 9999) {
return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
} else {
return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
}
},
toArray : function () {
var m = this;
return [
m.year(),
m.month(),
m.date(),
m.hours(),
m.minutes(),
m.seconds(),
m.milliseconds()
];
},
isValid : function () {
return isValid(this);
},
isDSTShifted : function () {
if (this._a) {
return this.isValid() && compareArrays(this._a, (this._isUTC ? moment.utc(this._a) : moment(this._a)).toArray()) > 0;
}
return false;
},
parsingFlags : function () {
return extend({}, this._pf);
},
invalidAt: function () {
return this._pf.overflow;
},
utc : function () {
return this.zone(0);
},
local : function () {
this.zone(0);
this._isUTC = false;
return this;
},
format : function (inputString) {
var output = formatMoment(this, inputString || moment.defaultFormat);
return this.lang().postformat(output);
},
add : function (input, val) {
var dur;
// switch args to support add('s', 1) and add(1, 's')
if (typeof input === 'string') {
dur = moment.duration(+val, input);
} else {
dur = moment.duration(input, val);
}
addOrSubtractDurationFromMoment(this, dur, 1);
return this;
},
subtract : function (input, val) {
var dur;
// switch args to support subtract('s', 1) and subtract(1, 's')
if (typeof input === 'string') {
dur = moment.duration(+val, input);
} else {
dur = moment.duration(input, val);
}
addOrSubtractDurationFromMoment(this, dur, -1);
return this;
},
diff : function (input, units, asFloat) {
var that = moment(input),
zoneDiff = (this.zone() - that.zone()) * 6e4,
diff, output;
units = normalizeUnits(units);
if (units === 'year' || units === 'month') {
// average number of days in the months in the given dates
diff = (this.daysInMonth() + that.daysInMonth()) * 432e5; // 24 * 60 * 60 * 1000 / 2
// difference in months
output = ((this.year() - that.year()) * 12) + (this.month() - that.month());
// adjust by taking difference in days, average number of days
// and dst in the given months.
output += ((this - moment(this).startOf('month')) -
(that - moment(that).startOf('month'))) / diff;
// same as above but with zones, to negate all dst
output -= ((this.zone() - moment(this).startOf('month').zone()) -
(that.zone() - moment(that).startOf('month').zone())) * 6e4 / diff;
if (units === 'year') {
output = output / 12;
}
} else {
diff = (this - that);
output = units === 'second' ? diff / 1e3 : // 1000
units === 'minute' ? diff / 6e4 : // 1000 * 60
units === 'hour' ? diff / 36e5 : // 1000 * 60 * 60
units === 'day' ? (diff - zoneDiff) / 864e5 : // 1000 * 60 * 60 * 24, negate dst
units === 'week' ? (diff - zoneDiff) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst
diff;
}
return asFloat ? output : absRound(output);
},
from : function (time, withoutSuffix) {
return moment.duration(this.diff(time)).lang(this.lang()._abbr).humanize(!withoutSuffix);
},
fromNow : function (withoutSuffix) {
return this.from(moment(), withoutSuffix);
},
calendar : function () {
var diff = this.diff(moment().zone(this.zone()).startOf('day'), 'days', true),
format = diff < -6 ? 'sameElse' :
diff < -1 ? 'lastWeek' :
diff < 0 ? 'lastDay' :
diff < 1 ? 'sameDay' :
diff < 2 ? 'nextDay' :
diff < 7 ? 'nextWeek' : 'sameElse';
return this.format(this.lang().calendar(format, this));
},
isLeapYear : function () {
return isLeapYear(this.year());
},
isDST : function () {
return (this.zone() < this.clone().month(0).zone() ||
this.zone() < this.clone().month(5).zone());
},
day : function (input) {
var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
if (input != null) {
input = parseWeekday(input, this.lang());
return this.add({ d : input - day });
} else {
return day;
}
},
month : function (input) {
var utc = this._isUTC ? 'UTC' : '',
dayOfMonth;
if (input != null) {
if (typeof input === 'string') {
input = this.lang().monthsParse(input);
if (typeof input !== 'number') {
return this;
}
}
dayOfMonth = this.date();
this.date(1);
this._d['set' + utc + 'Month'](input);
this.date(Math.min(dayOfMonth, this.daysInMonth()));
moment.updateOffset(this);
return this;
} else {
return this._d['get' + utc + 'Month']();
}
},
startOf: function (units) {
units = normalizeUnits(units);
// the following switch intentionally omits break keywords
// to utilize falling through the cases.
switch (units) {
case 'year':
this.month(0);
/* falls through */
case 'month':
this.date(1);
/* falls through */
case 'week':
case 'isoWeek':
case 'day':
this.hours(0);
/* falls through */
case 'hour':
this.minutes(0);
/* falls through */
case 'minute':
this.seconds(0);
/* falls through */
case 'second':
this.milliseconds(0);
/* falls through */
}
// weeks are a special case
if (units === 'week') {
this.weekday(0);
} else if (units === 'isoWeek') {
this.isoWeekday(1);
}
return this;
},
endOf: function (units) {
units = normalizeUnits(units);
return this.startOf(units).add((units === 'isoWeek' ? 'week' : units), 1).subtract('ms', 1);
},
isAfter: function (input, units) {
units = typeof units !== 'undefined' ? units : 'millisecond';
return +this.clone().startOf(units) > +moment(input).startOf(units);
},
isBefore: function (input, units) {
units = typeof units !== 'undefined' ? units : 'millisecond';
return +this.clone().startOf(units) < +moment(input).startOf(units);
},
isSame: function (input, units) {
units = typeof units !== 'undefined' ? units : 'millisecond';
return +this.clone().startOf(units) === +moment(input).startOf(units);
},
min: function (other) {
other = moment.apply(null, arguments);
return other < this ? this : other;
},
max: function (other) {
other = moment.apply(null, arguments);
return other > this ? this : other;
},
zone : function (input) {
var offset = this._offset || 0;
if (input != null) {
if (typeof input === "string") {
input = timezoneMinutesFromString(input);
}
if (Math.abs(input) < 16) {
input = input * 60;
}
this._offset = input;
this._isUTC = true;
if (offset !== input) {
addOrSubtractDurationFromMoment(this, moment.duration(offset - input, 'm'), 1, true);
}
} else {
return this._isUTC ? offset : this._d.getTimezoneOffset();
}
return this;
},
zoneAbbr : function () {
return this._isUTC ? "UTC" : "";
},
zoneName : function () {
return this._isUTC ? "Coordinated Universal Time" : "";
},
parseZone : function () {
if (this._tzm) {
this.zone(this._tzm);
} else if (typeof this._i === 'string') {
this.zone(this._i);
}
return this;
},
hasAlignedHourOffset : function (input) {
if (!input) {
input = 0;
}
else {
input = moment(input).zone();
}
return (this.zone() - input) % 60 === 0;
},
daysInMonth : function () {
return daysInMonth(this.year(), this.month());
},
dayOfYear : function (input) {
var dayOfYear = round((moment(this).startOf('day') - moment(this).startOf('year')) / 864e5) + 1;
return input == null ? dayOfYear : this.add("d", (input - dayOfYear));
},
quarter : function () {
return Math.ceil((this.month() + 1.0) / 3.0);
},
weekYear : function (input) {
var year = weekOfYear(this, this.lang()._week.dow, this.lang()._week.doy).year;
return input == null ? year : this.add("y", (input - year));
},
isoWeekYear : function (input) {
var year = weekOfYear(this, 1, 4).year;
return input == null ? year : this.add("y", (input - year));
},
week : function (input) {
var week = this.lang().week(this);
return input == null ? week : this.add("d", (input - week) * 7);
},
isoWeek : function (input) {
var week = weekOfYear(this, 1, 4).week;
return input == null ? week : this.add("d", (input - week) * 7);
},
weekday : function (input) {
var weekday = (this.day() + 7 - this.lang()._week.dow) % 7;
return input == null ? weekday : this.add("d", input - weekday);
},
isoWeekday : function (input) {
// behaves the same as moment#day except
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
// as a setter, sunday should belong to the previous week.
return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7);
},
get : function (units) {
units = normalizeUnits(units);
return this[units]();
},
set : function (units, value) {
units = normalizeUnits(units);
if (typeof this[units] === 'function') {
this[units](value);
}
return this;
},
// If passed a language key, it will set the language for this
// instance. Otherwise, it will return the language configuration
// variables for this instance.
lang : function (key) {
if (key === undefined) {
return this._lang;
} else {
this._lang = getLangDefinition(key);
return this;
}
}
});
// helper for adding shortcuts
function makeGetterAndSetter(name, key) {
moment.fn[name] = moment.fn[name + 's'] = function (input) {
var utc = this._isUTC ? 'UTC' : '';
if (input != null) {
this._d['set' + utc + key](input);
moment.updateOffset(this);
return this;
} else {
return this._d['get' + utc + key]();
}
};
}
// loop through and add shortcuts (Month, Date, Hours, Minutes, Seconds, Milliseconds)
for (i = 0; i < proxyGettersAndSetters.length; i ++) {
makeGetterAndSetter(proxyGettersAndSetters[i].toLowerCase().replace(/s$/, ''), proxyGettersAndSetters[i]);
}
// add shortcut for year (uses different syntax than the getter/setter 'year' == 'FullYear')
makeGetterAndSetter('year', 'FullYear');
// add plural methods
moment.fn.days = moment.fn.day;
moment.fn.months = moment.fn.month;
moment.fn.weeks = moment.fn.week;
moment.fn.isoWeeks = moment.fn.isoWeek;
// add aliased format methods
moment.fn.toJSON = moment.fn.toISOString;
/************************************
Duration Prototype
************************************/
extend(moment.duration.fn = Duration.prototype, {
_bubble : function () {
var milliseconds = this._milliseconds,
days = this._days,
months = this._months,
data = this._data,
seconds, minutes, hours, years;
// The following code bubbles up values, see the tests for
// examples of what that means.
data.milliseconds = milliseconds % 1000;
seconds = absRound(milliseconds / 1000);
data.seconds = seconds % 60;
minutes = absRound(seconds / 60);
data.minutes = minutes % 60;
hours = absRound(minutes / 60);
data.hours = hours % 24;
days += absRound(hours / 24);
data.days = days % 30;
months += absRound(days / 30);
data.months = months % 12;
years = absRound(months / 12);
data.years = years;
},
weeks : function () {
return absRound(this.days() / 7);
},
valueOf : function () {
return this._milliseconds +
this._days * 864e5 +
(this._months % 12) * 2592e6 +
toInt(this._months / 12) * 31536e6;
},
humanize : function (withSuffix) {
var difference = +this,
output = relativeTime(difference, !withSuffix, this.lang());
if (withSuffix) {
output = this.lang().pastFuture(difference, output);
}
return this.lang().postformat(output);
},
add : function (input, val) {
// supports only 2.0-style add(1, 's') or add(moment)
var dur = moment.duration(input, val);
this._milliseconds += dur._milliseconds;
this._days += dur._days;
this._months += dur._months;
this._bubble();
return this;
},
subtract : function (input, val) {
var dur = moment.duration(input, val);
this._milliseconds -= dur._milliseconds;
this._days -= dur._days;
this._months -= dur._months;
this._bubble();
return this;
},
get : function (units) {
units = normalizeUnits(units);
return this[units.toLowerCase() + 's']();
},
as : function (units) {
units = normalizeUnits(units);
return this['as' + units.charAt(0).toUpperCase() + units.slice(1) + 's']();
},
lang : moment.fn.lang,
toIsoString : function () {
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
var years = Math.abs(this.years()),
months = Math.abs(this.months()),
days = Math.abs(this.days()),
hours = Math.abs(this.hours()),
minutes = Math.abs(this.minutes()),
seconds = Math.abs(this.seconds() + this.milliseconds() / 1000);
if (!this.asSeconds()) {
// this is the same as C#'s (Noda) and python (isodate)...
// but not other JS (goog.date)
return 'P0D';
}
return (this.asSeconds() < 0 ? '-' : '') +
'P' +
(years ? years + 'Y' : '') +
(months ? months + 'M' : '') +
(days ? days + 'D' : '') +
((hours || minutes || seconds) ? 'T' : '') +
(hours ? hours + 'H' : '') +
(minutes ? minutes + 'M' : '') +
(seconds ? seconds + 'S' : '');
}
});
function makeDurationGetter(name) {
moment.duration.fn[name] = function () {
return this._data[name];
};
}
function makeDurationAsGetter(name, factor) {
moment.duration.fn['as' + name] = function () {
return +this / factor;
};
}
for (i in unitMillisecondFactors) {
if (unitMillisecondFactors.hasOwnProperty(i)) {
makeDurationAsGetter(i, unitMillisecondFactors[i]);
makeDurationGetter(i.toLowerCase());
}
}
makeDurationAsGetter('Weeks', 6048e5);
moment.duration.fn.asMonths = function () {
return (+this - this.years() * 31536e6) / 2592e6 + this.years() * 12;
};
/************************************
Default Lang
************************************/
// Set default language, other languages will inherit from English.
moment.lang('en', {
ordinal : function (number) {
var b = number % 10,
output = (toInt(number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
}
});
/* EMBED_LANGUAGES */
/************************************
Exposing Moment
************************************/
function makeGlobal(deprecate) {
var warned = false, local_moment = moment;
/*global ender:false */
if (typeof ender !== 'undefined') {
return;
}
// here, `this` means `window` in the browser, or `global` on the server
// add `moment` as a global object via a string identifier,
// for Closure Compiler "advanced" mode
if (deprecate) {
global.moment = function () {
if (!warned && console && console.warn) {
warned = true;
console.warn(
"Accessing Moment through the global scope is " +
"deprecated, and will be removed in an upcoming " +
"release.");
}
return local_moment.apply(null, arguments);
};
extend(global.moment, local_moment);
} else {
global['moment'] = moment;
}
}
// CommonJS module is defined
if (hasModule) {
module.exports = moment;
makeGlobal(true);
} else if (typeof define === "function" && define.amd) {
define("moment", function (require, exports, module) {
if (module.config && module.config() && module.config().noGlobal !== true) {
// If user provided noGlobal, he is aware of global
makeGlobal(module.config().noGlobal === undefined);
}
return moment;
});
} else {
makeGlobal();
}
}).call(this);
2833213a4972dd5001a95a6b00f347424e24ff9d
299
2013-12-20T09:16:28Z
Amalthea
0
v2.0-673-g489663a: tag: Remove {{orphan}}; Update moment.js to 2.4; Use permalinks for CPAN links; Use https for Wikipedia links; Update jQuery style guideline link; Integrate Draft namespaces; Add page link templates for Draft, TimedText, and Module
javascript
text/javascript
//! moment.js
//! version : 2.4.0
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
(function (undefined) {
/************************************
Constants
************************************/
var moment,
VERSION = "2.4.0",
global = this,
round = Math.round,
i,
YEAR = 0,
MONTH = 1,
DATE = 2,
HOUR = 3,
MINUTE = 4,
SECOND = 5,
MILLISECOND = 6,
// internal storage for language config files
languages = {},
// check for nodeJS
hasModule = (typeof module !== 'undefined' && module.exports && typeof require !== 'undefined'),
// ASP.NET json date format regex
aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,
aspNetTimeSpanJsonRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,
// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
isoDurationRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,
// format tokens
formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,
localFormattingTokens = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,
// parsing token regexes
parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99
parseTokenOneToThreeDigits = /\d{1,3}/, // 0 - 999
parseTokenOneToFourDigits = /\d{1,4}/, // 0 - 9999
parseTokenOneToSixDigits = /[+\-]?\d{1,6}/, // -999,999 - 999,999
parseTokenDigits = /\d+/, // nonzero number of digits
parseTokenWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, // any word (or two) characters or numbers including two/three word month in arabic.
parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
parseTokenT = /T/i, // T (ISO separator)
parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
//strict parsing regexes
parseTokenOneDigit = /\d/, // 0 - 9
parseTokenTwoDigits = /\d\d/, // 00 - 99
parseTokenThreeDigits = /\d{3}/, // 000 - 999
parseTokenFourDigits = /\d{4}/, // 0000 - 9999
parseTokenSixDigits = /[+\-]?\d{6}/, // -999,999 - 999,999
// iso 8601 regex
// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
isoRegex = /^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
isoFormat = 'YYYY-MM-DDTHH:mm:ssZ',
isoDates = [
'YYYY-MM-DD',
'GGGG-[W]WW',
'GGGG-[W]WW-E',
'YYYY-DDD'
],
// iso time formats and regexes
isoTimes = [
['HH:mm:ss.SSSS', /(T| )\d\d:\d\d:\d\d\.\d{1,3}/],
['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/],
['HH:mm', /(T| )\d\d:\d\d/],
['HH', /(T| )\d\d/]
],
// timezone chunker "+10:00" > ["10", "00"] or "-1530" > ["-15", "30"]
parseTimezoneChunker = /([\+\-]|\d\d)/gi,
// getter and setter names
proxyGettersAndSetters = 'Date|Hours|Minutes|Seconds|Milliseconds'.split('|'),
unitMillisecondFactors = {
'Milliseconds' : 1,
'Seconds' : 1e3,
'Minutes' : 6e4,
'Hours' : 36e5,
'Days' : 864e5,
'Months' : 2592e6,
'Years' : 31536e6
},
unitAliases = {
ms : 'millisecond',
s : 'second',
m : 'minute',
h : 'hour',
d : 'day',
D : 'date',
w : 'week',
W : 'isoWeek',
M : 'month',
y : 'year',
DDD : 'dayOfYear',
e : 'weekday',
E : 'isoWeekday',
gg: 'weekYear',
GG: 'isoWeekYear'
},
camelFunctions = {
dayofyear : 'dayOfYear',
isoweekday : 'isoWeekday',
isoweek : 'isoWeek',
weekyear : 'weekYear',
isoweekyear : 'isoWeekYear'
},
// format function strings
formatFunctions = {},
// tokens to ordinalize and pad
ordinalizeTokens = 'DDD w W M D d'.split(' '),
paddedTokens = 'M D H h m s w W'.split(' '),
formatTokenFunctions = {
M : function () {
return this.month() + 1;
},
MMM : function (format) {
return this.lang().monthsShort(this, format);
},
MMMM : function (format) {
return this.lang().months(this, format);
},
D : function () {
return this.date();
},
DDD : function () {
return this.dayOfYear();
},
d : function () {
return this.day();
},
dd : function (format) {
return this.lang().weekdaysMin(this, format);
},
ddd : function (format) {
return this.lang().weekdaysShort(this, format);
},
dddd : function (format) {
return this.lang().weekdays(this, format);
},
w : function () {
return this.week();
},
W : function () {
return this.isoWeek();
},
YY : function () {
return leftZeroFill(this.year() % 100, 2);
},
YYYY : function () {
return leftZeroFill(this.year(), 4);
},
YYYYY : function () {
return leftZeroFill(this.year(), 5);
},
YYYYYY : function () {
var y = this.year(), sign = y >= 0 ? '+' : '-';
return sign + leftZeroFill(Math.abs(y), 6);
},
gg : function () {
return leftZeroFill(this.weekYear() % 100, 2);
},
gggg : function () {
return this.weekYear();
},
ggggg : function () {
return leftZeroFill(this.weekYear(), 5);
},
GG : function () {
return leftZeroFill(this.isoWeekYear() % 100, 2);
},
GGGG : function () {
return this.isoWeekYear();
},
GGGGG : function () {
return leftZeroFill(this.isoWeekYear(), 5);
},
e : function () {
return this.weekday();
},
E : function () {
return this.isoWeekday();
},
a : function () {
return this.lang().meridiem(this.hours(), this.minutes(), true);
},
A : function () {
return this.lang().meridiem(this.hours(), this.minutes(), false);
},
H : function () {
return this.hours();
},
h : function () {
return this.hours() % 12 || 12;
},
m : function () {
return this.minutes();
},
s : function () {
return this.seconds();
},
S : function () {
return toInt(this.milliseconds() / 100);
},
SS : function () {
return leftZeroFill(toInt(this.milliseconds() / 10), 2);
},
SSS : function () {
return leftZeroFill(this.milliseconds(), 3);
},
SSSS : function () {
return leftZeroFill(this.milliseconds(), 3);
},
Z : function () {
var a = -this.zone(),
b = "+";
if (a < 0) {
a = -a;
b = "-";
}
return b + leftZeroFill(toInt(a / 60), 2) + ":" + leftZeroFill(toInt(a) % 60, 2);
},
ZZ : function () {
var a = -this.zone(),
b = "+";
if (a < 0) {
a = -a;
b = "-";
}
return b + leftZeroFill(toInt(a / 60), 2) + leftZeroFill(toInt(a) % 60, 2);
},
z : function () {
return this.zoneAbbr();
},
zz : function () {
return this.zoneName();
},
X : function () {
return this.unix();
},
Q : function () {
return this.quarter();
}
},
lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'];
function padToken(func, count) {
return function (a) {
return leftZeroFill(func.call(this, a), count);
};
}
function ordinalizeToken(func, period) {
return function (a) {
return this.lang().ordinal(func.call(this, a), period);
};
}
while (ordinalizeTokens.length) {
i = ordinalizeTokens.pop();
formatTokenFunctions[i + 'o'] = ordinalizeToken(formatTokenFunctions[i], i);
}
while (paddedTokens.length) {
i = paddedTokens.pop();
formatTokenFunctions[i + i] = padToken(formatTokenFunctions[i], 2);
}
formatTokenFunctions.DDDD = padToken(formatTokenFunctions.DDD, 3);
/************************************
Constructors
************************************/
function Language() {
}
// Moment prototype object
function Moment(config) {
checkOverflow(config);
extend(this, config);
}
// Duration Constructor
function Duration(duration) {
var normalizedInput = normalizeObjectUnits(duration),
years = normalizedInput.year || 0,
months = normalizedInput.month || 0,
weeks = normalizedInput.week || 0,
days = normalizedInput.day || 0,
hours = normalizedInput.hour || 0,
minutes = normalizedInput.minute || 0,
seconds = normalizedInput.second || 0,
milliseconds = normalizedInput.millisecond || 0;
// representation for dateAddRemove
this._milliseconds = +milliseconds +
seconds * 1e3 + // 1000
minutes * 6e4 + // 1000 * 60
hours * 36e5; // 1000 * 60 * 60
// Because of dateAddRemove treats 24 hours as different from a
// day when working around DST, we need to store them separately
this._days = +days +
weeks * 7;
// It is impossible translate months into days without knowing
// which months you are are talking about, so we have to store
// it separately.
this._months = +months +
years * 12;
this._data = {};
this._bubble();
}
/************************************
Helpers
************************************/
function extend(a, b) {
for (var i in b) {
if (b.hasOwnProperty(i)) {
a[i] = b[i];
}
}
if (b.hasOwnProperty("toString")) {
a.toString = b.toString;
}
if (b.hasOwnProperty("valueOf")) {
a.valueOf = b.valueOf;
}
return a;
}
function absRound(number) {
if (number < 0) {
return Math.ceil(number);
} else {
return Math.floor(number);
}
}
// left zero fill a number
// see http://jsperf.com/left-zero-filling for performance comparison
function leftZeroFill(number, targetLength, forceSign) {
var output = Math.abs(number) + '',
sign = number >= 0;
while (output.length < targetLength) {
output = '0' + output;
}
return (sign ? (forceSign ? '+' : '') : '-') + output;
}
// helper function for _.addTime and _.subtractTime
function addOrSubtractDurationFromMoment(mom, duration, isAdding, ignoreUpdateOffset) {
var milliseconds = duration._milliseconds,
days = duration._days,
months = duration._months,
minutes,
hours;
if (milliseconds) {
mom._d.setTime(+mom._d + milliseconds * isAdding);
}
// store the minutes and hours so we can restore them
if (days || months) {
minutes = mom.minute();
hours = mom.hour();
}
if (days) {
mom.date(mom.date() + days * isAdding);
}
if (months) {
mom.month(mom.month() + months * isAdding);
}
if (milliseconds && !ignoreUpdateOffset) {
moment.updateOffset(mom);
}
// restore the minutes and hours after possibly changing dst
if (days || months) {
mom.minute(minutes);
mom.hour(hours);
}
}
// check if is an array
function isArray(input) {
return Object.prototype.toString.call(input) === '[object Array]';
}
function isDate(input) {
return Object.prototype.toString.call(input) === '[object Date]' ||
input instanceof Date;
}
// compare two arrays, return the number of differences
function compareArrays(array1, array2, dontConvert) {
var len = Math.min(array1.length, array2.length),
lengthDiff = Math.abs(array1.length - array2.length),
diffs = 0,
i;
for (i = 0; i < len; i++) {
if ((dontConvert && array1[i] !== array2[i]) ||
(!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
diffs++;
}
}
return diffs + lengthDiff;
}
function normalizeUnits(units) {
if (units) {
var lowered = units.toLowerCase().replace(/(.)s$/, '$1');
units = unitAliases[units] || camelFunctions[lowered] || lowered;
}
return units;
}
function normalizeObjectUnits(inputObject) {
var normalizedInput = {},
normalizedProp,
prop;
for (prop in inputObject) {
if (inputObject.hasOwnProperty(prop)) {
normalizedProp = normalizeUnits(prop);
if (normalizedProp) {
normalizedInput[normalizedProp] = inputObject[prop];
}
}
}
return normalizedInput;
}
function makeList(field) {
var count, setter;
if (field.indexOf('week') === 0) {
count = 7;
setter = 'day';
}
else if (field.indexOf('month') === 0) {
count = 12;
setter = 'month';
}
else {
return;
}
moment[field] = function (format, index) {
var i, getter,
method = moment.fn._lang[field],
results = [];
if (typeof format === 'number') {
index = format;
format = undefined;
}
getter = function (i) {
var m = moment().utc().set(setter, i);
return method.call(moment.fn._lang, m, format || '');
};
if (index != null) {
return getter(index);
}
else {
for (i = 0; i < count; i++) {
results.push(getter(i));
}
return results;
}
};
}
function toInt(argumentForCoercion) {
var coercedNumber = +argumentForCoercion,
value = 0;
if (coercedNumber !== 0 && isFinite(coercedNumber)) {
if (coercedNumber >= 0) {
value = Math.floor(coercedNumber);
} else {
value = Math.ceil(coercedNumber);
}
}
return value;
}
function daysInMonth(year, month) {
return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
}
function daysInYear(year) {
return isLeapYear(year) ? 366 : 365;
}
function isLeapYear(year) {
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
}
function checkOverflow(m) {
var overflow;
if (m._a && m._pf.overflow === -2) {
overflow =
m._a[MONTH] < 0 || m._a[MONTH] > 11 ? MONTH :
m._a[DATE] < 1 || m._a[DATE] > daysInMonth(m._a[YEAR], m._a[MONTH]) ? DATE :
m._a[HOUR] < 0 || m._a[HOUR] > 23 ? HOUR :
m._a[MINUTE] < 0 || m._a[MINUTE] > 59 ? MINUTE :
m._a[SECOND] < 0 || m._a[SECOND] > 59 ? SECOND :
m._a[MILLISECOND] < 0 || m._a[MILLISECOND] > 999 ? MILLISECOND :
-1;
if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
overflow = DATE;
}
m._pf.overflow = overflow;
}
}
function initializeParsingFlags(config) {
config._pf = {
empty : false,
unusedTokens : [],
unusedInput : [],
overflow : -2,
charsLeftOver : 0,
nullInput : false,
invalidMonth : null,
invalidFormat : false,
userInvalidated : false,
iso: false
};
}
function isValid(m) {
if (m._isValid == null) {
m._isValid = !isNaN(m._d.getTime()) &&
m._pf.overflow < 0 &&
!m._pf.empty &&
!m._pf.invalidMonth &&
!m._pf.nullInput &&
!m._pf.invalidFormat &&
!m._pf.userInvalidated;
if (m._strict) {
m._isValid = m._isValid &&
m._pf.charsLeftOver === 0 &&
m._pf.unusedTokens.length === 0;
}
}
return m._isValid;
}
function normalizeLanguage(key) {
return key ? key.toLowerCase().replace('_', '-') : key;
}
/************************************
Languages
************************************/
extend(Language.prototype, {
set : function (config) {
var prop, i;
for (i in config) {
prop = config[i];
if (typeof prop === 'function') {
this[i] = prop;
} else {
this['_' + i] = prop;
}
}
},
_months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
months : function (m) {
return this._months[m.month()];
},
_monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
monthsShort : function (m) {
return this._monthsShort[m.month()];
},
monthsParse : function (monthName) {
var i, mom, regex;
if (!this._monthsParse) {
this._monthsParse = [];
}
for (i = 0; i < 12; i++) {
// make the regex if we don't have it already
if (!this._monthsParse[i]) {
mom = moment.utc([2000, i]);
regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
// test the regex
if (this._monthsParse[i].test(monthName)) {
return i;
}
}
},
_weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
weekdays : function (m) {
return this._weekdays[m.day()];
},
_weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
weekdaysShort : function (m) {
return this._weekdaysShort[m.day()];
},
_weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
weekdaysMin : function (m) {
return this._weekdaysMin[m.day()];
},
weekdaysParse : function (weekdayName) {
var i, mom, regex;
if (!this._weekdaysParse) {
this._weekdaysParse = [];
}
for (i = 0; i < 7; i++) {
// make the regex if we don't have it already
if (!this._weekdaysParse[i]) {
mom = moment([2000, 1]).day(i);
regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
// test the regex
if (this._weekdaysParse[i].test(weekdayName)) {
return i;
}
}
},
_longDateFormat : {
LT : "h:mm A",
L : "MM/DD/YYYY",
LL : "MMMM D YYYY",
LLL : "MMMM D YYYY LT",
LLLL : "dddd, MMMM D YYYY LT"
},
longDateFormat : function (key) {
var output = this._longDateFormat[key];
if (!output && this._longDateFormat[key.toUpperCase()]) {
output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) {
return val.slice(1);
});
this._longDateFormat[key] = output;
}
return output;
},
isPM : function (input) {
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
// Using charAt should be more compatible.
return ((input + '').toLowerCase().charAt(0) === 'p');
},
_meridiemParse : /[ap]\.?m?\.?/i,
meridiem : function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'pm' : 'PM';
} else {
return isLower ? 'am' : 'AM';
}
},
_calendar : {
sameDay : '[Today at] LT',
nextDay : '[Tomorrow at] LT',
nextWeek : 'dddd [at] LT',
lastDay : '[Yesterday at] LT',
lastWeek : '[Last] dddd [at] LT',
sameElse : 'L'
},
calendar : function (key, mom) {
var output = this._calendar[key];
return typeof output === 'function' ? output.apply(mom) : output;
},
_relativeTime : {
future : "in %s",
past : "%s ago",
s : "a few seconds",
m : "a minute",
mm : "%d minutes",
h : "an hour",
hh : "%d hours",
d : "a day",
dd : "%d days",
M : "a month",
MM : "%d months",
y : "a year",
yy : "%d years"
},
relativeTime : function (number, withoutSuffix, string, isFuture) {
var output = this._relativeTime[string];
return (typeof output === 'function') ?
output(number, withoutSuffix, string, isFuture) :
output.replace(/%d/i, number);
},
pastFuture : function (diff, output) {
var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
return typeof format === 'function' ? format(output) : format.replace(/%s/i, output);
},
ordinal : function (number) {
return this._ordinal.replace("%d", number);
},
_ordinal : "%d",
preparse : function (string) {
return string;
},
postformat : function (string) {
return string;
},
week : function (mom) {
return weekOfYear(mom, this._week.dow, this._week.doy).week;
},
_week : {
dow : 0, // Sunday is the first day of the week.
doy : 6 // The week that contains Jan 1st is the first week of the year.
},
_invalidDate: 'Invalid date',
invalidDate: function () {
return this._invalidDate;
}
});
// Loads a language definition into the `languages` cache. The function
// takes a key and optionally values. If not in the browser and no values
// are provided, it will load the language file module. As a convenience,
// this function also returns the language values.
function loadLang(key, values) {
values.abbr = key;
if (!languages[key]) {
languages[key] = new Language();
}
languages[key].set(values);
return languages[key];
}
// Remove a language from the `languages` cache. Mostly useful in tests.
function unloadLang(key) {
delete languages[key];
}
// Determines which language definition to use and returns it.
//
// With no parameters, it will return the global language. If you
// pass in a language key, such as 'en', it will return the
// definition for 'en', so long as 'en' has already been loaded using
// moment.lang.
function getLangDefinition(key) {
var i = 0, j, lang, next, split,
get = function (k) {
if (!languages[k] && hasModule) {
try {
require('./lang/' + k);
} catch (e) { }
}
return languages[k];
};
if (!key) {
return moment.fn._lang;
}
if (!isArray(key)) {
//short-circuit everything else
lang = get(key);
if (lang) {
return lang;
}
key = [key];
}
//pick the language from the array
//try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
//substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
while (i < key.length) {
split = normalizeLanguage(key[i]).split('-');
j = split.length;
next = normalizeLanguage(key[i + 1]);
next = next ? next.split('-') : null;
while (j > 0) {
lang = get(split.slice(0, j).join('-'));
if (lang) {
return lang;
}
if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
//the next array item is better than a shallower substring of this one
break;
}
j--;
}
i++;
}
return moment.fn._lang;
}
/************************************
Formatting
************************************/
function removeFormattingTokens(input) {
if (input.match(/\[[\s\S]/)) {
return input.replace(/^\[|\]$/g, "");
}
return input.replace(/\\/g, "");
}
function makeFormatFunction(format) {
var array = format.match(formattingTokens), i, length;
for (i = 0, length = array.length; i < length; i++) {
if (formatTokenFunctions[array[i]]) {
array[i] = formatTokenFunctions[array[i]];
} else {
array[i] = removeFormattingTokens(array[i]);
}
}
return function (mom) {
var output = "";
for (i = 0; i < length; i++) {
output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
}
return output;
};
}
// format date using native date object
function formatMoment(m, format) {
if (!m.isValid()) {
return m.lang().invalidDate();
}
format = expandFormat(format, m.lang());
if (!formatFunctions[format]) {
formatFunctions[format] = makeFormatFunction(format);
}
return formatFunctions[format](m);
}
function expandFormat(format, lang) {
var i = 5;
function replaceLongDateFormatTokens(input) {
return lang.longDateFormat(input) || input;
}
localFormattingTokens.lastIndex = 0;
while (i >= 0 && localFormattingTokens.test(format)) {
format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
localFormattingTokens.lastIndex = 0;
i -= 1;
}
return format;
}
/************************************
Parsing
************************************/
// get the regex to find the next token
function getParseRegexForToken(token, config) {
var a, strict = config._strict;
switch (token) {
case 'DDDD':
return parseTokenThreeDigits;
case 'YYYY':
case 'GGGG':
case 'gggg':
return strict ? parseTokenFourDigits : parseTokenOneToFourDigits;
case 'YYYYYY':
case 'YYYYY':
case 'GGGGG':
case 'ggggg':
return strict ? parseTokenSixDigits : parseTokenOneToSixDigits;
case 'S':
if (strict) { return parseTokenOneDigit; }
/* falls through */
case 'SS':
if (strict) { return parseTokenTwoDigits; }
/* falls through */
case 'SSS':
case 'DDD':
return strict ? parseTokenThreeDigits : parseTokenOneToThreeDigits;
case 'MMM':
case 'MMMM':
case 'dd':
case 'ddd':
case 'dddd':
return parseTokenWord;
case 'a':
case 'A':
return getLangDefinition(config._l)._meridiemParse;
case 'X':
return parseTokenTimestampMs;
case 'Z':
case 'ZZ':
return parseTokenTimezone;
case 'T':
return parseTokenT;
case 'SSSS':
return parseTokenDigits;
case 'MM':
case 'DD':
case 'YY':
case 'GG':
case 'gg':
case 'HH':
case 'hh':
case 'mm':
case 'ss':
case 'ww':
case 'WW':
return strict ? parseTokenTwoDigits : parseTokenOneOrTwoDigits;
case 'M':
case 'D':
case 'd':
case 'H':
case 'h':
case 'm':
case 's':
case 'w':
case 'W':
case 'e':
case 'E':
return strict ? parseTokenOneDigit : parseTokenOneOrTwoDigits;
default :
a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), "i"));
return a;
}
}
function timezoneMinutesFromString(string) {
string = string || "";
var possibleTzMatches = (string.match(parseTokenTimezone) || []),
tzChunk = possibleTzMatches[possibleTzMatches.length - 1] || [],
parts = (tzChunk + '').match(parseTimezoneChunker) || ['-', 0, 0],
minutes = +(parts[1] * 60) + toInt(parts[2]);
return parts[0] === '+' ? -minutes : minutes;
}
// function to convert string input to date
function addTimeToArrayFromToken(token, input, config) {
var a, datePartArray = config._a;
switch (token) {
// MONTH
case 'M' : // fall through to MM
case 'MM' :
if (input != null) {
datePartArray[MONTH] = toInt(input) - 1;
}
break;
case 'MMM' : // fall through to MMMM
case 'MMMM' :
a = getLangDefinition(config._l).monthsParse(input);
// if we didn't find a month name, mark the date as invalid.
if (a != null) {
datePartArray[MONTH] = a;
} else {
config._pf.invalidMonth = input;
}
break;
// DAY OF MONTH
case 'D' : // fall through to DD
case 'DD' :
if (input != null) {
datePartArray[DATE] = toInt(input);
}
break;
// DAY OF YEAR
case 'DDD' : // fall through to DDDD
case 'DDDD' :
if (input != null) {
config._dayOfYear = toInt(input);
}
break;
// YEAR
case 'YY' :
datePartArray[YEAR] = toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
break;
case 'YYYY' :
case 'YYYYY' :
case 'YYYYYY' :
datePartArray[YEAR] = toInt(input);
break;
// AM / PM
case 'a' : // fall through to A
case 'A' :
config._isPm = getLangDefinition(config._l).isPM(input);
break;
// 24 HOUR
case 'H' : // fall through to hh
case 'HH' : // fall through to hh
case 'h' : // fall through to hh
case 'hh' :
datePartArray[HOUR] = toInt(input);
break;
// MINUTE
case 'm' : // fall through to mm
case 'mm' :
datePartArray[MINUTE] = toInt(input);
break;
// SECOND
case 's' : // fall through to ss
case 'ss' :
datePartArray[SECOND] = toInt(input);
break;
// MILLISECOND
case 'S' :
case 'SS' :
case 'SSS' :
case 'SSSS' :
datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000);
break;
// UNIX TIMESTAMP WITH MS
case 'X':
config._d = new Date(parseFloat(input) * 1000);
break;
// TIMEZONE
case 'Z' : // fall through to ZZ
case 'ZZ' :
config._useUTC = true;
config._tzm = timezoneMinutesFromString(input);
break;
case 'w':
case 'ww':
case 'W':
case 'WW':
case 'd':
case 'dd':
case 'ddd':
case 'dddd':
case 'e':
case 'E':
token = token.substr(0, 1);
/* falls through */
case 'gg':
case 'gggg':
case 'GG':
case 'GGGG':
case 'GGGGG':
token = token.substr(0, 2);
if (input) {
config._w = config._w || {};
config._w[token] = input;
}
break;
}
}
// convert an array to a date.
// the array should mirror the parameters below
// note: all values past the year are optional and will default to the lowest possible value.
// [year, month, day , hour, minute, second, millisecond]
function dateFromConfig(config) {
var i, date, input = [], currentDate,
yearToUse, fixYear, w, temp, lang, weekday, week;
if (config._d) {
return;
}
currentDate = currentDateArray(config);
//compute day of the year from weeks and weekdays
if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
fixYear = function (val) {
var int_val = parseInt(val, 10);
return val ?
(val.length < 3 ? (int_val > 68 ? 1900 + int_val : 2000 + int_val) : int_val) :
(config._a[YEAR] == null ? moment().weekYear() : config._a[YEAR]);
};
w = config._w;
if (w.GG != null || w.W != null || w.E != null) {
temp = dayOfYearFromWeeks(fixYear(w.GG), w.W || 1, w.E, 4, 1);
}
else {
lang = getLangDefinition(config._l);
weekday = w.d != null ? parseWeekday(w.d, lang) :
(w.e != null ? parseInt(w.e, 10) + lang._week.dow : 0);
week = parseInt(w.w, 10) || 1;
//if we're parsing 'd', then the low day numbers may be next week
if (w.d != null && weekday < lang._week.dow) {
week++;
}
temp = dayOfYearFromWeeks(fixYear(w.gg), week, weekday, lang._week.doy, lang._week.dow);
}
config._a[YEAR] = temp.year;
config._dayOfYear = temp.dayOfYear;
}
//if the day of the year is set, figure out what it is
if (config._dayOfYear) {
yearToUse = config._a[YEAR] == null ? currentDate[YEAR] : config._a[YEAR];
if (config._dayOfYear > daysInYear(yearToUse)) {
config._pf._overflowDayOfYear = true;
}
date = makeUTCDate(yearToUse, 0, config._dayOfYear);
config._a[MONTH] = date.getUTCMonth();
config._a[DATE] = date.getUTCDate();
}
// Default to current date.
// * if no year, month, day of month are given, default to today
// * if day of month is given, default month and year
// * if month is given, default only year
// * if year is given, don't default anything
for (i = 0; i < 3 && config._a[i] == null; ++i) {
config._a[i] = input[i] = currentDate[i];
}
// Zero out whatever was not defaulted, including time
for (; i < 7; i++) {
config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
}
// add the offsets to the time to be parsed so that we can have a clean array for checking isValid
input[HOUR] += toInt((config._tzm || 0) / 60);
input[MINUTE] += toInt((config._tzm || 0) % 60);
config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input);
}
function dateFromObject(config) {
var normalizedInput;
if (config._d) {
return;
}
normalizedInput = normalizeObjectUnits(config._i);
config._a = [
normalizedInput.year,
normalizedInput.month,
normalizedInput.day,
normalizedInput.hour,
normalizedInput.minute,
normalizedInput.second,
normalizedInput.millisecond
];
dateFromConfig(config);
}
function currentDateArray(config) {
var now = new Date();
if (config._useUTC) {
return [
now.getUTCFullYear(),
now.getUTCMonth(),
now.getUTCDate()
];
} else {
return [now.getFullYear(), now.getMonth(), now.getDate()];
}
}
// date from string and format string
function makeDateFromStringAndFormat(config) {
config._a = [];
config._pf.empty = true;
// This array is used to make a Date, either with `new Date` or `Date.UTC`
var lang = getLangDefinition(config._l),
string = '' + config._i,
i, parsedInput, tokens, token, skipped,
stringLength = string.length,
totalParsedInputLength = 0;
tokens = expandFormat(config._f, lang).match(formattingTokens) || [];
for (i = 0; i < tokens.length; i++) {
token = tokens[i];
parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
if (parsedInput) {
skipped = string.substr(0, string.indexOf(parsedInput));
if (skipped.length > 0) {
config._pf.unusedInput.push(skipped);
}
string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
totalParsedInputLength += parsedInput.length;
}
// don't parse if it's not a known token
if (formatTokenFunctions[token]) {
if (parsedInput) {
config._pf.empty = false;
}
else {
config._pf.unusedTokens.push(token);
}
addTimeToArrayFromToken(token, parsedInput, config);
}
else if (config._strict && !parsedInput) {
config._pf.unusedTokens.push(token);
}
}
// add remaining unparsed input length to the string
config._pf.charsLeftOver = stringLength - totalParsedInputLength;
if (string.length > 0) {
config._pf.unusedInput.push(string);
}
// handle am pm
if (config._isPm && config._a[HOUR] < 12) {
config._a[HOUR] += 12;
}
// if is 12 am, change hours to 0
if (config._isPm === false && config._a[HOUR] === 12) {
config._a[HOUR] = 0;
}
dateFromConfig(config);
checkOverflow(config);
}
function unescapeFormat(s) {
return s.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
return p1 || p2 || p3 || p4;
});
}
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
function regexpEscape(s) {
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
}
// date from string and array of format strings
function makeDateFromStringAndArray(config) {
var tempConfig,
bestMoment,
scoreToBeat,
i,
currentScore;
if (config._f.length === 0) {
config._pf.invalidFormat = true;
config._d = new Date(NaN);
return;
}
for (i = 0; i < config._f.length; i++) {
currentScore = 0;
tempConfig = extend({}, config);
initializeParsingFlags(tempConfig);
tempConfig._f = config._f[i];
makeDateFromStringAndFormat(tempConfig);
if (!isValid(tempConfig)) {
continue;
}
// if there is any input that was not parsed add a penalty for that format
currentScore += tempConfig._pf.charsLeftOver;
//or tokens
currentScore += tempConfig._pf.unusedTokens.length * 10;
tempConfig._pf.score = currentScore;
if (scoreToBeat == null || currentScore < scoreToBeat) {
scoreToBeat = currentScore;
bestMoment = tempConfig;
}
}
extend(config, bestMoment || tempConfig);
}
// date from iso format
function makeDateFromString(config) {
var i,
string = config._i,
match = isoRegex.exec(string);
if (match) {
config._pf.iso = true;
for (i = 4; i > 0; i--) {
if (match[i]) {
// match[5] should be "T" or undefined
config._f = isoDates[i - 1] + (match[6] || " ");
break;
}
}
for (i = 0; i < 4; i++) {
if (isoTimes[i][1].exec(string)) {
config._f += isoTimes[i][0];
break;
}
}
if (string.match(parseTokenTimezone)) {
config._f += "Z";
}
makeDateFromStringAndFormat(config);
}
else {
config._d = new Date(string);
}
}
function makeDateFromInput(config) {
var input = config._i,
matched = aspNetJsonRegex.exec(input);
if (input === undefined) {
config._d = new Date();
} else if (matched) {
config._d = new Date(+matched[1]);
} else if (typeof input === 'string') {
makeDateFromString(config);
} else if (isArray(input)) {
config._a = input.slice(0);
dateFromConfig(config);
} else if (isDate(input)) {
config._d = new Date(+input);
} else if (typeof(input) === 'object') {
dateFromObject(config);
} else {
config._d = new Date(input);
}
}
function makeDate(y, m, d, h, M, s, ms) {
//can't just apply() to create a date:
//http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
var date = new Date(y, m, d, h, M, s, ms);
//the date constructor doesn't accept years < 1970
if (y < 1970) {
date.setFullYear(y);
}
return date;
}
function makeUTCDate(y) {
var date = new Date(Date.UTC.apply(null, arguments));
if (y < 1970) {
date.setUTCFullYear(y);
}
return date;
}
function parseWeekday(input, language) {
if (typeof input === 'string') {
if (!isNaN(input)) {
input = parseInt(input, 10);
}
else {
input = language.weekdaysParse(input);
if (typeof input !== 'number') {
return null;
}
}
}
return input;
}
/************************************
Relative Time
************************************/
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
function substituteTimeAgo(string, number, withoutSuffix, isFuture, lang) {
return lang.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
}
function relativeTime(milliseconds, withoutSuffix, lang) {
var seconds = round(Math.abs(milliseconds) / 1000),
minutes = round(seconds / 60),
hours = round(minutes / 60),
days = round(hours / 24),
years = round(days / 365),
args = seconds < 45 && ['s', seconds] ||
minutes === 1 && ['m'] ||
minutes < 45 && ['mm', minutes] ||
hours === 1 && ['h'] ||
hours < 22 && ['hh', hours] ||
days === 1 && ['d'] ||
days <= 25 && ['dd', days] ||
days <= 45 && ['M'] ||
days < 345 && ['MM', round(days / 30)] ||
years === 1 && ['y'] || ['yy', years];
args[2] = withoutSuffix;
args[3] = milliseconds > 0;
args[4] = lang;
return substituteTimeAgo.apply({}, args);
}
/************************************
Week of Year
************************************/
// firstDayOfWeek 0 = sun, 6 = sat
// the day of the week that starts the week
// (usually sunday or monday)
// firstDayOfWeekOfYear 0 = sun, 6 = sat
// the first week is the week that contains the first
// of this day of the week
// (eg. ISO weeks use thursday (4))
function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) {
var end = firstDayOfWeekOfYear - firstDayOfWeek,
daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(),
adjustedMoment;
if (daysToDayOfWeek > end) {
daysToDayOfWeek -= 7;
}
if (daysToDayOfWeek < end - 7) {
daysToDayOfWeek += 7;
}
adjustedMoment = moment(mom).add('d', daysToDayOfWeek);
return {
week: Math.ceil(adjustedMoment.dayOfYear() / 7),
year: adjustedMoment.year()
};
}
//http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {
// The only solid way to create an iso date from year is to use
// a string format (Date.UTC handles only years > 1900). Don't ask why
// it doesn't need Z at the end.
var d = new Date(leftZeroFill(year, 6, true) + '-01-01').getUTCDay(),
daysToAdd, dayOfYear;
weekday = weekday != null ? weekday : firstDayOfWeek;
daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0);
dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1;
return {
year: dayOfYear > 0 ? year : year - 1,
dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear
};
}
/************************************
Top Level Functions
************************************/
function makeMoment(config) {
var input = config._i,
format = config._f;
if (typeof config._pf === 'undefined') {
initializeParsingFlags(config);
}
if (input === null) {
return moment.invalid({nullInput: true});
}
if (typeof input === 'string') {
config._i = input = getLangDefinition().preparse(input);
}
if (moment.isMoment(input)) {
config = extend({}, input);
config._d = new Date(+input._d);
} else if (format) {
if (isArray(format)) {
makeDateFromStringAndArray(config);
} else {
makeDateFromStringAndFormat(config);
}
} else {
makeDateFromInput(config);
}
return new Moment(config);
}
moment = function (input, format, lang, strict) {
if (typeof(lang) === "boolean") {
strict = lang;
lang = undefined;
}
return makeMoment({
_i : input,
_f : format,
_l : lang,
_strict : strict,
_isUTC : false
});
};
// creating with utc
moment.utc = function (input, format, lang, strict) {
var m;
if (typeof(lang) === "boolean") {
strict = lang;
lang = undefined;
}
m = makeMoment({
_useUTC : true,
_isUTC : true,
_l : lang,
_i : input,
_f : format,
_strict : strict
}).utc();
return m;
};
// creating with unix timestamp (in seconds)
moment.unix = function (input) {
return moment(input * 1000);
};
// duration
moment.duration = function (input, key) {
var duration = input,
// matching against regexp is expensive, do it on demand
match = null,
sign,
ret,
parseIso;
if (moment.isDuration(input)) {
duration = {
ms: input._milliseconds,
d: input._days,
M: input._months
};
} else if (typeof input === 'number') {
duration = {};
if (key) {
duration[key] = input;
} else {
duration.milliseconds = input;
}
} else if (!!(match = aspNetTimeSpanJsonRegex.exec(input))) {
sign = (match[1] === "-") ? -1 : 1;
duration = {
y: 0,
d: toInt(match[DATE]) * sign,
h: toInt(match[HOUR]) * sign,
m: toInt(match[MINUTE]) * sign,
s: toInt(match[SECOND]) * sign,
ms: toInt(match[MILLISECOND]) * sign
};
} else if (!!(match = isoDurationRegex.exec(input))) {
sign = (match[1] === "-") ? -1 : 1;
parseIso = function (inp) {
// We'd normally use ~~inp for this, but unfortunately it also
// converts floats to ints.
// inp may be undefined, so careful calling replace on it.
var res = inp && parseFloat(inp.replace(',', '.'));
// apply sign while we're at it
return (isNaN(res) ? 0 : res) * sign;
};
duration = {
y: parseIso(match[2]),
M: parseIso(match[3]),
d: parseIso(match[4]),
h: parseIso(match[5]),
m: parseIso(match[6]),
s: parseIso(match[7]),
w: parseIso(match[8])
};
}
ret = new Duration(duration);
if (moment.isDuration(input) && input.hasOwnProperty('_lang')) {
ret._lang = input._lang;
}
return ret;
};
// version number
moment.version = VERSION;
// default format
moment.defaultFormat = isoFormat;
// This function will be called whenever a moment is mutated.
// It is intended to keep the offset in sync with the timezone.
moment.updateOffset = function () {};
// This function will load languages and then set the global language. If
// no arguments are passed in, it will simply return the current global
// language key.
moment.lang = function (key, values) {
var r;
if (!key) {
return moment.fn._lang._abbr;
}
if (values) {
loadLang(normalizeLanguage(key), values);
} else if (values === null) {
unloadLang(key);
key = 'en';
} else if (!languages[key]) {
getLangDefinition(key);
}
r = moment.duration.fn._lang = moment.fn._lang = getLangDefinition(key);
return r._abbr;
};
// returns language data
moment.langData = function (key) {
if (key && key._lang && key._lang._abbr) {
key = key._lang._abbr;
}
return getLangDefinition(key);
};
// compare moment object
moment.isMoment = function (obj) {
return obj instanceof Moment;
};
// for typechecking Duration objects
moment.isDuration = function (obj) {
return obj instanceof Duration;
};
for (i = lists.length - 1; i >= 0; --i) {
makeList(lists[i]);
}
moment.normalizeUnits = function (units) {
return normalizeUnits(units);
};
moment.invalid = function (flags) {
var m = moment.utc(NaN);
if (flags != null) {
extend(m._pf, flags);
}
else {
m._pf.userInvalidated = true;
}
return m;
};
moment.parseZone = function (input) {
return moment(input).parseZone();
};
/************************************
Moment Prototype
************************************/
extend(moment.fn = Moment.prototype, {
clone : function () {
return moment(this);
},
valueOf : function () {
return +this._d + ((this._offset || 0) * 60000);
},
unix : function () {
return Math.floor(+this / 1000);
},
toString : function () {
return this.clone().lang('en').format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
},
toDate : function () {
return this._offset ? new Date(+this) : this._d;
},
toISOString : function () {
var m = moment(this).utc();
if (0 < m.year() && m.year() <= 9999) {
return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
} else {
return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
}
},
toArray : function () {
var m = this;
return [
m.year(),
m.month(),
m.date(),
m.hours(),
m.minutes(),
m.seconds(),
m.milliseconds()
];
},
isValid : function () {
return isValid(this);
},
isDSTShifted : function () {
if (this._a) {
return this.isValid() && compareArrays(this._a, (this._isUTC ? moment.utc(this._a) : moment(this._a)).toArray()) > 0;
}
return false;
},
parsingFlags : function () {
return extend({}, this._pf);
},
invalidAt: function () {
return this._pf.overflow;
},
utc : function () {
return this.zone(0);
},
local : function () {
this.zone(0);
this._isUTC = false;
return this;
},
format : function (inputString) {
var output = formatMoment(this, inputString || moment.defaultFormat);
return this.lang().postformat(output);
},
add : function (input, val) {
var dur;
// switch args to support add('s', 1) and add(1, 's')
if (typeof input === 'string') {
dur = moment.duration(+val, input);
} else {
dur = moment.duration(input, val);
}
addOrSubtractDurationFromMoment(this, dur, 1);
return this;
},
subtract : function (input, val) {
var dur;
// switch args to support subtract('s', 1) and subtract(1, 's')
if (typeof input === 'string') {
dur = moment.duration(+val, input);
} else {
dur = moment.duration(input, val);
}
addOrSubtractDurationFromMoment(this, dur, -1);
return this;
},
diff : function (input, units, asFloat) {
var that = moment(input),
zoneDiff = (this.zone() - that.zone()) * 6e4,
diff, output;
units = normalizeUnits(units);
if (units === 'year' || units === 'month') {
// average number of days in the months in the given dates
diff = (this.daysInMonth() + that.daysInMonth()) * 432e5; // 24 * 60 * 60 * 1000 / 2
// difference in months
output = ((this.year() - that.year()) * 12) + (this.month() - that.month());
// adjust by taking difference in days, average number of days
// and dst in the given months.
output += ((this - moment(this).startOf('month')) -
(that - moment(that).startOf('month'))) / diff;
// same as above but with zones, to negate all dst
output -= ((this.zone() - moment(this).startOf('month').zone()) -
(that.zone() - moment(that).startOf('month').zone())) * 6e4 / diff;
if (units === 'year') {
output = output / 12;
}
} else {
diff = (this - that);
output = units === 'second' ? diff / 1e3 : // 1000
units === 'minute' ? diff / 6e4 : // 1000 * 60
units === 'hour' ? diff / 36e5 : // 1000 * 60 * 60
units === 'day' ? (diff - zoneDiff) / 864e5 : // 1000 * 60 * 60 * 24, negate dst
units === 'week' ? (diff - zoneDiff) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst
diff;
}
return asFloat ? output : absRound(output);
},
from : function (time, withoutSuffix) {
return moment.duration(this.diff(time)).lang(this.lang()._abbr).humanize(!withoutSuffix);
},
fromNow : function (withoutSuffix) {
return this.from(moment(), withoutSuffix);
},
calendar : function () {
var diff = this.diff(moment().zone(this.zone()).startOf('day'), 'days', true),
format = diff < -6 ? 'sameElse' :
diff < -1 ? 'lastWeek' :
diff < 0 ? 'lastDay' :
diff < 1 ? 'sameDay' :
diff < 2 ? 'nextDay' :
diff < 7 ? 'nextWeek' : 'sameElse';
return this.format(this.lang().calendar(format, this));
},
isLeapYear : function () {
return isLeapYear(this.year());
},
isDST : function () {
return (this.zone() < this.clone().month(0).zone() ||
this.zone() < this.clone().month(5).zone());
},
day : function (input) {
var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
if (input != null) {
input = parseWeekday(input, this.lang());
return this.add({ d : input - day });
} else {
return day;
}
},
month : function (input) {
var utc = this._isUTC ? 'UTC' : '',
dayOfMonth;
if (input != null) {
if (typeof input === 'string') {
input = this.lang().monthsParse(input);
if (typeof input !== 'number') {
return this;
}
}
dayOfMonth = this.date();
this.date(1);
this._d['set' + utc + 'Month'](input);
this.date(Math.min(dayOfMonth, this.daysInMonth()));
moment.updateOffset(this);
return this;
} else {
return this._d['get' + utc + 'Month']();
}
},
startOf: function (units) {
units = normalizeUnits(units);
// the following switch intentionally omits break keywords
// to utilize falling through the cases.
switch (units) {
case 'year':
this.month(0);
/* falls through */
case 'month':
this.date(1);
/* falls through */
case 'week':
case 'isoWeek':
case 'day':
this.hours(0);
/* falls through */
case 'hour':
this.minutes(0);
/* falls through */
case 'minute':
this.seconds(0);
/* falls through */
case 'second':
this.milliseconds(0);
/* falls through */
}
// weeks are a special case
if (units === 'week') {
this.weekday(0);
} else if (units === 'isoWeek') {
this.isoWeekday(1);
}
return this;
},
endOf: function (units) {
units = normalizeUnits(units);
return this.startOf(units).add((units === 'isoWeek' ? 'week' : units), 1).subtract('ms', 1);
},
isAfter: function (input, units) {
units = typeof units !== 'undefined' ? units : 'millisecond';
return +this.clone().startOf(units) > +moment(input).startOf(units);
},
isBefore: function (input, units) {
units = typeof units !== 'undefined' ? units : 'millisecond';
return +this.clone().startOf(units) < +moment(input).startOf(units);
},
isSame: function (input, units) {
units = typeof units !== 'undefined' ? units : 'millisecond';
return +this.clone().startOf(units) === +moment(input).startOf(units);
},
min: function (other) {
other = moment.apply(null, arguments);
return other < this ? this : other;
},
max: function (other) {
other = moment.apply(null, arguments);
return other > this ? this : other;
},
zone : function (input) {
var offset = this._offset || 0;
if (input != null) {
if (typeof input === "string") {
input = timezoneMinutesFromString(input);
}
if (Math.abs(input) < 16) {
input = input * 60;
}
this._offset = input;
this._isUTC = true;
if (offset !== input) {
addOrSubtractDurationFromMoment(this, moment.duration(offset - input, 'm'), 1, true);
}
} else {
return this._isUTC ? offset : this._d.getTimezoneOffset();
}
return this;
},
zoneAbbr : function () {
return this._isUTC ? "UTC" : "";
},
zoneName : function () {
return this._isUTC ? "Coordinated Universal Time" : "";
},
parseZone : function () {
if (this._tzm) {
this.zone(this._tzm);
} else if (typeof this._i === 'string') {
this.zone(this._i);
}
return this;
},
hasAlignedHourOffset : function (input) {
if (!input) {
input = 0;
}
else {
input = moment(input).zone();
}
return (this.zone() - input) % 60 === 0;
},
daysInMonth : function () {
return daysInMonth(this.year(), this.month());
},
dayOfYear : function (input) {
var dayOfYear = round((moment(this).startOf('day') - moment(this).startOf('year')) / 864e5) + 1;
return input == null ? dayOfYear : this.add("d", (input - dayOfYear));
},
quarter : function () {
return Math.ceil((this.month() + 1.0) / 3.0);
},
weekYear : function (input) {
var year = weekOfYear(this, this.lang()._week.dow, this.lang()._week.doy).year;
return input == null ? year : this.add("y", (input - year));
},
isoWeekYear : function (input) {
var year = weekOfYear(this, 1, 4).year;
return input == null ? year : this.add("y", (input - year));
},
week : function (input) {
var week = this.lang().week(this);
return input == null ? week : this.add("d", (input - week) * 7);
},
isoWeek : function (input) {
var week = weekOfYear(this, 1, 4).week;
return input == null ? week : this.add("d", (input - week) * 7);
},
weekday : function (input) {
var weekday = (this.day() + 7 - this.lang()._week.dow) % 7;
return input == null ? weekday : this.add("d", input - weekday);
},
isoWeekday : function (input) {
// behaves the same as moment#day except
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
// as a setter, sunday should belong to the previous week.
return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7);
},
get : function (units) {
units = normalizeUnits(units);
return this[units]();
},
set : function (units, value) {
units = normalizeUnits(units);
if (typeof this[units] === 'function') {
this[units](value);
}
return this;
},
// If passed a language key, it will set the language for this
// instance. Otherwise, it will return the language configuration
// variables for this instance.
lang : function (key) {
if (key === undefined) {
return this._lang;
} else {
this._lang = getLangDefinition(key);
return this;
}
}
});
// helper for adding shortcuts
function makeGetterAndSetter(name, key) {
moment.fn[name] = moment.fn[name + 's'] = function (input) {
var utc = this._isUTC ? 'UTC' : '';
if (input != null) {
this._d['set' + utc + key](input);
moment.updateOffset(this);
return this;
} else {
return this._d['get' + utc + key]();
}
};
}
// loop through and add shortcuts (Month, Date, Hours, Minutes, Seconds, Milliseconds)
for (i = 0; i < proxyGettersAndSetters.length; i ++) {
makeGetterAndSetter(proxyGettersAndSetters[i].toLowerCase().replace(/s$/, ''), proxyGettersAndSetters[i]);
}
// add shortcut for year (uses different syntax than the getter/setter 'year' == 'FullYear')
makeGetterAndSetter('year', 'FullYear');
// add plural methods
moment.fn.days = moment.fn.day;
moment.fn.months = moment.fn.month;
moment.fn.weeks = moment.fn.week;
moment.fn.isoWeeks = moment.fn.isoWeek;
// add aliased format methods
moment.fn.toJSON = moment.fn.toISOString;
/************************************
Duration Prototype
************************************/
extend(moment.duration.fn = Duration.prototype, {
_bubble : function () {
var milliseconds = this._milliseconds,
days = this._days,
months = this._months,
data = this._data,
seconds, minutes, hours, years;
// The following code bubbles up values, see the tests for
// examples of what that means.
data.milliseconds = milliseconds % 1000;
seconds = absRound(milliseconds / 1000);
data.seconds = seconds % 60;
minutes = absRound(seconds / 60);
data.minutes = minutes % 60;
hours = absRound(minutes / 60);
data.hours = hours % 24;
days += absRound(hours / 24);
data.days = days % 30;
months += absRound(days / 30);
data.months = months % 12;
years = absRound(months / 12);
data.years = years;
},
weeks : function () {
return absRound(this.days() / 7);
},
valueOf : function () {
return this._milliseconds +
this._days * 864e5 +
(this._months % 12) * 2592e6 +
toInt(this._months / 12) * 31536e6;
},
humanize : function (withSuffix) {
var difference = +this,
output = relativeTime(difference, !withSuffix, this.lang());
if (withSuffix) {
output = this.lang().pastFuture(difference, output);
}
return this.lang().postformat(output);
},
add : function (input, val) {
// supports only 2.0-style add(1, 's') or add(moment)
var dur = moment.duration(input, val);
this._milliseconds += dur._milliseconds;
this._days += dur._days;
this._months += dur._months;
this._bubble();
return this;
},
subtract : function (input, val) {
var dur = moment.duration(input, val);
this._milliseconds -= dur._milliseconds;
this._days -= dur._days;
this._months -= dur._months;
this._bubble();
return this;
},
get : function (units) {
units = normalizeUnits(units);
return this[units.toLowerCase() + 's']();
},
as : function (units) {
units = normalizeUnits(units);
return this['as' + units.charAt(0).toUpperCase() + units.slice(1) + 's']();
},
lang : moment.fn.lang,
toIsoString : function () {
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
var years = Math.abs(this.years()),
months = Math.abs(this.months()),
days = Math.abs(this.days()),
hours = Math.abs(this.hours()),
minutes = Math.abs(this.minutes()),
seconds = Math.abs(this.seconds() + this.milliseconds() / 1000);
if (!this.asSeconds()) {
// this is the same as C#'s (Noda) and python (isodate)...
// but not other JS (goog.date)
return 'P0D';
}
return (this.asSeconds() < 0 ? '-' : '') +
'P' +
(years ? years + 'Y' : '') +
(months ? months + 'M' : '') +
(days ? days + 'D' : '') +
((hours || minutes || seconds) ? 'T' : '') +
(hours ? hours + 'H' : '') +
(minutes ? minutes + 'M' : '') +
(seconds ? seconds + 'S' : '');
}
});
function makeDurationGetter(name) {
moment.duration.fn[name] = function () {
return this._data[name];
};
}
function makeDurationAsGetter(name, factor) {
moment.duration.fn['as' + name] = function () {
return +this / factor;
};
}
for (i in unitMillisecondFactors) {
if (unitMillisecondFactors.hasOwnProperty(i)) {
makeDurationAsGetter(i, unitMillisecondFactors[i]);
makeDurationGetter(i.toLowerCase());
}
}
makeDurationAsGetter('Weeks', 6048e5);
moment.duration.fn.asMonths = function () {
return (+this - this.years() * 31536e6) / 2592e6 + this.years() * 12;
};
/************************************
Default Lang
************************************/
// Set default language, other languages will inherit from English.
moment.lang('en', {
ordinal : function (number) {
var b = number % 10,
output = (toInt(number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
}
});
/* EMBED_LANGUAGES */
/************************************
Exposing Moment
************************************/
function makeGlobal(deprecate) {
var warned = false, local_moment = moment;
/*global ender:false */
if (typeof ender !== 'undefined') {
return;
}
// here, `this` means `window` in the browser, or `global` on the server
// add `moment` as a global object via a string identifier,
// for Closure Compiler "advanced" mode
if (deprecate) {
global.moment = function () {
if (!warned && console && console.warn) {
warned = true;
console.warn(
"Accessing Moment through the global scope is " +
"deprecated, and will be removed in an upcoming " +
"release.");
}
return local_moment.apply(null, arguments);
};
extend(global.moment, local_moment);
} else {
global['moment'] = moment;
}
}
// CommonJS module is defined
if (hasModule) {
module.exports = moment;
makeGlobal(true);
} else if (typeof define === "function" && define.amd) {
define("moment", function (require, exports, module) {
if (module.config && module.config() && module.config().noGlobal !== true) {
// If user provided noGlobal, he is aware of global
makeGlobal(module.config().noGlobal === undefined);
}
return moment;
});
} else {
makeGlobal();
}
}).call(this);
2833213a4972dd5001a95a6b00f347424e24ff9d
MediaWiki:Gadget-morebits.css
8
138
346
345
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
css
text/css
/**
* morebits.css
* ===========
* Styles to support morebits.js.
*
* The morebits library is maintained by the maintainers of Twinkle.
* For queries, suggestions, help, etc., head to [[WT:TW]].
* The latest development source is available at [https://github.com/azatoth/twinkle/blob/master/morebits.css].
*/
/* Morebits.status */
.tw_status_status {
color: #4682B4;
}
.tw_status_info {
color: #228B22;
}
.tw_status_warn {
color: #FF4500;
}
.tw_status_error {
color: #FF4500;
font-weight: bold;
}
/* Morebits.quickForm */
form.quickform
{
width: 96%;
vertical-align: middle;
margin: auto;
padding: .5em;
}
form.quickform *
{
font-family: sans-serif;
vertical-align: middle;
}
form.quickform fieldset
{
margin: .4em 0 1em;
}
form.quickform legend
{
color: #31628F;
font-weight: bold;
}
form.quickform input[type=text], form.quickform select
{
min-width: 15em;
font-size: 110%;
}
form.quickform select
{
border: 1px solid gray;
margin-left: .2em;
}
form.quickform h5
{
margin: .5em 0 0;
padding: .3em .2em .2em;
}
/* only give the top border to headers with something above them */
form.quickform div + h5, form.quickform div + div > h5, form.quickform h5 + h5
{
border-top: 1px solid #88A;
}
form.quickform textarea
{
width: 100%;
height: 4em;
font-size: 150%;
}
form.quickform input:disabled + label
{
color: gray;
}
form.quickform span.quickformDescription
{
font-style: italic;
}
form.quickform .quickformSubgroup
{
margin-bottom: .5em;
margin-left: 3em;
}
form.quickform .tooltipButtonContainer
{
position: relative;
width: 100%;
}
form.quickform .tooltipButton
{
color: blue;
font-weight: bold;
cursor: help;
padding: .2em;
}
/* Scrollbox styles, for use within Morebits.quickForm */
div.quickform-scrollbox
{
background: white;
border: 1px solid gray;
margin-bottom: .6em;
margin-top: .6em;
max-height: 20em;
overflow: auto;
padding: 6px 6px 0;
}
div.quickform-scrollbox h5:first-child
{
border: none;
margin-top: 0;
padding-top: 0;
}
div.quickform-scrollbox :last-child
{
margin-bottom: 6px;
}
/* Previewbox */
div.morebits-previewbox
{
background: white;
color: black;
border: 2px inset;
margin: .4em auto .2em;
padding: .2em .4em;
}
div.morebits-previewbox *:not(img)
{
vertical-align: baseline;
}
div.morebits-previewbox .mw-editsection
{
display: none;
}
/* Portlet */
.skin-vector div div.extraMenu h3 span {
background-position: 90% 50%;
}
.skin-vector div.extraMenu h3 a {
padding-left: .4em;
padding-right: .4em;
width: auto;
font-size: 0.78em;
padding-bottom: 0.5em;
}
.skin-vector div.extraMenu h3 a span {
display: inline-block;
font-size: .8em;
height: 2.5em;
font-weight: normal;
padding-top: 1.25em;
margin-right: 14px;
}
.skin-modern #mw_contentwrapper div.portlet {
overflow: hidden;
height: 1.5em;
margin: 0 0 0 14em;
padding: 0;
}
.skin-modern #mw_contentwrapper div.portlet h5 {
display: none;
}
.skin-modern #mw_contentwrapper div.portlet div.pbody {
margin: 0;
padding: 0;
}
.skin-modern #mw_contentwrapper div.portlet div.pbody ul {
display: inline;
margin: 0;
}
.skin-modern #mw_contentwrapper div.portlet div.pbody ul li {
display: block;
float: left;
height: 1.5em;
margin: 0 .5em;
padding: 0 .2em;
text-transform: lowercase;
}
.skin-modern #mw_contentwrapper div.portlet div.pbody ul li a {
text-decoration: underline;
}
.skin-modern #mw_contentwrapper div.portlet div.pbody ul li.selected a {
text-decoration: none;
}
/* Morebits.simpleWindow */
.morebits-dialog {
border: 1px #666 solid;
font: small sans-serif;
background-color: #F0F8FF !important;
background-image: none !important;
}
body.skin-monobook .morebits-dialog {
font-size: 125%;
}
body .ui-dialog.morebits-dialog .ui-dialog-titlebar {
height: 1em;
background: repeat-x 50% 80% #cfd6e1 !important; /* the actual image is specified in morebits.js - ResourceLoader mangles data: URIs in CSS */
font: bold 1em sans-serif;
padding: .4em .3em .5em !important;
}
body.skin-monobook .morebits-dialog .ui-dialog-titlebar {
line-height: 1em;
}
.morebits-dialog-scriptname {
font-weight: normal;
}
.ui-dialog.morebits-dialog .ui-dialog-titlebar-close {
height: 100%;
right: 0;
top: auto;
width: 2em;
margin: -.5em -.15em 0;
}
.ui-dialog.morebits-dialog .ui-dialog-titlebar-close span {
margin: .33em;
}
.ui-dialog.morebits-dialog .morebits-dialog-content {
font-size: 88%; /* this just seems to be traditional - I don't quite see the point, in this day and age of huge monitors, etc. */
padding: 0;
}
body .ui-dialog.morebits-dialog .ui-dialog-buttonpane {
background-color: #BCCADF;
margin: 0;
min-height: .5em;
padding-left: 1.2em !important;
}
body .ui-dialog.morebits-dialog .ui-dialog-buttonpane button {
float: none;
margin: .2em 0 -.1em;
padding-top: 0;
padding-bottom: 0;
cursor: auto;
}
.morebits-dialog-footerlinks {
font-size: 90%;
float: right;
margin: .7em .4em 0 0;
}
body .ui-dialog.morebits-dialog .morebits-dialog-footerlinks a {
color: #3062AD;
}
.morebits-dialog-buttons[data-empty] + .morebits-dialog-footerlinks {
margin: .1em .4em -.2em 0;
}
.ui-dialog.morebits-dialog a, .ui-dialog.morebits-dialog .ui-widget-content a {
color: #0645AD; /* jQuery imposes a ridiculous nearly-black colour on <a> tags... I don't understand it */
}
.ui-icon-inline {
display: inline-block;
}
7e13805d85a0e50ae5104c1eb8fada3bef853cf4
345
2013-11-15T17:33:37Z
Amalthea
0
v2.0-641-g8668628: morebits: Stop tooltips colliding with the field; arv: No more double full stops on AIV reports; morebits.css: limit titlebar line-height in Monobook; image: increase window height; warn: add {{[[Template:uw-redlink|uw-redlink]]}}
css
text/css
/**
* morebits.css
* ===========
* Styles to support morebits.js.
*
* The morebits library is maintained by the maintainers of Twinkle.
* For queries, suggestions, help, etc., head to [[WT:TW]].
* The latest development source is available at [https://github.com/azatoth/twinkle/blob/master/morebits.css].
*/
/* Morebits.status */
.tw_status_status {
color: #4682B4;
}
.tw_status_info {
color: #228B22;
}
.tw_status_warn {
color: #FF4500;
}
.tw_status_error {
color: #FF4500;
font-weight: bold;
}
/* Morebits.quickForm */
form.quickform
{
width: 96%;
vertical-align: middle;
margin: auto;
padding: .5em;
}
form.quickform *
{
font-family: sans-serif;
vertical-align: middle;
}
form.quickform fieldset
{
margin: .4em 0 1em;
}
form.quickform legend
{
color: #31628F;
font-weight: bold;
}
form.quickform input[type=text], form.quickform select
{
min-width: 15em;
font-size: 110%;
}
form.quickform select
{
border: 1px solid gray;
margin-left: .2em;
}
form.quickform h5
{
margin: .5em 0 0;
padding: .3em .2em .2em;
}
/* only give the top border to headers with something above them */
form.quickform div + h5, form.quickform div + div > h5, form.quickform h5 + h5
{
border-top: 1px solid #88A;
}
form.quickform textarea
{
width: 100%;
height: 4em;
font-size: 150%;
}
form.quickform input:disabled + label
{
color: gray;
}
form.quickform span.quickformDescription
{
font-style: italic;
}
form.quickform .quickformSubgroup
{
margin-bottom: .5em;
margin-left: 3em;
}
form.quickform .tooltipButtonContainer
{
position: relative;
width: 100%;
}
form.quickform .tooltipButton
{
color: blue;
font-weight: bold;
cursor: help;
padding: .2em;
}
/* Scrollbox styles, for use within Morebits.quickForm */
div.quickform-scrollbox
{
background: white;
border: 1px solid gray;
margin-bottom: .6em;
margin-top: .6em;
max-height: 20em;
overflow: auto;
padding: 6px 6px 0;
}
div.quickform-scrollbox h5:first-child
{
border: none;
margin-top: 0;
padding-top: 0;
}
div.quickform-scrollbox :last-child
{
margin-bottom: 6px;
}
/* Previewbox */
div.morebits-previewbox
{
background: white;
color: black;
border: 2px inset;
margin: .4em auto .2em;
padding: .2em .4em;
}
div.morebits-previewbox *:not(img)
{
vertical-align: baseline;
}
div.morebits-previewbox .mw-editsection
{
display: none;
}
/* Portlet */
.skin-vector div div.extraMenu h3 span {
background-position: 90% 50%;
}
.skin-vector div.extraMenu h3 a {
padding-left: .4em;
padding-right: .4em;
width: auto;
font-size: 0.78em;
padding-bottom: 0.5em;
}
.skin-vector div.extraMenu h3 a span {
display: inline-block;
font-size: .8em;
height: 2.5em;
font-weight: normal;
padding-top: 1.25em;
margin-right: 14px;
}
.skin-modern #mw_contentwrapper div.portlet {
overflow: hidden;
height: 1.5em;
margin: 0 0 0 14em;
padding: 0;
}
.skin-modern #mw_contentwrapper div.portlet h5 {
display: none;
}
.skin-modern #mw_contentwrapper div.portlet div.pbody {
margin: 0;
padding: 0;
}
.skin-modern #mw_contentwrapper div.portlet div.pbody ul {
display: inline;
margin: 0;
}
.skin-modern #mw_contentwrapper div.portlet div.pbody ul li {
display: block;
float: left;
height: 1.5em;
margin: 0 .5em;
padding: 0 .2em;
text-transform: lowercase;
}
.skin-modern #mw_contentwrapper div.portlet div.pbody ul li a {
text-decoration: underline;
}
.skin-modern #mw_contentwrapper div.portlet div.pbody ul li.selected a {
text-decoration: none;
}
/* Morebits.simpleWindow */
.morebits-dialog {
border: 1px #666 solid;
font: small sans-serif;
background-color: #F0F8FF !important;
background-image: none !important;
}
body.skin-monobook .morebits-dialog {
font-size: 125%;
}
body .ui-dialog.morebits-dialog .ui-dialog-titlebar {
height: 1em;
background: repeat-x 50% 80% #cfd6e1 !important; /* the actual image is specified in morebits.js - ResourceLoader mangles data: URIs in CSS */
font: bold 1em sans-serif;
padding: .4em .3em .5em !important;
}
body.skin-monobook .morebits-dialog .ui-dialog-titlebar {
line-height: 1em;
}
.morebits-dialog-scriptname {
font-weight: normal;
}
.ui-dialog.morebits-dialog .ui-dialog-titlebar-close {
height: 100%;
right: 0;
top: auto;
width: 2em;
margin: -.5em -.15em 0;
}
.ui-dialog.morebits-dialog .ui-dialog-titlebar-close span {
margin: .33em;
}
.ui-dialog.morebits-dialog .morebits-dialog-content {
font-size: 88%; /* this just seems to be traditional - I don't quite see the point, in this day and age of huge monitors, etc. */
padding: 0;
}
body .ui-dialog.morebits-dialog .ui-dialog-buttonpane {
background-color: #BCCADF;
margin: 0;
min-height: .5em;
padding-left: 1.2em !important;
}
body .ui-dialog.morebits-dialog .ui-dialog-buttonpane button {
float: none;
margin: .2em 0 -.1em;
padding-top: 0;
padding-bottom: 0;
cursor: auto;
}
.morebits-dialog-footerlinks {
font-size: 90%;
float: right;
margin: .7em .4em 0 0;
}
body .ui-dialog.morebits-dialog .morebits-dialog-footerlinks a {
color: #3062AD;
}
.morebits-dialog-buttons[data-empty] + .morebits-dialog-footerlinks {
margin: .1em .4em -.2em 0;
}
.ui-dialog.morebits-dialog a, .ui-dialog.morebits-dialog .ui-widget-content a {
color: #0645AD; /* jQuery imposes a ridiculous nearly-black colour on <a> tags... I don't understand it */
}
.ui-icon-inline {
display: inline-block;
}
7e13805d85a0e50ae5104c1eb8fada3bef853cf4
MediaWiki:Gadget-morebits.js
8
116
302
301
2014-01-17T00:43:56Z
Ffkapa
2
1 wersja
javascript
text/javascript
// <nowiki>
/**
* morebits.js
* ===========
* A library full of lots of goodness for user scripts on MediaWiki wikis, including Wikipedia.
*
* The highlights include:
* - Morebits.quickForm class - generates quick HTML forms on the fly
* - Morebits.wiki.api class - makes calls to the MediaWiki API
* - Morebits.wiki.page class - modifies pages on the wiki (edit, revert, delete, etc.)
* - Morebits.wikitext class - contains some utilities for dealing with wikitext
* - Morebits.status class - a rough-and-ready status message displayer, used by the Morebits.wiki classes
* - Morebits.simpleWindow class - a wrapper for jQuery UI Dialog with a custom look and extra features
*
* Dependencies:
* - The whole thing relies on jQuery. But most wikis should provide this by default.
* - Morebits.quickForm, Morebits.simpleWindow, and Morebits.status rely on the "morebits.css" file for their styling.
* - Morebits.simpleWindow relies on jquery UI Dialog (ResourceLoader module name 'jquery.ui.dialog').
* - Morebits.quickForm tooltips rely on Tipsy (ResourceLoader module name 'jquery.tipsy').
* For external installations, Tipsy is available at [http://onehackoranother.com/projects/jquery/tipsy].
* - To create a gadget based on morebits.js, use this syntax in MediaWiki:Gadgets-definition:
* * GadgetName[ResourceLoader|dependencies=mediawiki.util,jquery.ui.dialog,jquery.tipsy]|morebits.js|morebits.css|GadgetName.js
*
* Most of the stuff here doesn't work on IE < 9. It is your script's responsibility to enforce this.
*
* This library is maintained by the maintainers of Twinkle.
* For queries, suggestions, help, etc., head to [[Wikipedia talk:Twinkle]] on English Wikipedia [http://en.wikipedia.org].
* The latest development source is available at [https://github.com/azatoth/twinkle/blob/master/morebits.js].
*/
( function ( window, document, $, undefined ) { // Wrap entire file with anonymous function
var Morebits = {};
window.Morebits = Morebits; // allow global access
/**
* **************** Morebits.userIsInGroup() ****************
* Simple helper function to see what groups a user might belong
*/
Morebits.userIsInGroup = function ( group ) {
return $.inArray(group, mw.config.get( 'wgUserGroups' )) !== -1;
};
/**
* **************** Morebits.isIPAddress() ****************
* Helper function: Returns true if given string contains a valid IPv4 or
* IPv6 address
*/
Morebits.isIPAddress = function ( address ) {
return mw.util.isIPv4Address(address) || mw.util.isIPv6Address(address);
};
/**
* **************** Morebits.quickForm ****************
* Morebits.quickForm is a class for creation of simple and standard forms without much
* specific coding.
*
* Index to Morebits.quickForm element types:
*
* select A combo box (aka drop-down).
* - Attributes: name, label, multiple, size, list, event
* option An element for a combo box.
* - Attributes: value, label, selected, disabled
* optgroup A group of "option"s.
* - Attributes: label, list
* field A fieldset (aka group box).
* - Attributes: name, label
* checkbox A checkbox. Must use "list" parameter.
* - Attributes: name, list, event
* - Attributes (within list): name, label, value, checked, disabled, event, subgroup
* radio A radio button. Must use "list" parameter.
* - Attributes: name, list, event
* - Attributes (within list): name, label, value, checked, disabled, event, subgroup
* input A text box.
* - Attributes: name, label, value, size, disabled, readonly, maxlength, event
* dyninput A set of text boxes with "Remove" buttons and an "Add" button.
* - Attributes: name, label, min, max, sublabel, value, size, maxlength, event
* hidden An invisible form field.
* - Attributes: name, value
* header A level 5 header.
* - Attributes: label
* div A generic placeholder element or label.
* - Attributes: name, label
* submit A submit button. Morebits.simpleWindow moves these to the footer of the dialog.
* - Attributes: name, label, disabled
* button A generic button.
* - Attributes: name, label, disabled, event
* textarea A big, multi-line text box.
* - Attributes: name, label, value, cols, rows, disabled, readonly
*
* Global attributes: id, style, tooltip, extra, adminonly
*/
Morebits.quickForm = function QuickForm( event, eventType ) {
this.root = new Morebits.quickForm.element( { type: 'form', event: event, eventType:eventType } );
};
Morebits.quickForm.prototype.render = function QuickFormRender() {
var ret = this.root.render();
ret.names = {};
return ret;
};
Morebits.quickForm.prototype.append = function QuickFormAppend( data ) {
return this.root.append( data );
};
Morebits.quickForm.element = function QuickFormElement( data ) {
this.data = data;
this.childs = [];
this.id = Morebits.quickForm.element.id++;
};
Morebits.quickForm.element.id = 0;
Morebits.quickForm.element.prototype.append = function QuickFormElementAppend( data ) {
var child;
if( data instanceof Morebits.quickForm.element ) {
child = data;
} else {
child = new Morebits.quickForm.element( data );
}
this.childs.push( child );
return child;
};
// This should be called without parameters: form.render()
Morebits.quickForm.element.prototype.render = function QuickFormElementRender( internal_subgroup_id ) {
var currentNode = this.compute( this.data, internal_subgroup_id );
for( var i = 0; i < this.childs.length; ++i ) {
// do not pass internal_subgroup_id to recursive calls
currentNode[1].appendChild( this.childs[i].render() );
}
return currentNode[0];
};
Morebits.quickForm.element.prototype.compute = function QuickFormElementCompute( data, in_id ) {
var node;
var childContainder = null;
var label;
var id = ( in_id ? in_id + '_' : '' ) + 'node_' + this.id;
if( data.adminonly && !Morebits.userIsInGroup( 'sysop' ) ) {
// hell hack alpha
data.type = 'hidden';
}
var i, current, subnode;
switch( data.type ) {
case 'form':
node = document.createElement( 'form' );
node.className = "quickform";
node.setAttribute( 'action', 'javascript:void(0);');
if( data.event ) {
node.addEventListener( data.eventType || 'submit', data.event , false );
}
break;
case 'select':
node = document.createElement( 'div' );
node.setAttribute( 'id', 'div_' + id );
if( data.label ) {
label = node.appendChild( document.createElement( 'label' ) );
label.setAttribute( 'for', id );
label.appendChild( document.createTextNode( data.label ) );
}
var select = node.appendChild( document.createElement( 'select' ) );
if( data.event ) {
select.addEventListener( 'change', data.event, false );
}
if( data.multiple ) {
select.setAttribute( 'multiple', 'multiple' );
}
if( data.size ) {
select.setAttribute( 'size', data.size );
}
select.setAttribute( 'name', data.name );
if( data.list ) {
for( i = 0; i < data.list.length; ++i ) {
current = data.list[i];
if( current.list ) {
current.type = 'optgroup';
} else {
current.type = 'option';
}
subnode = this.compute( current );
select.appendChild( subnode[0] );
}
}
childContainder = select;
break;
case 'option':
node = document.createElement( 'option' );
node.values = data.value;
node.setAttribute( 'value', data.value );
if( data.selected ) {
node.setAttribute( 'selected', 'selected' );
}
if( data.disabled ) {
node.setAttribute( 'disabled', 'disabled' );
}
node.setAttribute( 'label', data.label );
node.appendChild( document.createTextNode( data.label ) );
break;
case 'optgroup':
node = document.createElement( 'optgroup' );
node.setAttribute( 'label', data.label );
if( data.list ) {
for( i = 0; i < data.list.length; ++i ) {
current = data.list[i];
current.type = 'option'; //must be options here
subnode = this.compute( current );
node.appendChild( subnode[0] );
}
}
break;
case 'field':
node = document.createElement( 'fieldset' );
label = node.appendChild( document.createElement( 'legend' ) );
label.appendChild( document.createTextNode( data.label ) );
if( data.name ) {
node.setAttribute( 'name', data.name );
}
break;
case 'checkbox':
case 'radio':
node = document.createElement( 'div' );
if( data.list ) {
for( i = 0; i < data.list.length; ++i ) {
var cur_id = id + '_' + i;
current = data.list[i];
var cur_div;
if( current.type === 'header' ) {
// inline hack
cur_div = node.appendChild( document.createElement( 'h6' ) );
cur_div.appendChild( document.createTextNode( current.label ) );
if( current.tooltip ) {
Morebits.quickForm.element.generateTooltip( cur_div , current );
}
continue;
}
cur_div = node.appendChild( document.createElement( 'div' ) );
subnode = cur_div.appendChild( document.createElement( 'input' ) );
subnode.values = current.value;
subnode.setAttribute( 'value', current.value );
subnode.setAttribute( 'name', current.name || data.name );
subnode.setAttribute( 'type', data.type );
subnode.setAttribute( 'id', cur_id );
if( current.checked ) {
subnode.setAttribute( 'checked', 'checked' );
}
if( current.disabled ) {
subnode.setAttribute( 'disabled', 'disabled' );
}
label = cur_div.appendChild( document.createElement( 'label' ) );
label.appendChild( document.createTextNode( current.label ) );
label.setAttribute( 'for', cur_id );
if( current.tooltip ) {
Morebits.quickForm.element.generateTooltip( label, current );
}
// styles go on the label, doesn't make sense to style a checkbox/radio
if( current.style ) {
subnode.setAttribute( 'style', current.style );
}
var event;
if( current.subgroup ) {
var tmpgroup = current.subgroup;
if( ! $.isArray( tmpgroup ) ) {
tmpgroup = [ tmpgroup ];
}
var subgroupRaw = new Morebits.quickForm.element({
type: 'div',
id: id + '_' + i + '_subgroup'
});
$.each( tmpgroup, function( idx, el ) {
var newEl = $.extend( {}, el );
if( ! newEl.type ) {
newEl.type = data.type;
}
newEl.name = (current.name || data.name) + '.' + newEl.name;
subgroupRaw.append( newEl );
} );
var subgroup = subgroupRaw.render( cur_id );
subgroup.className = "quickformSubgroup";
subnode.subgroup = subgroup;
subnode.shown = false;
event = function(e) {
if( e.target.checked ) {
e.target.parentNode.appendChild( e.target.subgroup );
if( e.target.type === 'radio' ) {
var name = e.target.name;
if( e.target.form.names[name] !== undefined ) {
e.target.form.names[name].parentNode.removeChild( e.target.form.names[name].subgroup );
}
e.target.form.names[name] = e.target;
}
} else {
e.target.parentNode.removeChild( e.target.subgroup );
}
};
subnode.addEventListener( 'change', event, true );
if( current.checked ) {
subnode.parentNode.appendChild( subgroup );
}
} else if( data.type === 'radio' ) {
event = function(e) {
if( e.target.checked ) {
var name = e.target.name;
if( e.target.form.names[name] !== undefined ) {
e.target.form.names[name].parentNode.removeChild( e.target.form.names[name].subgroup );
}
delete e.target.form.names[name];
}
};
subnode.addEventListener( 'change', event, true );
}
// add users' event last, so it can interact with the subgroup
if( data.event ) {
subnode.addEventListener( 'change', data.event, false );
} else if ( current.event ) {
subnode.addEventListener( 'change', current.event, true );
}
}
}
break;
case 'input':
node = document.createElement( 'div' );
node.setAttribute( 'id', 'div_' + id );
if( data.label ) {
label = node.appendChild( document.createElement( 'label' ) );
label.appendChild( document.createTextNode( data.label ) );
label.setAttribute( 'for', id );
}
subnode = node.appendChild( document.createElement( 'input' ) );
if( data.value ) {
subnode.setAttribute( 'value', data.value );
}
subnode.setAttribute( 'name', data.name );
subnode.setAttribute( 'id', id );
subnode.setAttribute( 'type', 'text' );
if( data.size ) {
subnode.setAttribute( 'size', data.size );
}
if( data.disabled ) {
subnode.setAttribute( 'disabled', 'disabled' );
}
if( data.readonly ) {
subnode.setAttribute( 'readonly', 'readonly' );
}
if( data.maxlength ) {
subnode.setAttribute( 'maxlength', data.maxlength );
}
if( data.event ) {
subnode.addEventListener( 'keyup', data.event, false );
}
break;
case 'dyninput':
var min = data.min || 1;
var max = data.max || Infinity;
node = document.createElement( 'div' );
label = node.appendChild( document.createElement( 'h5' ) );
label.appendChild( document.createTextNode( data.label ) );
var listNode = node.appendChild( document.createElement( 'div' ) );
var more = this.compute( {
type: 'button',
label: 'more',
disabled: min >= max,
event: function(e) {
var area = e.target.area;
var new_node = new Morebits.quickForm.element( e.target.sublist );
e.target.area.appendChild( new_node.render() );
if( ++e.target.counter >= e.target.max ) {
e.target.setAttribute( 'disabled', 'disabled' );
}
e.stopPropagation();
}
} );
node.appendChild( more[0] );
var moreButton = more[1];
var sublist = {
type: '_dyninput_element',
label: data.sublabel || data.label,
name: data.name,
value: data.value,
size: data.size,
remove: false,
maxlength: data.maxlength,
event: data.event
};
for( i = 0; i < min; ++i ) {
var elem = new Morebits.quickForm.element( sublist );
listNode.appendChild( elem.render() );
}
sublist.remove = true;
sublist.morebutton = moreButton;
sublist.listnode = listNode;
moreButton.sublist = sublist;
moreButton.area = listNode;
moreButton.max = max - min;
moreButton.counter = 0;
break;
case '_dyninput_element': // Private, similar to normal input
node = document.createElement( 'div' );
if( data.label ) {
label = node.appendChild( document.createElement( 'label' ) );
label.appendChild( document.createTextNode( data.label ) );
label.setAttribute( 'for', id );
}
subnode = node.appendChild( document.createElement( 'input' ) );
if( data.value ) {
subnode.setAttribute( 'value', data.value );
}
subnode.setAttribute( 'name', data.name );
subnode.setAttribute( 'type', 'text' );
if( data.size ) {
subnode.setAttribute( 'size', data.size );
}
if( data.maxlength ) {
subnode.setAttribute( 'maxlength', data.maxlength );
}
if( data.event ) {
subnode.addEventListener( 'keyup', data.event, false );
}
if( data.remove ) {
var remove = this.compute( {
type: 'button',
label: 'remove',
event: function(e) {
var list = e.target.listnode;
var node = e.target.inputnode;
var more = e.target.morebutton;
list.removeChild( node );
--more.counter;
more.removeAttribute( 'disabled' );
e.stopPropagation();
}
} );
node.appendChild( remove[0] );
var removeButton = remove[1];
removeButton.inputnode = node;
removeButton.listnode = data.listnode;
removeButton.morebutton = data.morebutton;
}
break;
case 'hidden':
node = document.createElement( 'input' );
node.setAttribute( 'type', 'hidden' );
node.values = data.value;
node.setAttribute( 'value', data.value );
node.setAttribute( 'name', data.name );
break;
case 'header':
node = document.createElement( 'h5' );
node.appendChild( document.createTextNode( data.label ) );
break;
case 'div':
node = document.createElement( 'div' );
if (data.name) {
node.setAttribute( 'name', data.name );
}
if (data.label) {
if ( ! $.isArray( data.label ) ) {
data.label = [ data.label ];
}
var result = document.createElement( 'span' );
result.className = 'quickformDescription';
for( i = 0; i < data.label.length; ++i ) {
if( typeof data.label[i] === 'string' ) {
result.appendChild( document.createTextNode( data.label[i] ) );
} else if( data.label[i] instanceof Element ) {
result.appendChild( data.label[i] );
}
}
node.appendChild( result );
}
break;
case 'submit':
node = document.createElement( 'span' );
childContainder = node.appendChild(document.createElement( 'input' ));
childContainder.setAttribute( 'type', 'submit' );
if( data.label ) {
childContainder.setAttribute( 'value', data.label );
}
childContainder.setAttribute( 'name', data.name || 'submit' );
if( data.disabled ) {
childContainder.setAttribute( 'disabled', 'disabled' );
}
break;
case 'button':
node = document.createElement( 'span' );
childContainder = node.appendChild(document.createElement( 'input' ));
childContainder.setAttribute( 'type', 'button' );
if( data.label ) {
childContainder.setAttribute( 'value', data.label );
}
childContainder.setAttribute( 'name', data.name );
if( data.disabled ) {
childContainder.setAttribute( 'disabled', 'disabled' );
}
if( data.event ) {
childContainder.addEventListener( 'click', data.event, false );
}
break;
case 'textarea':
node = document.createElement( 'div' );
node.setAttribute( 'id', 'div_' + id );
if( data.label ) {
label = node.appendChild( document.createElement( 'h5' ) );
label.appendChild( document.createTextNode( data.label ) );
// TODO need to nest a <label> tag in here without creating extra vertical space
//label.setAttribute( 'for', id );
}
subnode = node.appendChild( document.createElement( 'textarea' ) );
subnode.setAttribute( 'name', data.name );
if( data.cols ) {
subnode.setAttribute( 'cols', data.cols );
}
if( data.rows ) {
subnode.setAttribute( 'rows', data.rows );
}
if( data.disabled ) {
subnode.setAttribute( 'disabled', 'disabled' );
}
if( data.readonly ) {
subnode.setAttribute( 'readonly', 'readonly' );
}
if( data.value ) {
subnode.value = data.value;
}
break;
default:
throw new Error("Morebits.quickForm: unknown element type " + data.type.toString());
}
if( !childContainder ) {
childContainder = node;
}
if( data.tooltip ) {
Morebits.quickForm.element.generateTooltip( label || node , data );
}
if( data.extra ) {
childContainder.extra = data.extra;
}
if( data.style ) {
childContainder.setAttribute( 'style', data.style );
}
childContainder.setAttribute( 'id', data.id || id );
return [ node, childContainder ];
};
Morebits.quickForm.element.autoNWSW = function() {
return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 'sw' : 'nw';
};
Morebits.quickForm.element.generateTooltip = function QuickFormElementGenerateTooltip( node, data ) {
$('<span/>', {
'class': 'ui-icon ui-icon-help ui-icon-inline morebits-tooltip'
}).appendTo(node).tipsy({
'fallback': data.tooltip,
'fade': true,
'gravity': (data.type === "input" || data.type === "select") ?
Morebits.quickForm.element.autoNWSW : $.fn.tipsy.autoWE,
'html': true,
'delayOut': 250
});
};
/**
* Some utility methods for manipulating quickForms after their creation
* (None of them work for "dyninput" type fields at present)
*
* Morebits.quickForm.getElements(form, fieldName)
* Returns all form elements with a given field name or ID
*
* Morebits.quickForm.getCheckboxOrRadio(elementArray, value)
* Searches the array of elements for a checkbox or radio button with a certain |value| attribute
*
* Morebits.quickForm.getElementContainer(element)
* Returns the <div> containing the form element, or the form element itself
* May not work as expected on checkboxes or radios
*
* Morebits.quickForm.getElementLabelObject(element)
* Gets the HTML element that contains the label of the given form element (mainly for internal use)
*
* Morebits.quickForm.getElementLabel(element)
* Gets the label text of the element
*
* Morebits.quickForm.setElementLabel(element, labelText)
* Sets the label of the element to the given text
*
* Morebits.quickForm.overrideElementLabel(element, temporaryLabelText)
* Stores the element's current label, and temporarily sets the label to the given text
*
* Morebits.quickForm.resetElementLabel(element)
* Restores the label stored by overrideElementLabel
*
* Morebits.quickForm.setElementVisibility(element, visibility)
* Shows or hides a form element plus its label and tooltip
*
* Morebits.quickForm.setElementTooltipVisibility(element, visibility)
* Shows or hides the "question mark" icon next to a form element
*/
Morebits.quickForm.getElements = function QuickFormGetElements(form, fieldName) {
var $form = $(form);
var $elements = $form.find('[name="' + fieldName + '"]');
if ($elements.length > 0) {
return $elements.toArray();
}
$elements = $form.find('#' + fieldName);
if ($elements.length > 0) {
return $elements.toArray();
}
return null;
};
Morebits.quickForm.getCheckboxOrRadio = function QuickFormGetCheckboxOrRadio(elementArray, value) {
var found = $.grep(elementArray, function(el) {
return el.value === value;
});
if (found.length > 0) {
return found[0];
}
return null;
};
Morebits.quickForm.getElementContainer = function QuickFormGetElementContainer(element) {
// for divs, headings and fieldsets, the container is the element itself
if (element instanceof HTMLFieldSetElement || element instanceof HTMLDivElement ||
element instanceof HTMLHeadingElement) {
return element;
}
// for others, just return the parent node
return element.parentNode;
};
Morebits.quickForm.getElementLabelObject = function QuickFormGetElementLabelObject(element) {
// for buttons, divs and headers, the label is on the element itself
if (element.type === "button" || element.type === "submit" ||
element instanceof HTMLDivElement || element instanceof HTMLHeadingElement) {
return element;
// for fieldsets, the label is the child <legend> element
} else if (element instanceof HTMLFieldSetElement) {
return element.getElementsByTagName("legend")[0];
// for textareas, the label is the sibling <h5> element
} else if (element instanceof HTMLTextAreaElement) {
return element.parentNode.getElementsByTagName("h5")[0];
// for others, the label is the sibling <label> element
} else {
return element.parentNode.getElementsByTagName("label")[0];
}
return null;
};
Morebits.quickForm.getElementLabel = function QuickFormGetElementLabel(element) {
var labelElement = Morebits.quickForm.getElementLabelObject(element);
if (!labelElement) {
return null;
}
return labelElement.firstChild.textContent;
};
Morebits.quickForm.setElementLabel = function QuickFormSetElementLabel(element, labelText) {
var labelElement = Morebits.quickForm.getElementLabelObject(element);
if (!labelElement) {
return false;
}
labelElement.firstChild.textContent = labelText;
return true;
};
Morebits.quickForm.overrideElementLabel = function QuickFormOverrideElementLabel(element, temporaryLabelText) {
if (!element.hasAttribute("data-oldlabel")) {
element.setAttribute("data-oldlabel", Morebits.quickForm.getElementLabel(element));
}
return Morebits.quickForm.setElementLabel(element, temporaryLabelText);
};
Morebits.quickForm.resetElementLabel = function QuickFormResetElementLabel(element) {
if (element.hasAttribute("data-oldlabel")) {
return Morebits.quickForm.setElementLabel(element, element.getAttribute("data-oldlabel"));
}
return null;
};
Morebits.quickForm.setElementVisibility = function QuickFormSetElementVisibility(element, visibility) {
$(element).toggle(visibility);
};
Morebits.quickForm.setElementTooltipVisibility = function QuickFormSetElementTooltipVisibility(element, visibility) {
$(Morebits.quickForm.getElementContainer(element)).find(".morebits-tooltip").toggle(visibility);
};
/**
* **************** HTMLFormElement ****************
*
* getChecked:
* XXX Doesn't seem to work reliably across all browsers at the moment. -- see getChecked2 in twinkleunlink.js, which is better
*
* Returns an array containing the values of elements with the given name, that has it's
* checked property set to true. (i.e. a checkbox or a radiobutton is checked), or select options
* that have selected set to true. (don't try to mix selects with radio/checkboxes, please)
* Type is optional and can specify if either radio or checkbox (for the event
* that both checkboxes and radiobuttons have the same name.
*/
HTMLFormElement.prototype.getChecked = function( name, type ) {
var elements = this.elements[name];
if( !elements ) {
// if the element doesn't exists, return null.
return null;
}
var return_array = [];
var i;
if( elements instanceof HTMLSelectElement ) {
var options = elements.options;
for( i = 0; i < options.length; ++i ) {
if( options[i].selected ) {
if( options[i].values ) {
return_array.push( options[i].values );
} else {
return_array.push( options[i].value );
}
}
}
} else if( elements instanceof HTMLInputElement ) {
if( type && elements.type !== type ) {
return [];
} else if( elements.checked ) {
return [ elements.value ];
}
} else {
for( i = 0; i < elements.length; ++i ) {
if( elements[i].checked ) {
if( type && elements[i].type !== type ) {
continue;
}
if( elements[i].values ) {
return_array.push( elements[i].values );
} else {
return_array.push( elements[i].value );
}
}
}
}
return return_array;
};
/**
* **************** RegExp ****************
*
* RegExp.escape: Will escape a string to be used in a RegExp
*/
RegExp.escape = function( text, space_fix ) {
text = $.escapeRE(text);
// Special MediaWiki escape - underscore/space are often equivalent
if( space_fix ) {
text = text.replace( / |_/g, '[_ ]' );
}
return text;
};
/**
* **************** Morebits.bytes ****************
* Utility object for formatting byte values
*/
Morebits.bytes = function( value ) {
if( typeof value === 'string' ) {
var res = /(\d+) ?(\w?)(i?)B?/.exec( value );
var number = res[1];
var mag = res[2];
var si = res[3];
if( !number ) {
this.number = 0;
return;
}
if( !si ) {
this.value = number * Math.pow( 10, Morebits.bytes.magnitudes[mag] * 3 );
} else {
this.value = number * Math.pow( 2, Morebits.bytes.magnitudes[mag] * 10 );
}
} else {
this.value = value;
}
};
Morebits.bytes.magnitudes = {
'': 0,
'K': 1,
'M': 2,
'G': 3,
'T': 4,
'P': 5,
'E': 6,
'Z': 7,
'Y': 8
};
Morebits.bytes.rmagnitudes = {
0: '',
1: 'K',
2: 'M',
3: 'G',
4: 'T',
5: 'P',
6: 'E',
7: 'Z',
8: 'Y'
};
Morebits.bytes.prototype.valueOf = function() {
return this.value;
};
Morebits.bytes.prototype.toString = function( magnitude ) {
var tmp = this.value;
if( magnitude ) {
var si = /i/.test(magnitude);
var mag = magnitude.replace( /.*?(\w)i?B?.*/g, '$1' );
if( si ) {
tmp /= Math.pow( 2, Morebits.bytes.magnitudes[mag] * 10 );
} else {
tmp /= Math.pow( 10, Morebits.bytes.magnitudes[mag] * 3 );
}
if( parseInt( tmp, 10 ) !== tmp ) {
tmp = Number( tmp ).toPrecision( 4 );
}
return tmp + ' ' + mag + (si?'i':'') + 'B';
} else {
// si per default
var current = 0;
while( tmp >= 1024 ) {
tmp /= 1024;
++current;
}
tmp = this.value / Math.pow( 2, current * 10 );
if( parseInt( tmp, 10 ) !== tmp ) {
tmp = Number( tmp ).toPrecision( 4 );
}
return tmp + ' ' + Morebits.bytes.rmagnitudes[current] + ( current > 0 ? 'iB' : 'B' );
}
};
/**
* **************** String; Morebits.string ****************
*/
if (!String.prototype.trimLeft) {
String.prototype.trimLeft = function stringPrototypeLtrim( ) {
return this.replace( /^[\s]+/g, "" );
};
}
if (!String.prototype.trimRight) {
String.prototype.trimRight = function stringPrototypeRtrim( ) {
return this.replace( /[\s]+$/g, "" );
};
}
if (!String.prototype.trim) {
String.prototype.trim = function stringPrototypeTrim( ) {
return this.trimRight().trimLeft();
};
}
// Helper functions to change case of a string
Morebits.string = {
toUpperCaseFirstChar: function(str) {
str = str.toString();
return str.substr( 0, 1 ).toUpperCase() + str.substr( 1 );
},
toLowerCaseFirstChar: function(str) {
str = str.toString();
return str.substr( 0, 1 ).toLowerCase() + str.substr( 1 );
},
splitWeightedByKeys: function( str, start, end, skip ) {
if( start.length !== end.length ) {
throw new Error( 'start marker and end marker must be of the same length' );
}
var level = 0;
var initial = null;
var result = [];
if( ! $.isArray( skip ) ) {
if( skip === undefined ) {
skip = [];
} else if( typeof skip === 'string' ) {
skip = [ skip ];
} else {
throw new Error( "non-applicable skip parameter" );
}
}
for( var i = 0; i < str.length; ++i ) {
for( var j = 0; j < skip.length; ++j ) {
if( str.substr( i, skip[j].length ) === skip[j] ) {
i += skip[j].length - 1;
continue;
}
}
if( str.substr( i, start.length ) === start ) {
if( initial === null ) {
initial = i;
}
++level;
i += start.length - 1;
} else if( str.substr( i, end.length ) === end ) {
--level;
i += end.length - 1;
}
if( !level && initial !== null ) {
result.push( str.substring( initial, i + 1 ) );
initial = null;
}
}
return result;
},
// for deletion/other templates taking a freeform "reason" from a textarea (e.g. PROD, XFD, RPP)
formatReasonText: function( str ) {
return str.toString().trimRight().replace(/\|/g, "{{subst:!}}");
}
};
/**
* **************** Morebits.array ****************
*
* uniq(arr): returns a copy of the array with duplicates removed
*
* dups(arr): returns a copy of the array with the first instance of each value
* removed; subsequent instances of those values (duplicates) remain
*
* chunk(arr, size): breaks up |arr| into smaller arrays of length |size|, and
* returns an array of these "chunked" arrays
*/
Morebits.array = {
uniq: function(arr) {
if ( ! $.isArray( arr ) ) {
throw "A non-array object passed to Morebits.array.uniq";
}
var result = [];
for( var i = 0; i < arr.length; ++i ) {
var current = arr[i];
if( result.indexOf( current ) === -1 ) {
result.push( current );
}
}
return result;
},
dups: function(arr) {
if ( ! $.isArray( arr ) ) {
throw "A non-array object passed to Morebits.array.dups";
}
var uniques = [];
var result = [];
for( var i = 0; i < arr.length; ++i ) {
var current = arr[i];
if( uniques.indexOf( current ) === -1 ) {
uniques.push( current );
} else {
result.push( current );
}
}
return result;
},
chunk: function( arr, size ) {
if ( ! $.isArray( arr ) ) {
throw "A non-array object passed to Morebits.array.chunk";
}
if( typeof size !== 'number' || size <= 0 ) { // pretty impossible to do anything :)
return [ arr ]; // we return an array consisting of this array.
}
var result = [];
var current;
for( var i = 0; i < arr.length; ++i ) {
if( i % size === 0 ) { // when 'i' is 0, this is always true, so we start by creating one.
current = [];
result.push( current );
}
current.push( arr[i] );
}
return result;
}
};
/**
* **************** Morebits.getPageAssociatedUser ****************
* Get the user associated with the currently-viewed page.
* Currently works on User:, User talk:, Special:Contributions.
*/
Morebits.getPageAssociatedUser = function(){
var thisNamespaceId = mw.config.get('wgNamespaceNumber');
if ( thisNamespaceId === 2 /* User: */ || thisNamespaceId === 3 /* User talk: */ ) {
return mw.config.get('wgTitle').split( '/' )[0]; // only first part before any slashes, to work on subpages
}
if ( thisNamespaceId === -1 /* Special: */ && mw.config.get('wgCanonicalSpecialPageName') === "Contributions" ) {
return $('table.mw-contributions-table input[name="target"]')[0].getAttribute('value');
}
return false;
};
/**
* **************** Morebits.pageNameNorm ****************
* Stores a normalized version of the wgPageName variable (underscores converted to spaces).
* For queen/king/whatever and country!
*/
Morebits.pageNameNorm = mw.config.get('wgPageName').replace(/_/g, ' ');
/**
* **************** Morebits.unbinder ****************
* Used by Morebits.wikitext.page.commentOutImage
*/
Morebits.unbinder = function Unbinder( string ) {
if( typeof string !== 'string' ) {
throw new Error( "not a string" );
}
this.content = string;
this.counter = 0;
this.history = {};
this.prefix = '%UNIQ::' + Math.random() + '::';
this.postfix = '::UNIQ%';
};
Morebits.unbinder.prototype = {
unbind: function UnbinderUnbind( prefix, postfix ) {
var re = new RegExp( prefix + '(.*?)' + postfix, 'g' );
this.content = this.content.replace( re, Morebits.unbinder.getCallback( this ) );
},
rebind: function UnbinderRebind() {
var content = this.content;
content.self = this;
for( var current in this.history ) {
if( this.history.hasOwnProperty( current ) ) {
content = content.replace( current, this.history[current] );
}
}
return content;
},
prefix: null, // %UNIQ::0.5955981644938324::
postfix: null, // ::UNIQ%
content: null, // string
counter: null, // 0++
history: null // {}
};
Morebits.unbinder.getCallback = function UnbinderGetCallback(self) {
return function UnbinderCallback( match , a , b ) {
var current = self.prefix + self.counter + self.postfix;
self.history[current] = match;
++self.counter;
return current;
};
};
/**
* **************** Date ****************
* Helper functions to get the month as a string instead of a number
*
* Normally it is poor form to play with prototypes of primitive types, but it
* is fairly unlikely that anyone will iterate over a Date object.
*/
Date.monthNames = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December'
];
Date.monthNamesAbbrev = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec'
];
Date.prototype.getMonthName = function() {
return Date.monthNames[ this.getMonth() ];
};
Date.prototype.getMonthNameAbbrev = function() {
return Date.monthNamesAbbrev[ this.getMonth() ];
};
Date.prototype.getUTCMonthName = function() {
return Date.monthNames[ this.getUTCMonth() ];
};
Date.prototype.getUTCMonthNameAbbrev = function() {
return Date.monthNamesAbbrev[ this.getUTCMonth() ];
};
/**
* **************** Morebits.wikipedia ****************
* English Wikipedia-specific objects
*/
Morebits.wikipedia = {};
Morebits.wikipedia.namespaces = {
'-2': 'Media',
'-1': 'Special',
'0': '',
'1': 'Talk',
'2': 'User',
'3': 'User talk',
'4': 'Project',
'5': 'Project talk',
'6': 'File',
'7': 'File talk',
'8': 'MediaWiki',
'9': 'MediaWiki talk',
'10': 'Template',
'11': 'Template talk',
'12': 'Help',
'13': 'Help talk',
'14': 'Category',
'15': 'Category talk',
'100': 'Portal',
'101': 'Portal talk',
'108': 'Book',
'109': 'Book talk',
'118': 'Draft',
'119': 'Draft talk',
'446': 'Education Program',
'447': 'Education Program talk',
'710': 'TimedText',
'711': 'TimedText talk',
'828': 'Module',
'829': 'Module talk'
};
Morebits.wikipedia.namespacesFriendly = {
'0': '(Article)',
'1': 'Talk',
'2': 'User',
'3': 'User talk',
'4': 'Wikipedia',
'5': 'Wikipedia talk',
'6': 'File',
'7': 'File talk',
'8': 'MediaWiki',
'9': 'MediaWiki talk',
'10': 'Template',
'11': 'Template talk',
'12': 'Help',
'13': 'Help talk',
'14': 'Category',
'15': 'Category talk',
'100': 'Portal',
'101': 'Portal talk',
'108': 'Book',
'109': 'Book talk',
'118': 'Draft',
'119': 'Draft talk',
'446': 'Education Program',
'447': 'Education Program talk',
'710': 'TimedText',
'711': 'TimedText talk',
'828': 'Module',
'829': 'Module talk'
};
/**
* **************** Morebits.wiki ****************
* Various objects for wiki editing and API access
*/
Morebits.wiki = {};
// Determines whether the current page is a redirect or soft redirect
// (fails to detect soft redirects on edit, history, etc. pages)
Morebits.wiki.isPageRedirect = function wikipediaIsPageRedirect() {
return !!(mw.config.get("wgIsRedirect") || document.getElementById("softredirect"));
};
/**
* **************** Morebits.wiki.actionCompleted ****************
*
* Use of Morebits.wiki.actionCompleted():
* Every call to Morebits.wiki.api.post() results in the dispatch of
* an asynchronous callback. Each callback can in turn
* make an additional call to Morebits.wiki.api.post() to continue a
* processing sequence. At the conclusion of the final callback
* of a processing sequence, it is not possible to simply return to the
* original caller because there is no call stack leading back to
* the original context. Instead, Morebits.wiki.actionCompleted.event() is
* called to display the result to the user and to perform an optional
* page redirect.
*
* The determination of when to call Morebits.wiki.actionCompleted.event()
* is managed through the globals Morebits.wiki.numberOfActionsLeft and
* Morebits.wiki.nbrOfCheckpointsLeft. Morebits.wiki.numberOfActionsLeft is
* incremented at the start of every Morebits.wiki.api call and decremented
* after the completion of a callback function. If a callback function
* does not create a new Morebits.wiki.api object before exiting, it is the
* final step in the processing chain and Morebits.wiki.actionCompleted.event()
* will then be called.
*
* Optionally, callers may use Morebits.wiki.addCheckpoint() to indicate that
* processing is not complete upon the conclusion of the final callback function.
* This is used for batch operations. The end of a batch is signaled by calling
* Morebits.wiki.removeCheckpoint().
*/
Morebits.wiki.numberOfActionsLeft = 0;
Morebits.wiki.nbrOfCheckpointsLeft = 0;
Morebits.wiki.actionCompleted = function( self ) {
if( --Morebits.wiki.numberOfActionsLeft <= 0 && Morebits.wiki.nbrOfCheckpointsLeft <= 0 ) {
Morebits.wiki.actionCompleted.event( self );
}
};
// Change per action wanted
Morebits.wiki.actionCompleted.event = function() {
new Morebits.status( Morebits.wiki.actionCompleted.notice, Morebits.wiki.actionCompleted.postfix, 'info' );
if( Morebits.wiki.actionCompleted.redirect ) {
// if it isn't a URL, make it one. TODO: This breaks on the articles 'http://', 'ftp://', and similar ones.
if( !( (/^\w+\:\/\//).test( Morebits.wiki.actionCompleted.redirect ) ) ) {
Morebits.wiki.actionCompleted.redirect = mw.util.getUrl( Morebits.wiki.actionCompleted.redirect );
if( Morebits.wiki.actionCompleted.followRedirect === false ) {
Morebits.wiki.actionCompleted.redirect += "?redirect=no";
}
}
window.setTimeout( function() { window.location = Morebits.wiki.actionCompleted.redirect; }, Morebits.wiki.actionCompleted.timeOut );
}
};
Morebits.wiki.actionCompleted.timeOut = ( typeof window.wpActionCompletedTimeOut === 'undefined' ? 5000 : window.wpActionCompletedTimeOut );
Morebits.wiki.actionCompleted.redirect = null;
Morebits.wiki.actionCompleted.notice = 'Action';
Morebits.wiki.actionCompleted.postfix = 'completed';
Morebits.wiki.addCheckpoint = function() {
++Morebits.wiki.nbrOfCheckpointsLeft;
};
Morebits.wiki.removeCheckpoint = function() {
if( --Morebits.wiki.nbrOfCheckpointsLeft <= 0 && Morebits.wiki.numberOfActionsLeft <= 0 ) {
Morebits.wiki.actionCompleted.event();
}
};
/**
* **************** Morebits.wiki.api ****************
* An easy way to talk to the MediaWiki API.
*
* Constructor parameters:
* currentAction: the current action (required)
* query: the query (required)
* onSuccess: the function to call when request gotten
* statusElement: a Morebits.status object to use for status messages (optional)
* onError: the function to call if an error occurs (optional)
*/
Morebits.wiki.api = function( currentAction, query, onSuccess, statusElement, onError ) {
this.currentAction = currentAction;
this.query = query;
this.query.format = 'xml';
this.onSuccess = onSuccess;
this.onError = onError;
if( statusElement ) {
this.statelem = statusElement;
this.statelem.status( currentAction );
} else {
this.statelem = new Morebits.status( currentAction );
}
};
Morebits.wiki.api.prototype = {
currentAction: '',
onSuccess: null,
onError: null,
parent: window, // use global context if there is no parent object
query: null,
responseXML: null,
setParent: function(parent) { this.parent = parent; }, // keep track of parent object for callbacks
statelem: null, // this non-standard name kept for backwards compatibility
statusText: null, // result received from the API, normally "success" or "error"
errorCode: null, // short text error code, if any, as documented in the MediaWiki API
errorText: null, // full error description, if any
// post(): carries out the request
// do not specify a parameter unless you really really want to give jQuery some extra parameters
post: function( callerAjaxParameters ) {
++Morebits.wiki.numberOfActionsLeft;
var ajaxparams = $.extend( {}, {
context: this,
type: 'POST',
url: mw.util.wikiScript('api'),
data: Morebits.queryString.create(this.query),
dataType: 'xml'
}, callerAjaxParameters );
return $.ajax( ajaxparams ).done(
function(xml, statusText, jqXHR) {
this.statusText = statusText;
this.responseXML = xml;
this.errorCode = $(xml).find('error').attr('code');
this.errorText = $(xml).find('error').attr('info');
if (typeof this.errorCode === "string") {
// the API didn't like what we told it, e.g., bad edit token or an error creating a page
this.returnError();
return;
}
// invoke success callback if one was supplied
if (this.onSuccess) {
// set the callback context to this.parent for new code and supply the API object
// as the first argument to the callback (for legacy code)
this.onSuccess.call( this.parent, this );
} else {
this.statelem.info("done");
}
Morebits.wiki.actionCompleted();
}
).fail(
// only network and server errors reach here – complaints from the API itself are caught in success()
function(jqXHR, statusText, errorThrown) {
this.statusText = statusText;
this.errorThrown = errorThrown; // frequently undefined
this.errorText = statusText + ' "' + jqXHR.statusText + '" occurred while contacting the API.';
this.returnError();
}
); // the return value should be ignored, unless using callerAjaxParameters with |async: false|
},
returnError: function() {
this.statelem.error( this.errorText );
// invoke failure callback if one was supplied
if (this.onError) {
// set the callback context to this.parent for new code and supply the API object
// as the first argument to the callback for legacy code
this.onError.call( this.parent, this );
}
// don't complete the action so that the error remains displayed
},
getStatusElement: function() {
return this.statelem;
},
getErrorCode: function() {
return this.errorCode;
},
getErrorText: function() {
return this.errorText;
},
getXML: function() {
return this.responseXML;
}
};
/**
* **************** Morebits.wiki.page ****************
* Uses the MediaWiki API to load a page and optionally edit it, move it, etc.
*
* Callers are not permitted to directly access the properties of this class!
* All property access is through the appropriate get___() or set___() method.
*
* Callers should set Morebits.wiki.actionCompleted.notice and Morebits.wiki.actionCompleted.redirect
* before the first call to Morebits.wiki.page.load().
*
* Each of the callback functions takes one parameter, which is a
* reference to the Morebits.wiki.page object that registered the callback.
* Callback functions may invoke any Morebits.wiki.page prototype method using this reference.
*
*
* NOTE: This list of member functions is incomplete.
*
* Constructor: Morebits.wiki.page(pageName, currentAction)
* pageName - the name of the page, prefixed by the namespace (if any)
* (for the current page, use mw.config.get('wgPageName'))
* currentAction - a string describing the action about to be undertaken (optional)
*
* load(onSuccess, onFailure): Loads the text for the page
* onSuccess - callback function which is called when the load has succeeded
* onFailure - callback function which is called when the load fails (optional)
* XXX onFailure for load() is not yet implemented – do we need it? -- UncleDouggie
* probably not -- TTO
*
* save(onSuccess, onFailure): Saves the text for the page. Must be preceded by calling load().
* onSuccess - callback function which is called when the save has succeeded (optional)
* onFailure - callback function which is called when the save fails (optional)
* Warning: Calling save() can result in additional calls to the previous load() callbacks to
* recover from edit conflicts!
* In this case, callers must make the same edit to the new pageText and reinvoke save().
* This behavior can be disabled with setMaxConflictRetries(0).
*
* append(onSuccess, onFailure): Adds the text provided via setAppendText() to the end of the page.
* Does not require calling load() first.
* onSuccess - callback function which is called when the method has succeeded (optional)
* onFailure - callback function which is called when the method fails (optional)
*
* prepend(onSuccess, onFailure): Adds the text provided via setPrependText() to the start of the page.
* Does not require calling load() first.
* onSuccess - callback function which is called when the method has succeeded (optional)
* onFailure - callback function which is called when the method fails (optional)
*
* getPageName(): returns a string containing the name of the loaded page, including the namespace
*
* getPageText(): returns a string containing the text of the page after a successful load()
*
* setPageText(pageText)
* pageText - string containing the updated page text that will be saved when save() is called
*
* setAppendText(appendText)
* appendText - string containing the text that will be appended to the page when append() is called
*
* setPrependText(prependText)
* prependText - string containing the text that will be prepended to the page when prepend() is called
*
* setEditSummary(summary)
* summary - string containing the text of the edit summary that will be used when save() is called
*
* setMinorEdit(minorEdit)
* minorEdit is a boolean value:
* true - When save is called, the resulting edit will be marked as "minor".
* false - When save is called, the resulting edit will not be marked as "minor". (default)
*
* setBotEdit(botEdit)
* botEdit is a boolean value:
* true - When save is called, the resulting edit will be marked as "bot".
* false - When save is called, the resulting edit will not be marked as "bot". (default)
*
* setPageSection(pageSection)
* pageSection - integer specifying the section number to load or save. The default is |null|, which means
* that the entire page will be retrieved.
*
* setMaxConflictRetries(maxRetries)
* maxRetries - number of retries for save errors involving an edit conflict or loss of edit token
* default: 2
*
* setMaxRetries(maxRetries)
* maxRetries - number of retries for save errors not involving an edit conflict or loss of edit token
* default: 2
*
* setCallbackParameters(callbackParameters)
* callbackParameters - an object for use in a callback function
*
* getCallbackParameters(): returns the object previous set by setCallbackParameters()
*
* Callback notes: callbackParameters is for use by the caller only. The parameters
* allow a caller to pass the proper context into its callback function.
* Callers must ensure that any changes to the callbackParameters object
* within a load() callback still permit a proper re-entry into the
* load() callback if an edit conflict is detected upon calling save().
*
* getStatusElement(): returns the Status element created by the constructor
*
* setFollowRedirect(followRedirect)
* followRedirect is a boolean value:
* true - a maximum of one redirect will be followed.
* In the event of a redirect, a message is displayed to the user and
* the redirect target can be retrieved with getPageName().
* false - the requested pageName will be used without regard to any redirect. (default)
*
* setWatchlist(watchlistOption)
* watchlistOption is a boolean value:
* true - page will be added to the user's watchlist when save() is called
* false - watchlist status of the page will not be changed (default)
*
* setWatchlistFromPreferences(watchlistOption)
* watchlistOption is a boolean value:
* true - page watchlist status will be set based on the user's
* preference settings when save() is called
* false - watchlist status of the page will not be changed (default)
*
* Watchlist notes:
* 1. The MediaWiki API value of 'unwatch', which explicitly removes the page from the
* user's watchlist, is not used.
* 2. If both setWatchlist() and setWatchlistFromPreferences() are called,
* the last call takes priority.
* 3. Twinkle modules should use the appropriate preference to set the watchlist options.
* 4. Most Twinkle modules use setWatchlist().
* setWatchlistFromPreferences() is only needed for the few Twinkle watchlist preferences
* that accept a string value of 'default'.
*
* setCreateOption(createOption)
* createOption is a string value:
* 'recreate' - create the page if it does not exist, or edit it if it exists
* 'createonly' - create the page if it does not exist, but return an error if it
* already exists
* 'nocreate' - don't create the page, only edit it if it already exists
* null - create the page if it does not exist, unless it was deleted in the moment
* between retrieving the edit token and saving the edit (default)
*
* exists(): returns true if the page existed on the wiki when it was last loaded
*
* lookupCreator(onSuccess): Retrieves the username of the user who created the page
* onSuccess - callback function which is called when the username is found
* within the callback, the username can be retrieved using the getCreator() function
*
* getCreator(): returns the user who created the page following lookupCreator()
*
* getCurrentID(): returns a string containing the current revision ID of the page
*
* patrol(): marks the page as patrolled, if possible
*
* move(onSuccess, onFailure): Moves a page to another title
*
* deletePage(onSuccess, onFailure): Deletes a page (for admins only)
*
*/
/**
* Call sequence for common operations (optional final user callbacks not shown):
*
* Edit current contents of a page (no edit conflict):
* .load(userTextEditCallback) -> ctx.loadApi.post() -> ctx.loadApi.post.success() ->
* ctx.fnLoadSuccess() -> userTextEditCallback() -> .save() ->
* ctx.saveApi.post() -> ctx.loadApi.post.success() -> ctx.fnSaveSuccess()
*
* Edit current contents of a page (with edit conflict):
* .load(userTextEditCallback) -> ctx.loadApi.post() -> ctx.loadApi.post.success() ->
* ctx.fnLoadSuccess() -> userTextEditCallback() -> .save() ->
* ctx.saveApi.post() -> ctx.loadApi.post.success() -> ctx.fnSaveError() ->
* ctx.loadApi.post() -> ctx.loadApi.post.success() ->
* ctx.fnLoadSuccess() -> userTextEditCallback() -> .save() ->
* ctx.saveApi.post() -> ctx.loadApi.post.success() -> ctx.fnSaveSuccess()
*
* Append to a page (similar for prepend):
* .append() -> ctx.loadApi.post() -> ctx.loadApi.post.success() ->
* ctx.fnLoadSuccess() -> ctx.fnAutoSave() -> .save() ->
* ctx.saveApi.post() -> ctx.loadApi.post.success() -> ctx.fnSaveSuccess()
*
* Notes:
* 1. All functions following Morebits.wiki.api.post() are invoked asynchronously
* from the jQuery AJAX library.
* 2. The sequence for append/prepend could be slightly shortened, but it would require
* significant duplication of code for little benefit.
*/
Morebits.wiki.page = function(pageName, currentAction) {
if (!currentAction) {
currentAction = 'Opening page "' + pageName + '"';
}
/**
* Private context variables
*
* This context is not visible to the outside, thus all the data here
* must be accessed via getter and setter functions.
*/
var ctx = {
// backing fields for public properties
pageName: pageName,
pageExists: false,
editSummary: null,
callbackParameters: null,
statusElement: new Morebits.status(currentAction),
// - edit
pageText: null,
editMode: 'all', // save() replaces entire contents of the page by default
appendText: null, // can't reuse pageText for this because pageText is needed to follow a redirect
prependText: null, // can't reuse pageText for this because pageText is needed to follow a redirect
createOption: null,
minorEdit: false,
botEdit: false,
pageSection: null,
maxConflictRetries: 2,
maxRetries: 2,
followRedirect: false,
watchlistOption: 'nochange',
creator: null,
// - revert
revertOldID: null,
// - move
moveDestination: null,
moveTalkPage: false,
moveSubpages: false,
moveSuppressRedirect: false,
// - protect
protectEdit: null,
protectMove: null,
protectCreate: null,
protectCascade: false,
// - stabilize (FlaggedRevs)
flaggedRevs: null,
// internal status
pageLoaded: false,
editToken: null,
loadTime: null,
lastEditTime: null,
revertCurID: null,
revertUser: null,
fullyProtected: false,
suppressProtectWarning: false,
conflictRetries: 0,
retries: 0,
// callbacks
onLoadSuccess: null,
onLoadFailure: null,
onSaveSuccess: null,
onSaveFailure: null,
onLookupCreatorSuccess: null,
onMoveSuccess: null,
onMoveFailure: null,
onDeleteSuccess: null,
onDeleteFailure: null,
onProtectSuccess: null,
onProtectFailure: null,
onStabilizeSuccess: null,
onStabilizeFailure: null,
// internal objects
loadQuery: null,
loadApi: null,
saveApi: null,
lookupCreatorApi: null,
moveApi: null,
moveProcessApi: null,
deleteApi: null,
deleteProcessApi: null,
protectApi: null,
protectProcessApi: null,
stabilizeApi: null,
stabilizeProcessApi: null
};
var emptyFunction = function() { };
/**
* Public interface accessors
*/
this.getPageName = function() {
return ctx.pageName;
};
this.getPageText = function() {
return ctx.pageText;
};
this.setPageText = function(pageText) {
ctx.editMode = 'all';
ctx.pageText = pageText;
};
this.setAppendText = function(appendText) {
ctx.editMode = 'append';
ctx.appendText = appendText;
};
this.setPrependText = function(prependText) {
ctx.editMode = 'prepend';
ctx.prependText = prependText;
};
this.setEditSummary = function(summary) {
ctx.editSummary = summary;
};
this.setCreateOption = function(createOption) {
ctx.createOption = createOption;
};
this.setMinorEdit = function(minorEdit) {
ctx.minorEdit = minorEdit;
};
this.setBotEdit = function(botEdit) {
ctx.botEdit = botEdit;
};
this.setPageSection = function(pageSection) {
ctx.pageSection = pageSection;
};
this.setMaxConflictRetries = function(maxRetries) {
ctx.maxConflictRetries = maxRetries;
};
this.setMaxRetries = function(maxRetries) {
ctx.maxRetries = maxRetries;
};
this.setCallbackParameters = function(callbackParameters) {
ctx.callbackParameters = callbackParameters;
};
this.getCallbackParameters = function() {
return ctx.callbackParameters;
};
this.getCreator = function() {
return ctx.creator;
};
this.setOldID = function(oldID) {
ctx.revertOldID = oldID;
};
this.getCurrentID = function() {
return ctx.revertCurID;
};
this.getRevisionUser = function() {
return ctx.revertUser;
};
this.setMoveDestination = function(destination) {
ctx.moveDestination = destination;
};
this.setMoveTalkPage = function(flag) {
ctx.moveTalkPage = !!flag;
};
this.setMoveSubpages = function(flag) {
ctx.moveSubpages = !!flag;
};
this.setMoveSuppressRedirect = function(flag) {
ctx.moveSuppressRedirect = !!flag;
};
this.setEditProtection = function(level, expiry) {
ctx.protectEdit = { level: level, expiry: expiry };
};
this.setMoveProtection = function(level, expiry) {
ctx.protectMove = { level: level, expiry: expiry };
};
this.setCreateProtection = function(level, expiry) {
ctx.protectCreate = { level: level, expiry: expiry };
};
this.setCascadingProtection = function(flag) {
ctx.protectCascade = !!flag;
};
this.setFlaggedRevs = function(level, expiry) {
ctx.flaggedRevs = { level: level, expiry: expiry };
};
this.getStatusElement = function() {
return ctx.statusElement;
};
this.setFollowRedirect = function(followRedirect) {
if (ctx.pageLoaded) {
ctx.statusElement.error("Internal error: cannot change redirect setting after the page has been loaded!");
return;
}
ctx.followRedirect = followRedirect;
};
this.setWatchlist = function(flag) {
if (flag) {
ctx.watchlistOption = 'watch';
} else {
ctx.watchlistOption = 'nochange';
}
};
this.setWatchlistFromPreferences = function(flag) {
if (flag) {
ctx.watchlistOption = 'preferences';
} else {
ctx.watchlistOption = 'nochange';
}
};
this.suppressProtectWarning = function() {
ctx.suppressProtectWarning = true;
};
this.exists = function() {
return ctx.pageExists;
};
this.load = function(onSuccess, onFailure) {
ctx.onLoadSuccess = onSuccess;
ctx.onLoadFailure = onFailure || emptyFunction;
// Need to be able to do something after the page loads
if (!onSuccess) {
ctx.statusElement.error("Internal error: no onSuccess callback provided to load()!");
ctx.onLoadFailure(this);
return;
}
ctx.loadQuery = {
action: 'query',
prop: 'info|revisions',
intoken: 'edit', // fetch an edit token
titles: ctx.pageName
// don't need rvlimit=1 because we don't need rvstartid here and only one actual rev is returned by default
};
if (ctx.editMode === 'all') {
ctx.loadQuery.rvprop = 'content|timestamp'; // get the page content at the same time, if needed
} else if (ctx.editMode === 'revert') {
ctx.loadQuery.rvprop = 'timestamp';
ctx.loadQuery.rvlimit = 1;
ctx.loadQuery.rvstartid = ctx.revertOldID;
}
if (ctx.followRedirect) {
ctx.loadQuery.redirects = ''; // follow all redirects
}
if (typeof ctx.pageSection === 'number') {
ctx.loadQuery.rvsection = ctx.pageSection;
}
if (Morebits.userIsInGroup('sysop')) {
ctx.loadQuery.inprop = 'protection';
}
ctx.loadApi = new Morebits.wiki.api("Retrieving page...", ctx.loadQuery, fnLoadSuccess, ctx.statusElement, ctx.onLoadFailure);
ctx.loadApi.setParent(this);
ctx.loadApi.post();
};
// Save updated .pageText to Wikipedia
// Only valid after successful .load()
this.save = function(onSuccess, onFailure) {
ctx.onSaveSuccess = onSuccess;
ctx.onSaveFailure = onFailure || emptyFunction;
if (!ctx.pageLoaded) {
ctx.statusElement.error("Internal error: attempt to save a page that has not been loaded!");
ctx.onSaveFailure(this);
return;
}
if (!ctx.editSummary) {
ctx.statusElement.error("Internal error: edit summary not set before save!");
ctx.onSaveFailure(this);
return;
}
if (ctx.fullyProtected && !ctx.suppressProtectWarning &&
!confirm('You are about to make an edit to the fully protected page "' + ctx.pageName +
(ctx.fullyProtected === 'infinity' ? '" (protected indefinitely)' : ('" (protection expiring ' + ctx.fullyProtected + ')')) +
'. \n\nClick OK to proceed with the edit, or Cancel to skip this edit.')) {
ctx.statusElement.error("Edit to fully protected page was aborted.");
ctx.onSaveFailure(this);
return;
}
ctx.retries = 0;
var query = {
action: 'edit',
title: ctx.pageName,
summary: ctx.editSummary,
token: ctx.editToken,
watchlist: ctx.watchlistOption
};
if (typeof ctx.pageSection === 'number') {
query.section = ctx.pageSection;
}
// Set minor edit attribute. If these parameters are present with any value, it is interpreted as true
if (ctx.minorEdit) {
query.minor = true;
} else {
query.notminor = true; // force Twinkle config to override user preference setting for "all edits are minor"
}
// Set bot edit attribute. If this paramter is present with any value, it is interpreted as true
if (ctx.botEdit) {
query.bot = true;
}
switch (ctx.editMode) {
case 'append':
query.appendtext = ctx.appendText; // use mode to append to current page contents
break;
case 'prepend':
query.prependtext = ctx.prependText; // use mode to prepend to current page contents
break;
case 'revert':
query.undo = ctx.revertCurID;
query.undoafter = ctx.revertOldID;
if (ctx.lastEditTime) {
query.basetimestamp = ctx.lastEditTime; // check that page hasn't been edited since it was loaded
}
query.starttimestamp = ctx.loadTime; // check that page hasn't been deleted since it was loaded (don't recreate bad stuff)
break;
default:
query.text = ctx.pageText; // replace entire contents of the page
if (ctx.lastEditTime) {
query.basetimestamp = ctx.lastEditTime; // check that page hasn't been edited since it was loaded
}
query.starttimestamp = ctx.loadTime; // check that page hasn't been deleted since it was loaded (don't recreate bad stuff)
break;
}
if (['recreate', 'createonly', 'nocreate'].indexOf(ctx.createOption) !== -1) {
query[ctx.createOption] = '';
}
ctx.saveApi = new Morebits.wiki.api( "Saving page...", query, fnSaveSuccess, ctx.statusElement, fnSaveError);
ctx.saveApi.setParent(this);
ctx.saveApi.post();
};
this.append = function(onSuccess, onFailure) {
ctx.editMode = 'append';
ctx.onSaveSuccess = onSuccess;
ctx.onSaveFailure = onFailure || emptyFunction;
this.load(fnAutoSave, ctx.onSaveFailure);
};
this.prepend = function(onSuccess, onFailure) {
ctx.editMode = 'prepend';
ctx.onSaveSuccess = onSuccess;
ctx.onSaveFailure = onFailure || emptyFunction;
this.load(fnAutoSave, ctx.onSaveFailure);
};
this.lookupCreator = function(onSuccess) {
if (!onSuccess) {
ctx.statusElement.error("Internal error: no onSuccess callback provided to lookupCreator()!");
return;
}
ctx.onLookupCreatorSuccess = onSuccess;
var query = {
'action': 'query',
'prop': 'revisions',
'titles': ctx.pageName,
'rvlimit': 1,
'rvprop': 'user',
'rvdir': 'newer'
};
if (ctx.followRedirect) {
query.redirects = ''; // follow all redirects
}
ctx.lookupCreatorApi = new Morebits.wiki.api("Retrieving page creator information", query, fnLookupCreatorSuccess, ctx.statusElement);
ctx.lookupCreatorApi.setParent(this);
ctx.lookupCreatorApi.post();
};
this.patrol = function() {
// There's no patrol link on page, so we can't patrol
if ( !$( '.patrollink' ).length ) {
return;
}
// Extract the rcid token from the "Mark page as patrolled" link on page
var patrolhref = $( '.patrollink a' ).attr( 'href' ),
rcid = mw.util.getParamValue( 'rcid', patrolhref );
if ( rcid ) {
var patrolstat = new Morebits.status( 'Marking page as patrolled' );
var wikipedia_api = new Morebits.wiki.api( 'doing...', {
action: 'patrol',
rcid: rcid,
token: mw.user.tokens.get( 'patrolToken' )
}, null, patrolstat );
// We don't really care about the response
wikipedia_api.post();
}
};
this.revert = function(onSuccess, onFailure) {
ctx.onSaveSuccess = onSuccess;
ctx.onSaveFailure = onFailure || emptyFunction;
if (!ctx.revertOldID) {
ctx.statusElement.error("Internal error: revision ID to revert to was not set before revert!");
ctx.onSaveFailure(this);
return;
}
ctx.editMode = 'revert';
this.load(fnAutoSave, ctx.onSaveFailure);
};
this.move = function(onSuccess, onFailure) {
ctx.onMoveSuccess = onSuccess;
ctx.onMoveFailure = onFailure || emptyFunction;
if (!ctx.editSummary) {
ctx.statusElement.error("Internal error: move reason not set before move (use setEditSummary function)!");
ctx.onMoveFailure(this);
return;
}
if (!ctx.moveDestination) {
ctx.statusElement.error("Internal error: destination page name was not set before move!");
ctx.onMoveFailure(this);
return;
}
var query = {
action: 'query',
prop: 'info',
intoken: 'move',
titles: ctx.pageName
};
if (ctx.followRedirect) {
query.redirects = ''; // follow all redirects
}
if (Morebits.userIsInGroup('sysop')) {
query.inprop = 'protection';
}
ctx.moveApi = new Morebits.wiki.api("retrieving move token...", query, fnProcessMove, ctx.statusElement, ctx.onMoveFailure);
ctx.moveApi.setParent(this);
ctx.moveApi.post();
};
// |delete| is a reserved word in some flavours of JS
this.deletePage = function(onSuccess, onFailure) {
ctx.onDeleteSuccess = onSuccess;
ctx.onDeleteFailure = onFailure || emptyFunction;
// if a non-admin tries to do this, don't bother
if (!Morebits.userIsInGroup('sysop')) {
ctx.statusElement.error("Cannot delete page: only admins can do that");
ctx.onDeleteFailure(this);
return;
}
if (!ctx.editSummary) {
ctx.statusElement.error("Internal error: delete reason not set before delete (use setEditSummary function)!");
ctx.onDeleteFailure(this);
return;
}
var query = {
action: 'query',
prop: 'info',
inprop: 'protection',
intoken: 'delete',
titles: ctx.pageName
};
if (ctx.followRedirect) {
query.redirects = ''; // follow all redirects
}
ctx.deleteApi = new Morebits.wiki.api("retrieving delete token...", query, fnProcessDelete, ctx.statusElement, ctx.onDeleteFailure);
ctx.deleteApi.setParent(this);
ctx.deleteApi.post();
};
this.protect = function(onSuccess, onFailure) {
ctx.onProtectSuccess = onSuccess;
ctx.onProtectFailure = onFailure || emptyFunction;
// if a non-admin tries to do this, don't bother
if (!Morebits.userIsInGroup('sysop')) {
ctx.statusElement.error("Cannot protect page: only admins can do that");
ctx.onProtectFailure(this);
return;
}
if (!ctx.protectEdit && !ctx.protectMove && !ctx.protectCreate) {
ctx.statusElement.error("Internal error: you must set edit and/or move and/or create protection before calling protect()!");
ctx.onProtectFailure(this);
return;
}
if (!ctx.editSummary) {
ctx.statusElement.error("Internal error: protection reason not set before protect (use setEditSummary function)!");
ctx.onProtectFailure(this);
return;
}
var query = {
action: 'query',
prop: 'info',
inprop: 'protection',
intoken: 'protect',
titles: ctx.pageName,
watchlist: ctx.watchlistOption
};
if (ctx.followRedirect) {
query.redirects = ''; // follow all redirects
}
ctx.protectApi = new Morebits.wiki.api("retrieving protect token...", query, fnProcessProtect, ctx.statusElement, ctx.onProtectFailure);
ctx.protectApi.setParent(this);
ctx.protectApi.post();
};
// apply FlaggedRevs protection-style settings
// only works where $wgFlaggedRevsProtection = true (i.e. where FlaggedRevs
// settings appear on the wiki's "protect" tab)
this.stabilize = function(onSuccess, onFailure) {
ctx.onStabilizeSuccess = onSuccess;
ctx.onStabilizeFailure = onFailure || emptyFunction;
// if a non-admin tries to do this, don't bother
if (!Morebits.userIsInGroup('sysop')) {
ctx.statusElement.error("Cannot apply FlaggedRevs settings: only admins can do that");
ctx.onStabilizeFailure(this);
return;
}
if (!ctx.flaggedRevs) {
ctx.statusElement.error("Internal error: you must set flaggedRevs before calling stabilize()!");
ctx.onStabilizeFailure(this);
return;
}
if (!ctx.editSummary) {
ctx.statusElement.error("Internal error: reason not set before calling stabilize() (use setEditSummary function)!");
ctx.onStabilizeFailure(this);
return;
}
var query = {
action: 'query',
prop: 'info|flagged',
intoken: 'edit',
titles: ctx.pageName
};
if (ctx.followRedirect) {
query.redirects = ''; // follow all redirects
}
ctx.stabilizeApi = new Morebits.wiki.api("retrieving stabilize token...", query, fnProcessStabilize, ctx.statusElement, ctx.onStabilizeFailure);
ctx.stabilizeApi.setParent(this);
ctx.stabilizeApi.post();
};
/**
* Private member functions
*
* These are not exposed outside
*/
// callback from loadSuccess() for append() and prepend() threads
var fnAutoSave = function(pageobj) {
pageobj.save(ctx.onSaveSuccess, ctx.onSaveFailure);
};
// callback from loadApi.post()
var fnLoadSuccess = function() {
var xml = ctx.loadApi.getXML();
if ( !fnCheckPageName(xml, ctx.onLoadFailure) ) {
return; // abort
}
ctx.pageExists = ($(xml).find('page').attr('missing') !== "");
if (ctx.pageExists) {
ctx.pageText = $(xml).find('rev').text();
} else {
ctx.pageText = ''; // allow for concatenation, etc.
}
// extract protection info, to alert admins when they are about to edit a protected page
if (Morebits.userIsInGroup('sysop')) {
var editprot = $(xml).find('pr[type="edit"]');
if (editprot.length > 0 && editprot.attr('level') === 'sysop') {
ctx.fullyProtected = editprot.attr('expiry');
} else {
ctx.fullyProtected = false;
}
}
ctx.editToken = $(xml).find('page').attr('edittoken');
if (!ctx.editToken) {
ctx.statusElement.error("Failed to retrieve edit token.");
ctx.onLoadFailure(this);
return;
}
ctx.loadTime = $(xml).find('page').attr('starttimestamp');
if (!ctx.loadTime) {
ctx.statusElement.error("Failed to retrieve start timestamp.");
ctx.onLoadFailure(this);
return;
}
ctx.lastEditTime = $(xml).find('rev').attr('timestamp');
ctx.revertCurID = $(xml).find('page').attr('lastrevid');
if (ctx.editMode === 'revert') {
ctx.revertCurID = $(xml).find('rev').attr('revid');
if (!ctx.revertCurID) {
ctx.statusElement.error("Failed to retrieve current revision ID.");
ctx.onLoadFailure(this);
return;
}
ctx.revertUser = $(xml).find('rev').attr('user');
if (!ctx.revertUser) {
if ($(xml).find('rev').attr('userhidden') === "") { // username was RevDel'd or oversighted
ctx.revertUser = "<username hidden>";
} else {
ctx.statusElement.error("Failed to retrieve user who made the revision.");
ctx.onLoadFailure(this);
return;
}
}
// set revert edit summary
ctx.editSummary = "[[Help:Revert|Reverted]] to revision " + ctx.revertOldID + " by " + ctx.revertUser + ": " + ctx.editSummary;
}
ctx.pageLoaded = true;
// alert("Generate edit conflict now"); // for testing edit conflict recovery logic
ctx.onLoadSuccess(this); // invoke callback
};
// helper function to parse the page name returned from the API
var fnCheckPageName = function(xml, onFailure) {
if (!onFailure) {
onFailure = emptyFunction;
}
// check for invalid titles
if ( $(xml).find('page').attr('invalid') === "" ) {
ctx.statusElement.error("The page title is invalid: " + ctx.pageName);
onFailure(this);
return false; // abort
}
// retrieve actual title of the page after normalization and redirects
if ( $(xml).find('page').attr('title') ) {
var resolvedName = $(xml).find('page').attr('title');
// only notify user for redirects, not normalization
if ( $(xml).find('redirects').length > 0 ) {
Morebits.status.info("Info", "Redirected from " + ctx.pageName + " to " + resolvedName );
}
ctx.pageName = resolvedName; // always update in case of normalization
}
else {
// could be a circular redirect or other problem
ctx.statusElement.error("Could not resolve redirects for: " + ctx.pageName);
onFailure(this);
// force error to stay on the screen
++Morebits.wiki.numberOfActionsLeft;
return false; // abort
}
return true; // all OK
};
// callback from saveApi.post()
var fnSaveSuccess = function() {
ctx.editMode = 'all'; // cancel append/prepend/revert modes
var xml = ctx.saveApi.getXML();
// see if the API thinks we were successful
if ($(xml).find('edit').attr('result') === "Success") {
// real success
// default on success action - display link for edited page
var link = document.createElement('a');
link.setAttribute('href', mw.util.getUrl(ctx.pageName) );
link.appendChild(document.createTextNode(ctx.pageName));
ctx.statusElement.info(['completed (', link, ')']);
if (ctx.onSaveSuccess) {
ctx.onSaveSuccess(this); // invoke callback
}
return;
}
// errors here are only generated by extensions which hook APIEditBeforeSave within MediaWiki
// Wikimedia wikis should only return spam blacklist errors, captchas, and AbuseFilter messages
var $editNode = $(xml).find('edit');
var blacklist = $editNode.attr('spamblacklist');
if (blacklist) {
var code = document.createElement('code');
code.style.fontFamily = "monospace";
code.appendChild(document.createTextNode(blacklist));
ctx.statusElement.error(['Could not save the page because the URL ', code, ' is on the spam blacklist.']);
} else if ( $(xml).find('captcha').length > 0 ) {
ctx.statusElement.error("Could not save the page because the wiki server wanted you to fill out a CAPTCHA.");
} else if ( $editNode.attr('code') === 'abusefilter-disallowed' ) {
ctx.statusElement.error('The edit was disallowed by the edit filter rule "' + $editNode.attr('info').substring(17) + '".');
} else if ( $editNode.attr('info').indexOf('Hit AbuseFilter:') === 0 ) {
var div = document.createElement('div');
div.className = "toccolours";
div.style.fontWeight = "normal";
div.style.color = "black";
div.innerHTML = $editNode.attr('warning');
ctx.statusElement.error([ 'The following warning was returned by the edit filter: ', div, 'If you wish to proceed with the edit, please carry it out again. This warning wil not appear a second time.' ]);
// XXX provide the user with a way to automatically retry the action if they so choose -
// I can't see how to do this without creating a UI dependency on Morebits.wiki.page though -- TTO
} else {
ctx.statusElement.error("Unknown error received from API while saving page");
}
// force error to stay on the screen
++Morebits.wiki.numberOfActionsLeft;
ctx.onSaveFailure(this);
};
// callback from saveApi.post()
var fnSaveError = function() {
var errorCode = ctx.saveApi.getErrorCode();
// check for edit conflict
if ( errorCode === "editconflict" && ctx.conflictRetries++ < ctx.maxConflictRetries ) {
// edit conflicts can occur when the page needs to be purged from the server cache
var purgeQuery = {
action: 'purge',
titles: ctx.pageName // redirects are already resolved
};
var purgeApi = new Morebits.wiki.api("Edit conflict detected, purging server cache", purgeQuery, null, ctx.statusElement);
var result = purgeApi.post( { async: false } ); // just wait for it, result is for debugging
--Morebits.wiki.numberOfActionsLeft; // allow for normal completion if retry succeeds
ctx.statusElement.info("Edit conflict detected, reapplying edit");
ctx.loadApi.post(); // reload the page and reapply the edit
// check for loss of edit token
// it's impractical to request a new token here, so invoke edit conflict logic when this happens
} else if ( errorCode === "notoken" && ctx.conflictRetries++ < ctx.maxConflictRetries ) {
ctx.statusElement.info("Edit token is invalid, retrying");
--Morebits.wiki.numberOfActionsLeft; // allow for normal completion if retry succeeds
ctx.loadApi.post(); // reload
// check for network or server error
} else if ( errorCode === "undefined" && ctx.retries++ < ctx.maxRetries ) {
// the error might be transient, so try again
ctx.statusElement.info("Save failed, retrying");
--Morebits.wiki.numberOfActionsLeft; // allow for normal completion if retry succeeds
ctx.saveApi.post(); // give it another go!
// hard error, give up
} else {
// non-admin attempting to edit a protected page - this gives a friendlier message than the default
if ( errorCode === "protectedpage" ) {
ctx.statusElement.error( "Failed to save edit: Page is fully protected" );
} else {
ctx.statusElement.error( "Failed to save edit: " + ctx.saveApi.getErrorText() );
}
ctx.editMode = 'all'; // cancel append/prepend/revert modes
if (ctx.onSaveFailure) {
ctx.onSaveFailure(this); // invoke callback
}
}
};
var fnLookupCreatorSuccess = function() {
var xml = ctx.lookupCreatorApi.getXML();
if ( !fnCheckPageName(xml) ) {
return; // abort
}
ctx.creator = $(xml).find('rev').attr('user');
if (!ctx.creator) {
ctx.statusElement.error("Could not find name of page creator");
return;
}
ctx.onLookupCreatorSuccess(this);
};
var fnProcessMove = function() {
var xml = ctx.moveApi.getXML();
if ($(xml).find('page').attr('missing') === "") {
ctx.statusElement.error("Cannot move the page, because it no longer exists");
ctx.onMoveFailure(this);
return;
}
// extract protection info
if (Morebits.userIsInGroup('sysop')) {
var editprot = $(xml).find('pr[type="edit"]');
if (editprot.length > 0 && editprot.attr('level') === 'sysop' && !ctx.suppressProtectWarning &&
!confirm('You are about to move the fully protected page "' + ctx.pageName +
(editprot.attr('expiry') === 'infinity' ? '" (protected indefinitely)' : ('" (protection expiring ' + editprot.attr('expiry') + ')')) +
'. \n\nClick OK to proceed with the move, or Cancel to skip this move.')) {
ctx.statusElement.error("Move of fully protected page was aborted.");
ctx.onMoveFailure(this);
return;
}
}
var moveToken = $(xml).find('page').attr('movetoken');
if (!moveToken) {
ctx.statusElement.error("Failed to retrieve move token.");
ctx.onMoveFailure(this);
return;
}
var query = {
'action': 'move',
'from': $(xml).find('page').attr('title'),
'to': ctx.moveDestination,
'token': moveToken,
'reason': ctx.editSummary
};
if (ctx.moveTalkPage) {
query.movetalk = 'true';
}
if (ctx.moveSubpages) {
query.movesubpages = 'true'; // XXX don't know whether this works for non-admins
}
if (ctx.moveSuppressRedirect) {
query.noredirect = 'true';
}
if (ctx.watchlistOption === 'watch') {
query.watch = 'true';
}
ctx.moveProcessApi = new Morebits.wiki.api("moving page...", query, ctx.onMoveSuccess, ctx.statusElement, ctx.onMoveFailure);
ctx.moveProcessApi.setParent(this);
ctx.moveProcessApi.post();
};
var fnProcessDelete = function() {
var xml = ctx.deleteApi.getXML();
if ($(xml).find('page').attr('missing') === "") {
ctx.statusElement.error("Cannot delete the page, because it no longer exists");
ctx.onDeleteFailure(this);
return;
}
// extract protection info
var editprot = $(xml).find('pr[type="edit"]');
if (editprot.length > 0 && editprot.attr('level') === 'sysop' && !ctx.suppressProtectWarning &&
!confirm('You are about to delete the fully protected page "' + ctx.pageName +
(editprot.attr('expiry') === 'infinity' ? '" (protected indefinitely)' : ('" (protection expiring ' + editprot.attr('expiry') + ')')) +
'. \n\nClick OK to proceed with the deletion, or Cancel to skip this deletion.')) {
ctx.statusElement.error("Deletion of fully protected page was aborted.");
ctx.onDeleteFailure(this);
return;
}
var deleteToken = $(xml).find('page').attr('deletetoken');
if (!deleteToken) {
ctx.statusElement.error("Failed to retrieve delete token.");
ctx.onDeleteFailure(this);
return;
}
var query = {
'action': 'delete',
'title': $(xml).find('page').attr('title'),
'token': deleteToken,
'reason': ctx.editSummary
};
if (ctx.watchlistOption === 'watch') {
query.watch = 'true';
}
ctx.deleteProcessApi = new Morebits.wiki.api("deleting page...", query, ctx.onDeleteSuccess, ctx.statusElement, fnProcessDeleteError);
ctx.deleteProcessApi.setParent(this);
ctx.deleteProcessApi.post();
};
// callback from deleteProcessApi.post()
var fnProcessDeleteError = function() {
var errorCode = ctx.deleteProcessApi.getErrorCode();
// check for "Database query error"
if ( errorCode === "internal_api_error_DBQueryError" && ctx.retries++ < ctx.maxRetries ) {
ctx.statusElement.info("Database query error, retrying");
--Morebits.wiki.numberOfActionsLeft; // allow for normal completion if retry succeeds
ctx.deleteProcessApi.post(); // give it another go!
// hard error, give up
} else {
ctx.statusElement.error( "Failed to delete the page: " + ctx.deleteProcessApi.getErrorText() );
if (ctx.onDeleteFailure) {
ctx.onDeleteFailure.call(this, ctx.deleteProcessApi); // invoke callback
}
}
};
var fnProcessProtect = function() {
var xml = ctx.protectApi.getXML();
var missing = ($(xml).find('page').attr('missing') === "");
if (((ctx.protectEdit || ctx.protectMove) && missing)) {
ctx.statusElement.error("Cannot protect the page, because it no longer exists");
ctx.onProtectFailure(this);
return;
}
if (ctx.protectCreate && !missing) {
ctx.statusElement.error("Cannot create protect the page, because it already exists");
ctx.onProtectFailure(this);
return;
}
// TODO cascading protection not possible on edit<sysop
var protectToken = $(xml).find('page').attr('protecttoken');
if (!protectToken) {
ctx.statusElement.error("Failed to retrieve protect token.");
ctx.onProtectFailure(this);
return;
}
// fetch existing protection levels
var prs = $(xml).find('pr');
var editprot = prs.filter('[type="edit"]');
var moveprot = prs.filter('[type="move"]');
var createprot = prs.filter('[type="create"]');
var protections = [], expirys = [];
// set edit protection level
if (ctx.protectEdit) {
protections.push('edit=' + ctx.protectEdit.level);
expirys.push(ctx.protectEdit.expiry);
} else if (editprot.length) {
protections.push('edit=' + editprot.attr("level"));
expirys.push(editprot.attr("expiry").replace("infinity", "indefinite"));
}
if (ctx.protectMove) {
protections.push('move=' + ctx.protectMove.level);
expirys.push(ctx.protectMove.expiry);
} else if (moveprot.length) {
protections.push('move=' + moveprot.attr("level"));
expirys.push(moveprot.attr("expiry").replace("infinity", "indefinite"));
}
if (ctx.protectCreate) {
protections.push('create=' + ctx.protectCreate.level);
expirys.push(ctx.protectCreate.expiry);
} else if (createprot.length) {
protections.push('create=' + createprot.attr("level"));
expirys.push(createprot.attr("expiry").replace("infinity", "indefinite"));
}
var query = {
action: 'protect',
title: $(xml).find('page').attr('title'),
token: protectToken,
protections: protections.join('|'),
expiry: expirys.join('|'),
reason: ctx.editSummary
};
if (ctx.protectCascade) {
query.cascade = 'true';
}
if (ctx.watchlistOption === 'watch') {
query.watch = 'true';
}
ctx.protectProcessApi = new Morebits.wiki.api("protecting page...", query, ctx.onProtectSuccess, ctx.statusElement, ctx.onProtectFailure);
ctx.protectProcessApi.setParent(this);
ctx.protectProcessApi.post();
};
var fnProcessStabilize = function() {
var xml = ctx.stabilizeApi.getXML();
var missing = ($(xml).find('page').attr('missing') === "");
if (missing) {
ctx.statusElement.error("Cannot protect the page, because it no longer exists");
ctx.onStabilizeFailure(this);
return;
}
var stabilizeToken = $(xml).find('page').attr('edittoken');
if (!stabilizeToken) {
ctx.statusElement.error("Failed to retrieve stabilize token.");
ctx.onStabilizeFailure(this);
return;
}
var query = {
action: 'stabilize',
title: $(xml).find('page').attr('title'),
token: stabilizeToken,
protectlevel: ctx.flaggedRevs.level,
expiry: ctx.flaggedRevs.expiry,
reason: ctx.editSummary
};
if (ctx.watchlistOption === 'watch') {
query.watch = 'true';
}
ctx.stabilizeProcessApi = new Morebits.wiki.api("configuring stabilization settings...", query, ctx.onStabilizeSuccess, ctx.statusElement, ctx.onStabilizeFailure);
ctx.stabilizeProcessApi.setParent(this);
ctx.stabilizeProcessApi.post();
};
}; // end Morebits.wiki.page
/** Morebits.wiki.page TODO: (XXX)
* - Should we retry loads also?
* - Need to reset current action before the save?
* - Deal with action.completed stuff
* - Need to reset all parameters once done (e.g. edit summary, move destination, etc.)
*/
/**
* **************** Morebits.wiki.preview ****************
* Uses the API to parse a fragment of wikitext and render it as HTML.
*
* Constructor: Morebits.wiki.preview(previewbox, currentAction)
* previewbox - the <div> element that will contain the rendered HTML
*
* beginRender(wikitext): Displays the preview box, and begins an asynchronous attempt
* to render the specified wikitext.
* wikitext - wikitext to render; most things should work, including subst: and ~~~~
*
* closePreview(): Hides the preview box and clears it.
*
* The suggested implementation pattern (in Morebits.simpleWindow + Morebits.quickForm situations) is to
* construct a Morebits.wiki.preview object after rendering a Morebits.quickForm, and bind the object
* to an arbitrary property of the form (e.g. |previewer|). For an example, see
* twinklewarn.js.
*/
Morebits.wiki.preview = function(previewbox) {
this.previewbox = previewbox;
$(previewbox).addClass("morebits-previewbox").hide();
this.beginRender = function(wikitext) {
$(previewbox).show();
var statusspan = document.createElement('span');
previewbox.appendChild(statusspan);
Morebits.status.init(statusspan);
var query = {
action: 'parse',
prop: 'text',
pst: 'true', // PST = pre-save transform; this makes substitution work properly
text: wikitext,
title: mw.config.get('wgPageName')
};
var renderApi = new Morebits.wiki.api("loading...", query, fnRenderSuccess, new Morebits.status("Preview"));
renderApi.post();
};
var fnRenderSuccess = function(apiobj) {
var xml = apiobj.getXML();
var html = $(xml).find('text').text();
if (!html) {
apiobj.statelem.error("failed to retrieve preview, or template was blanked");
return;
}
previewbox.innerHTML = html;
};
this.closePreview = function() {
$(previewbox).empty().hide();
};
};
/**
* **************** Morebits.wikitext ****************
* Wikitext manipulation
*/
Morebits.wikitext = {};
Morebits.wikitext.template = {
parse: function( text, start ) {
var count = -1;
var level = -1;
var equals = -1;
var current = '';
var result = {
name: '',
parameters: {}
};
var key, value;
for( var i = start; i < text.length; ++i ) {
var test3 = text.substr( i, 3 );
if( test3 === '{{{' ) {
current += '{{{';
i += 2;
++level;
continue;
}
if( test3 === '}}}' ) {
current += '}}}';
i += 2;
--level;
continue;
}
var test2 = text.substr( i, 2 );
if( test2 === '{{' || test2 === '[[' ) {
current += test2;
++i;
++level;
continue;
}
if( test2 === '[[' ) {
current += test2;
++i;
--level;
continue;
}
if( test2 === '}}' ) {
current += test2;
++i;
--level;
if( level <= 0 ) {
if( count === -1 ) {
result.name = current.substring(2).trim();
++count;
} else {
if( equals !== -1 ) {
key = current.substring( 0, equals ).trim();
value = current.substring( equals ).trim();
result.parameters[key] = value;
equals = -1;
} else {
result.parameters[count] = current;
++count;
}
}
break;
}
continue;
}
if( text.charAt(i) === '|' && level <= 0 ) {
if( count === -1 ) {
result.name = current.substring(2).trim();
++count;
} else {
if( equals !== -1 ) {
key = current.substring( 0, equals ).trim();
value = current.substring( equals + 1 ).trim();
result.parameters[key] = value;
equals = -1;
} else {
result.parameters[count] = current;
++count;
}
}
current = '';
} else if( equals === -1 && text.charAt(i) === '=' && level <= 0 ) {
equals = current.length;
current += text.charAt(i);
} else {
current += text.charAt(i);
}
}
return result;
}
};
Morebits.wikitext.page = function mediawikiPage( text ) {
this.text = text;
};
Morebits.wikitext.page.prototype = {
text: '',
removeLink: function( link_target ) {
var first_char = link_target.substr( 0, 1 );
var link_re_string = "[" + first_char.toUpperCase() + first_char.toLowerCase() + ']' + RegExp.escape( link_target.substr( 1 ), true );
var link_simple_re = new RegExp( "\\[\\[:?(" + link_re_string + ")\\]\\]", 'g' );
var link_named_re = new RegExp( "\\[\\[:?" + link_re_string + "\\|(.+?)\\]\\]", 'g' );
this.text = this.text.replace( link_simple_re, "$1" ).replace( link_named_re, "$1" );
},
commentOutImage: function( image, reason ) {
var unbinder = new Morebits.unbinder( this.text );
unbinder.unbind( '<!--', '-->' );
reason = reason ? (reason + ': ') : '';
var first_char = image.substr( 0, 1 );
var image_re_string = "[" + first_char.toUpperCase() + first_char.toLowerCase() + ']' + RegExp.escape( image.substr( 1 ), true );
/*
* Check for normal image links, i.e. [[Image:Foobar.png|...]]
* Will eat the whole link
*/
var links_re = new RegExp( "\\[\\[(?:[Ii]mage|[Ff]ile):\\s*" + image_re_string );
var allLinks = Morebits.array.uniq(Morebits.string.splitWeightedByKeys( unbinder.content, '[[', ']]' ));
for( var i = 0; i < allLinks.length; ++i ) {
if( links_re.test( allLinks[i] ) ) {
var replacement = '<!-- ' + reason + allLinks[i] + ' -->';
unbinder.content = unbinder.content.replace( allLinks[i], replacement, 'g' );
}
}
// unbind the newly created comments
unbinder.unbind( '<!--', '-->' );
/*
* Check for gallery images, i.e. instances that must start on a new line, eventually preceded with some space, and must include Image: prefix
* Will eat the whole line.
*/
var gallery_image_re = new RegExp( "(^\\s*(?:[Ii]mage|[Ff]ile):\\s*" + image_re_string + ".*?$)", 'mg' );
unbinder.content = unbinder.content.replace( gallery_image_re, "<!-- " + reason + "$1 -->" );
// unbind the newly created comments
unbinder.unbind( '<!--', '-->' );
/*
* Check free image usages, for example as template arguments, might have the Image: prefix excluded, but must be preceeded by an |
* Will only eat the image name and the preceeding bar and an eventual named parameter
*/
var free_image_re = new RegExp( "(\\|\\s*(?:[\\w\\s]+\\=)?\\s*(?:(?:[Ii]mage|[Ff]ile):\\s*)?" + image_re_string + ")", 'mg' );
unbinder.content = unbinder.content.replace( free_image_re, "<!-- " + reason + "$1 -->" );
// Rebind the content now, we are done!
this.text = unbinder.rebind();
},
addToImageComment: function( image, data ) {
var first_char = image.substr( 0, 1 );
var first_char_regex = RegExp.escape( first_char, true );
if( first_char.toUpperCase() !== first_char.toLowerCase() ) {
first_char_regex = '[' + RegExp.escape( first_char.toUpperCase(), true ) + RegExp.escape( first_char.toLowerCase(), true ) + ']';
}
var image_re_string = "(?:[Ii]mage|[Ff]ile):\\s*" + first_char_regex + RegExp.escape( image.substr( 1 ), true );
var links_re = new RegExp( "\\[\\[" + image_re_string );
var allLinks = Morebits.array.uniq(Morebits.string.splitWeightedByKeys( this.text, '[[', ']]' ));
for( var i = 0; i < allLinks.length; ++i ) {
if( links_re.test( allLinks[i] ) ) {
var replacement = allLinks[i];
// just put it at the end?
replacement = replacement.replace( /\]\]$/, '|' + data + ']]' );
this.text = this.text.replace( allLinks[i], replacement, 'g' );
}
}
var gallery_re = new RegExp( "^(\\s*" + image_re_string + '.*?)\\|?(.*?)$', 'mg' );
var newtext = "$1|$2 " + data;
this.text = this.text.replace( gallery_re, newtext );
},
removeTemplate: function( template ) {
var first_char = template.substr( 0, 1 );
var template_re_string = "(?:[Tt]emplate:)?\\s*[" + first_char.toUpperCase() + first_char.toLowerCase() + ']' + RegExp.escape( template.substr( 1 ), true );
var links_re = new RegExp( "\\{\\{" + template_re_string );
var allTemplates = Morebits.array.uniq(Morebits.string.splitWeightedByKeys( this.text, '{{', '}}', [ '{{{', '}}}' ] ));
for( var i = 0; i < allTemplates.length; ++i ) {
if( links_re.test( allTemplates[i] ) ) {
this.text = this.text.replace( allTemplates[i], '', 'g' );
}
}
},
getText: function() {
return this.text;
}
};
/**
* **************** Morebits.queryString ****************
* Maps the querystring to an object
*
* Functions:
*
* Morebits.queryString.exists(key)
* returns true if the particular key is set
* Morebits.queryString.get(key)
* returns the value associated to the key
* Morebits.queryString.equals(key, value)
* returns true if the value associated with given key equals given value
* Morebits.queryString.toString()
* returns the query string as a string
* Morebits.queryString.create( hash )
* creates an querystring and encodes strings via encodeURIComponent and joins arrays with |
*
* In static context, the value of location.search.substring(1), else the value given to the constructor is going to be used. The mapped hash is saved in the object.
*
* Example:
*
* var value = Morebits.queryString.get('key');
* var obj = new Morebits.queryString('foo=bar&baz=quux');
* value = obj.get('foo');
*/
Morebits.queryString = function QueryString(qString) {
this.string = qString;
this.params = {};
if( !qString.length ) {
return;
}
qString.replace(/\+/, ' ');
var args = qString.split('&');
for( var i = 0; i < args.length; ++i ) {
var pair = args[i].split( '=' );
var key = decodeURIComponent( pair[0] ), value = key;
if( pair.length === 2 ) {
value = decodeURIComponent( pair[1] );
}
this.params[key] = value;
}
};
Morebits.queryString.staticstr = null;
Morebits.queryString.staticInit = function() {
if( !Morebits.queryString.staticstr ) {
Morebits.queryString.staticstr = new Morebits.queryString(location.search.substring(1));
}
};
Morebits.queryString.get = function(key) {
Morebits.queryString.staticInit();
return Morebits.queryString.staticstr.get(key);
};
Morebits.queryString.prototype.get = function(key) {
return this.params[key] ? this.params[key] : null;
};
Morebits.queryString.exists = function(key) {
Morebits.queryString.staticInit();
return Morebits.queryString.staticstr.exists(key);
};
Morebits.queryString.prototype.exists = function(key) {
return this.params[key] ? true : false;
};
Morebits.queryString.equals = function(key, value) {
Morebits.queryString.staticInit();
return Morebits.queryString.staticstr.equals(key, value);
};
Morebits.queryString.prototype.equals = function(key, value) {
return this.params[key] === value ? true : false;
};
Morebits.queryString.toString = function() {
Morebits.queryString.staticInit();
return Morebits.queryString.staticstr.toString();
};
Morebits.queryString.prototype.toString = function() {
return this.string ? this.string : null;
};
Morebits.queryString.create = function( arr ) {
var resarr = [];
var editToken; // KLUGE: this should always be the last item in the query string (bug TW-B-0013)
for( var i in arr ) {
if( arr[i] === undefined ) {
continue;
}
var res;
if( $.isArray( arr[i] ) ){
var v = [];
for(var j = 0; j < arr[i].length; ++j ) {
v[j] = encodeURIComponent( arr[i][j] );
}
res = v.join('|');
} else {
res = encodeURIComponent( arr[i] );
}
if( i === 'token' ) {
editToken = res;
} else {
resarr.push( encodeURIComponent( i ) + '=' + res );
}
}
if( editToken !== undefined ) {
resarr.push( 'token=' + editToken );
}
return resarr.join('&');
};
Morebits.queryString.prototype.create = Morebits.queryString.create;
/**
* **************** Morebits.status ****************
*/
Morebits.status = function Status( text, stat, type ) {
this.textRaw = text;
this.text = this.codify(text);
this.type = type || 'status';
this.generate();
if( stat ) {
this.update( stat, type );
}
};
Morebits.status.init = function( root ) {
if( !( root instanceof Element ) ) {
throw new Error( 'object not an instance of Element' );
}
while( root.hasChildNodes() ) {
root.removeChild( root.firstChild );
}
Morebits.status.root = root;
Morebits.status.errorEvent = null;
};
Morebits.status.root = null;
Morebits.status.onError = function( handler ) {
if ( $.isFunction( handler ) ) {
Morebits.status.errorEvent = handler;
} else {
throw "Morebits.status.onError: handler is not a function";
}
};
Morebits.status.prototype = {
stat: null,
text: null,
textRaw: null,
type: 'status',
target: null,
node: null,
linked: false,
link: function() {
if( ! this.linked && Morebits.status.root ) {
Morebits.status.root.appendChild( this.node );
this.linked = true;
}
},
unlink: function() {
if( this.linked ) {
Morebits.status.root.removeChild( this.node );
this.linked = false;
}
},
codify: function( obj ) {
if ( ! $.isArray( obj ) ) {
obj = [ obj ];
}
var result;
result = document.createDocumentFragment();
for( var i = 0; i < obj.length; ++i ) {
if( typeof obj[i] === 'string' ) {
result.appendChild( document.createTextNode( obj[i] ) );
} else if( obj[i] instanceof Element ) {
result.appendChild( obj[i] );
} // Else cosmic radiation made something shit
}
return result;
},
update: function( status, type ) {
this.stat = this.codify( status );
if( type ) {
this.type = type;
if (type === 'error') {
// hack to force the page not to reload when an error is output - see also Morebits.status() above
Morebits.wiki.numberOfActionsLeft = 1000;
// call error callback
if (Morebits.status.errorEvent) {
Morebits.status.errorEvent();
}
// also log error messages in the browser console
if (console && console.error) {
console.error(this.textRaw + ": " + status);
}
}
}
this.render();
},
generate: function() {
this.node = document.createElement( 'div' );
this.node.appendChild( document.createElement('span') ).appendChild( this.text );
this.node.appendChild( document.createElement('span') ).appendChild( document.createTextNode( ': ' ) );
this.target = this.node.appendChild( document.createElement( 'span' ) );
this.target.appendChild( document.createTextNode( '' ) ); // dummy node
},
render: function() {
this.node.className = 'tw_status_' + this.type;
while( this.target.hasChildNodes() ) {
this.target.removeChild( this.target.firstChild );
}
this.target.appendChild( this.stat );
this.link();
},
status: function( status ) {
this.update( status, 'status');
},
info: function( status ) {
this.update( status, 'info');
},
warn: function( status ) {
this.update( status, 'warn');
},
error: function( status ) {
this.update( status, 'error');
}
};
Morebits.status.info = function( text, status ) {
return new Morebits.status( text, status, 'info' );
};
Morebits.status.warn = function( text, status ) {
return new Morebits.status( text, status, 'warn' );
};
Morebits.status.error = function( text, status ) {
return new Morebits.status( text, status, 'error' );
};
/**
* **************** Morebits.htmlNode() ****************
* Simple helper function to create a simple node
*/
Morebits.htmlNode = function ( type, content, color ) {
var node = document.createElement( type );
if( color ) {
node.style.color = color;
}
node.appendChild( document.createTextNode( content ) );
return node;
};
/**
* **************** Morebits.simpleWindow ****************
* A simple draggable window
* now a wrapper for jQuery UI's dialog feature
*/
// The height passed in here is the maximum allowable height for the content area.
Morebits.simpleWindow = function SimpleWindow( width, height ) {
var content = document.createElement( 'div' );
this.content = content;
content.className = 'morebits-dialog-content';
this.height = height;
$(this.content).dialog({
autoOpen: false,
buttons: { "Placeholder button": function() {} },
dialogClass: 'morebits-dialog',
width: Math.min(parseInt(window.innerWidth, 10), parseInt(width ? width : 800, 10)),
// give jQuery the given height value (which represents the anticipated height of the dialog) here, so
// it can position the dialog appropriately
// the 20 pixels represents adjustment for the extra height of the jQuery dialog "chrome", compared
// to that of the old SimpleWindow
height: height + 20,
close: function(event, ui) {
// dialogs and their content can be destroyed once closed
$(event.target).dialog("destroy").remove();
},
resize: function(event, ui) {
this.style.maxHeight = "";
}
});
var $widget = $(this.content).dialog("widget");
// add background gradient to titlebar
var $titlebar = $widget.find(".ui-dialog-titlebar");
var oldstyle = $titlebar.attr("style");
$titlebar.attr("style", (oldstyle ? oldstyle : "") + '; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB%2FqqA%2BAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEhQTFRFr73ZobTPusjdsMHZp7nVwtDhzNbnwM3fu8jdq7vUt8nbxtDkw9DhpbfSvMrfssPZqLvVztbno7bRrr7W1d%2Fs1N7qydXk0NjpkW7Q%2BgAAADVJREFUeNoMwgESQCAAAMGLkEIi%2FP%2BnbnbpdB59app5Vdg0sXAoMZCpGoFbK6ciuy6FX4ABAEyoAef0BXOXAAAAAElFTkSuQmCC) !important;');
// delete the placeholder button (it's only there so the buttonpane gets created)
$widget.find("button").each(function(key, value) {
value.parentNode.removeChild(value);
});
// add container for the buttons we add, and the footer links (if any)
var buttonspan = document.createElement("span");
buttonspan.className = "morebits-dialog-buttons";
var linksspan = document.createElement("span");
linksspan.className = "morebits-dialog-footerlinks";
$widget.find(".ui-dialog-buttonpane").append(buttonspan, linksspan);
};
Morebits.simpleWindow.prototype = {
buttons: [],
height: 600,
hasFooterLinks: false,
scriptName: null,
// Focuses the dialog. This might work, or on the contrary, it might not.
focus: function(event) {
$(this.content).dialog("moveToTop");
return this;
},
// Closes the dialog. If this is set as an event handler, it will stop the event from doing anything more.
close: function(event) {
if (event) {
event.preventDefault();
}
$(this.content).dialog("close");
return this;
},
// Shows the dialog. Calling display() on a dialog that has previously been closed might work, but it is not guaranteed.
display: function() {
if (this.scriptName) {
var $widget = $(this.content).dialog("widget");
$widget.find(".morebits-dialog-scriptname").remove();
var scriptnamespan = document.createElement("span");
scriptnamespan.className = "morebits-dialog-scriptname";
scriptnamespan.textContent = this.scriptName + " \u00B7 "; // U+00B7 MIDDLE DOT = ·
$widget.find(".ui-dialog-title").prepend(scriptnamespan);
}
var dialog = $(this.content).dialog("open");
if (window.setupTooltips && window.pg && window.pg.re && window.pg.re.diff) { // tie in with NAVPOP
dialog.parent()[0].ranSetupTooltipsAlready = false;
setupTooltips(dialog.parent()[0]);
}
this.setHeight( this.height ); // init height algorithm
return this;
},
// Sets the dialog title.
setTitle: function( title ) {
$(this.content).dialog("option", "title", title);
return this;
},
// Sets the script name, appearing as a prefix to the title to help users determine which
// user script is producing which dialog. For instance, Twinkle modules set this to "Twinkle".
setScriptName: function( name ) {
this.scriptName = name;
return this;
},
// Sets the dialog width.
setWidth: function( width ) {
$(this.content).dialog("option", "width", width);
return this;
},
// Sets the dialog's maximum height. The dialog will auto-size to fit its contents,
// but the content area will grow no larger than the height given here.
setHeight: function( height ) {
this.height = height;
// from display time onwards, let the browser determine the optimum height, and instead limit the height at the given value
// note that the given height will exclude the approx. 20px that the jQuery UI chrome has in height in addition to the height
// of an equivalent "classic" Morebits.simpleWindow
if (parseInt(getComputedStyle($(this.content).dialog("widget")[0], null).height, 10) > window.innerHeight) {
$(this.content).dialog("option", "height", window.innerHeight - 2).dialog("option", "position", "top");
} else {
$(this.content).dialog("option", "height", "auto");
}
$(this.content).dialog("widget").find(".morebits-dialog-content")[0].style.maxHeight = parseInt(this.height - 30, 10) + "px";
return this;
},
// Sets the content of the dialog to the given element node, usually from rendering a Morebits.quickForm.
// Re-enumerates the footer buttons, but leaves the footer links as they are.
// Be sure to call this at least once before the dialog is displayed...
setContent: function( content ) {
this.purgeContent();
this.addContent( content );
return this;
},
addContent: function( content ) {
this.content.appendChild( content );
// look for submit buttons in the content, hide them, and add a proxy button to the button pane
var thisproxy = this;
$(this.content).find('input[type="submit"], button[type="submit"]').each(function(key, value) {
value.style.display = "none";
var button = document.createElement("button");
button.textContent = (value.hasAttribute("value") ? value.getAttribute("value") : (value.textContent ? value.textContent : "Submit Query"));
// here is an instance of cheap coding, probably a memory-usage hit in using a closure here
button.addEventListener("click", function() { value.click(); }, false);
thisproxy.buttons.push(button);
});
// remove all buttons from the button pane and re-add them
if (this.buttons.length > 0) {
$(this.content).dialog("widget").find(".morebits-dialog-buttons").empty().append(this.buttons)[0].removeAttribute("data-empty");
} else {
$(this.content).dialog("widget").find(".morebits-dialog-buttons")[0].setAttribute("data-empty", "data-empty"); // used by CSS
}
return this;
},
purgeContent: function( content ) {
this.buttons = [];
// delete all buttons in the buttonpane
$(this.content).dialog("widget").find(".morebits-dialog-buttons").empty();
while( this.content.hasChildNodes() ) {
this.content.removeChild( this.content.firstChild );
}
return this;
},
// Adds a link in the bottom-right corner of the dialog.
// This can be used to provide help or policy links.
// For example, Twinkle's CSD module adds a link to the CSD policy page,
// as well as a link to Twinkle's documentation.
addFooterLink: function( text, wikiPage ) {
var $footerlinks = $(this.content).dialog("widget").find(".morebits-dialog-footerlinks");
if (this.hasFooterLinks) {
var bullet = document.createElement("span");
bullet.textContent = " \u2022 "; // U+2022 BULLET
$footerlinks.append(bullet);
}
var link = document.createElement("a");
link.setAttribute("href", mw.util.getUrl(wikiPage) );
link.setAttribute("title", wikiPage);
link.setAttribute("target", "_blank");
link.textContent = text;
$footerlinks.append(link);
this.hasFooterLinks = true;
return this;
},
setModality: function( modal ) {
$(this.content).dialog("option", "modal", modal);
return this;
}
};
// Enables or disables all footer buttons on all Morebits.simpleWindows in the current page.
// This should be called with |false| when the button(s) become irrelevant (e.g. just before Morebits.status.init is called).
// This is not an instance method so that consumers don't have to keep a reference to the original
// Morebits.simpleWindow object sitting around somewhere. Anyway, most of the time there will only be one
// Morebits.simpleWindow open, so this shouldn't matter.
Morebits.simpleWindow.setButtonsEnabled = function( enabled ) {
$(".morebits-dialog-buttons button").attr("disabled", !enabled);
};
// Twinkle blacklist was removed per consensus at http://en.wikipedia.org/wiki/Wikipedia:Administrators%27_noticeboard/Archive221#New_Twinkle_blacklist_proposal
} ( window, document, jQuery )); // End wrap with anonymous function
/**
* If this script is being executed outside a ResourceLoader context, we add some
* global assignments for legacy scripts, hopefully these can be removed down the line
*
* IMPORTANT NOTE:
* PLEASE DO NOT USE THESE ALIASES IN NEW CODE!
* Thanks.
*/
if ( typeof arguments === "undefined" ) { // typeof is here for a reason...
window.SimpleWindow = Morebits.simpleWindow;
window.QuickForm = Morebits.quickForm;
window.Wikipedia = Morebits.wiki;
window.Status = Morebits.status;
window.QueryString = Morebits.queryString;
}
// </nowiki>
454beb52e81edac0df25ab52d7ea2a2717f4529d
301
2014-01-05T16:00:33Z
Amalthea
0
v2.0-681-g31f8e14: xfd: Restrict NFCR tagging to File namespace; Revert "tag: Remove {{[[Template:orphan|orphan]]}} tag"; morebits: fix a nasty typo in Morebits.wiki.api
javascript
text/javascript
// <nowiki>
/**
* morebits.js
* ===========
* A library full of lots of goodness for user scripts on MediaWiki wikis, including Wikipedia.
*
* The highlights include:
* - Morebits.quickForm class - generates quick HTML forms on the fly
* - Morebits.wiki.api class - makes calls to the MediaWiki API
* - Morebits.wiki.page class - modifies pages on the wiki (edit, revert, delete, etc.)
* - Morebits.wikitext class - contains some utilities for dealing with wikitext
* - Morebits.status class - a rough-and-ready status message displayer, used by the Morebits.wiki classes
* - Morebits.simpleWindow class - a wrapper for jQuery UI Dialog with a custom look and extra features
*
* Dependencies:
* - The whole thing relies on jQuery. But most wikis should provide this by default.
* - Morebits.quickForm, Morebits.simpleWindow, and Morebits.status rely on the "morebits.css" file for their styling.
* - Morebits.simpleWindow relies on jquery UI Dialog (ResourceLoader module name 'jquery.ui.dialog').
* - Morebits.quickForm tooltips rely on Tipsy (ResourceLoader module name 'jquery.tipsy').
* For external installations, Tipsy is available at [http://onehackoranother.com/projects/jquery/tipsy].
* - To create a gadget based on morebits.js, use this syntax in MediaWiki:Gadgets-definition:
* * GadgetName[ResourceLoader|dependencies=mediawiki.util,jquery.ui.dialog,jquery.tipsy]|morebits.js|morebits.css|GadgetName.js
*
* Most of the stuff here doesn't work on IE < 9. It is your script's responsibility to enforce this.
*
* This library is maintained by the maintainers of Twinkle.
* For queries, suggestions, help, etc., head to [[Wikipedia talk:Twinkle]] on English Wikipedia [http://en.wikipedia.org].
* The latest development source is available at [https://github.com/azatoth/twinkle/blob/master/morebits.js].
*/
( function ( window, document, $, undefined ) { // Wrap entire file with anonymous function
var Morebits = {};
window.Morebits = Morebits; // allow global access
/**
* **************** Morebits.userIsInGroup() ****************
* Simple helper function to see what groups a user might belong
*/
Morebits.userIsInGroup = function ( group ) {
return $.inArray(group, mw.config.get( 'wgUserGroups' )) !== -1;
};
/**
* **************** Morebits.isIPAddress() ****************
* Helper function: Returns true if given string contains a valid IPv4 or
* IPv6 address
*/
Morebits.isIPAddress = function ( address ) {
return mw.util.isIPv4Address(address) || mw.util.isIPv6Address(address);
};
/**
* **************** Morebits.quickForm ****************
* Morebits.quickForm is a class for creation of simple and standard forms without much
* specific coding.
*
* Index to Morebits.quickForm element types:
*
* select A combo box (aka drop-down).
* - Attributes: name, label, multiple, size, list, event
* option An element for a combo box.
* - Attributes: value, label, selected, disabled
* optgroup A group of "option"s.
* - Attributes: label, list
* field A fieldset (aka group box).
* - Attributes: name, label
* checkbox A checkbox. Must use "list" parameter.
* - Attributes: name, list, event
* - Attributes (within list): name, label, value, checked, disabled, event, subgroup
* radio A radio button. Must use "list" parameter.
* - Attributes: name, list, event
* - Attributes (within list): name, label, value, checked, disabled, event, subgroup
* input A text box.
* - Attributes: name, label, value, size, disabled, readonly, maxlength, event
* dyninput A set of text boxes with "Remove" buttons and an "Add" button.
* - Attributes: name, label, min, max, sublabel, value, size, maxlength, event
* hidden An invisible form field.
* - Attributes: name, value
* header A level 5 header.
* - Attributes: label
* div A generic placeholder element or label.
* - Attributes: name, label
* submit A submit button. Morebits.simpleWindow moves these to the footer of the dialog.
* - Attributes: name, label, disabled
* button A generic button.
* - Attributes: name, label, disabled, event
* textarea A big, multi-line text box.
* - Attributes: name, label, value, cols, rows, disabled, readonly
*
* Global attributes: id, style, tooltip, extra, adminonly
*/
Morebits.quickForm = function QuickForm( event, eventType ) {
this.root = new Morebits.quickForm.element( { type: 'form', event: event, eventType:eventType } );
};
Morebits.quickForm.prototype.render = function QuickFormRender() {
var ret = this.root.render();
ret.names = {};
return ret;
};
Morebits.quickForm.prototype.append = function QuickFormAppend( data ) {
return this.root.append( data );
};
Morebits.quickForm.element = function QuickFormElement( data ) {
this.data = data;
this.childs = [];
this.id = Morebits.quickForm.element.id++;
};
Morebits.quickForm.element.id = 0;
Morebits.quickForm.element.prototype.append = function QuickFormElementAppend( data ) {
var child;
if( data instanceof Morebits.quickForm.element ) {
child = data;
} else {
child = new Morebits.quickForm.element( data );
}
this.childs.push( child );
return child;
};
// This should be called without parameters: form.render()
Morebits.quickForm.element.prototype.render = function QuickFormElementRender( internal_subgroup_id ) {
var currentNode = this.compute( this.data, internal_subgroup_id );
for( var i = 0; i < this.childs.length; ++i ) {
// do not pass internal_subgroup_id to recursive calls
currentNode[1].appendChild( this.childs[i].render() );
}
return currentNode[0];
};
Morebits.quickForm.element.prototype.compute = function QuickFormElementCompute( data, in_id ) {
var node;
var childContainder = null;
var label;
var id = ( in_id ? in_id + '_' : '' ) + 'node_' + this.id;
if( data.adminonly && !Morebits.userIsInGroup( 'sysop' ) ) {
// hell hack alpha
data.type = 'hidden';
}
var i, current, subnode;
switch( data.type ) {
case 'form':
node = document.createElement( 'form' );
node.className = "quickform";
node.setAttribute( 'action', 'javascript:void(0);');
if( data.event ) {
node.addEventListener( data.eventType || 'submit', data.event , false );
}
break;
case 'select':
node = document.createElement( 'div' );
node.setAttribute( 'id', 'div_' + id );
if( data.label ) {
label = node.appendChild( document.createElement( 'label' ) );
label.setAttribute( 'for', id );
label.appendChild( document.createTextNode( data.label ) );
}
var select = node.appendChild( document.createElement( 'select' ) );
if( data.event ) {
select.addEventListener( 'change', data.event, false );
}
if( data.multiple ) {
select.setAttribute( 'multiple', 'multiple' );
}
if( data.size ) {
select.setAttribute( 'size', data.size );
}
select.setAttribute( 'name', data.name );
if( data.list ) {
for( i = 0; i < data.list.length; ++i ) {
current = data.list[i];
if( current.list ) {
current.type = 'optgroup';
} else {
current.type = 'option';
}
subnode = this.compute( current );
select.appendChild( subnode[0] );
}
}
childContainder = select;
break;
case 'option':
node = document.createElement( 'option' );
node.values = data.value;
node.setAttribute( 'value', data.value );
if( data.selected ) {
node.setAttribute( 'selected', 'selected' );
}
if( data.disabled ) {
node.setAttribute( 'disabled', 'disabled' );
}
node.setAttribute( 'label', data.label );
node.appendChild( document.createTextNode( data.label ) );
break;
case 'optgroup':
node = document.createElement( 'optgroup' );
node.setAttribute( 'label', data.label );
if( data.list ) {
for( i = 0; i < data.list.length; ++i ) {
current = data.list[i];
current.type = 'option'; //must be options here
subnode = this.compute( current );
node.appendChild( subnode[0] );
}
}
break;
case 'field':
node = document.createElement( 'fieldset' );
label = node.appendChild( document.createElement( 'legend' ) );
label.appendChild( document.createTextNode( data.label ) );
if( data.name ) {
node.setAttribute( 'name', data.name );
}
break;
case 'checkbox':
case 'radio':
node = document.createElement( 'div' );
if( data.list ) {
for( i = 0; i < data.list.length; ++i ) {
var cur_id = id + '_' + i;
current = data.list[i];
var cur_div;
if( current.type === 'header' ) {
// inline hack
cur_div = node.appendChild( document.createElement( 'h6' ) );
cur_div.appendChild( document.createTextNode( current.label ) );
if( current.tooltip ) {
Morebits.quickForm.element.generateTooltip( cur_div , current );
}
continue;
}
cur_div = node.appendChild( document.createElement( 'div' ) );
subnode = cur_div.appendChild( document.createElement( 'input' ) );
subnode.values = current.value;
subnode.setAttribute( 'value', current.value );
subnode.setAttribute( 'name', current.name || data.name );
subnode.setAttribute( 'type', data.type );
subnode.setAttribute( 'id', cur_id );
if( current.checked ) {
subnode.setAttribute( 'checked', 'checked' );
}
if( current.disabled ) {
subnode.setAttribute( 'disabled', 'disabled' );
}
label = cur_div.appendChild( document.createElement( 'label' ) );
label.appendChild( document.createTextNode( current.label ) );
label.setAttribute( 'for', cur_id );
if( current.tooltip ) {
Morebits.quickForm.element.generateTooltip( label, current );
}
// styles go on the label, doesn't make sense to style a checkbox/radio
if( current.style ) {
subnode.setAttribute( 'style', current.style );
}
var event;
if( current.subgroup ) {
var tmpgroup = current.subgroup;
if( ! $.isArray( tmpgroup ) ) {
tmpgroup = [ tmpgroup ];
}
var subgroupRaw = new Morebits.quickForm.element({
type: 'div',
id: id + '_' + i + '_subgroup'
});
$.each( tmpgroup, function( idx, el ) {
var newEl = $.extend( {}, el );
if( ! newEl.type ) {
newEl.type = data.type;
}
newEl.name = (current.name || data.name) + '.' + newEl.name;
subgroupRaw.append( newEl );
} );
var subgroup = subgroupRaw.render( cur_id );
subgroup.className = "quickformSubgroup";
subnode.subgroup = subgroup;
subnode.shown = false;
event = function(e) {
if( e.target.checked ) {
e.target.parentNode.appendChild( e.target.subgroup );
if( e.target.type === 'radio' ) {
var name = e.target.name;
if( e.target.form.names[name] !== undefined ) {
e.target.form.names[name].parentNode.removeChild( e.target.form.names[name].subgroup );
}
e.target.form.names[name] = e.target;
}
} else {
e.target.parentNode.removeChild( e.target.subgroup );
}
};
subnode.addEventListener( 'change', event, true );
if( current.checked ) {
subnode.parentNode.appendChild( subgroup );
}
} else if( data.type === 'radio' ) {
event = function(e) {
if( e.target.checked ) {
var name = e.target.name;
if( e.target.form.names[name] !== undefined ) {
e.target.form.names[name].parentNode.removeChild( e.target.form.names[name].subgroup );
}
delete e.target.form.names[name];
}
};
subnode.addEventListener( 'change', event, true );
}
// add users' event last, so it can interact with the subgroup
if( data.event ) {
subnode.addEventListener( 'change', data.event, false );
} else if ( current.event ) {
subnode.addEventListener( 'change', current.event, true );
}
}
}
break;
case 'input':
node = document.createElement( 'div' );
node.setAttribute( 'id', 'div_' + id );
if( data.label ) {
label = node.appendChild( document.createElement( 'label' ) );
label.appendChild( document.createTextNode( data.label ) );
label.setAttribute( 'for', id );
}
subnode = node.appendChild( document.createElement( 'input' ) );
if( data.value ) {
subnode.setAttribute( 'value', data.value );
}
subnode.setAttribute( 'name', data.name );
subnode.setAttribute( 'id', id );
subnode.setAttribute( 'type', 'text' );
if( data.size ) {
subnode.setAttribute( 'size', data.size );
}
if( data.disabled ) {
subnode.setAttribute( 'disabled', 'disabled' );
}
if( data.readonly ) {
subnode.setAttribute( 'readonly', 'readonly' );
}
if( data.maxlength ) {
subnode.setAttribute( 'maxlength', data.maxlength );
}
if( data.event ) {
subnode.addEventListener( 'keyup', data.event, false );
}
break;
case 'dyninput':
var min = data.min || 1;
var max = data.max || Infinity;
node = document.createElement( 'div' );
label = node.appendChild( document.createElement( 'h5' ) );
label.appendChild( document.createTextNode( data.label ) );
var listNode = node.appendChild( document.createElement( 'div' ) );
var more = this.compute( {
type: 'button',
label: 'more',
disabled: min >= max,
event: function(e) {
var area = e.target.area;
var new_node = new Morebits.quickForm.element( e.target.sublist );
e.target.area.appendChild( new_node.render() );
if( ++e.target.counter >= e.target.max ) {
e.target.setAttribute( 'disabled', 'disabled' );
}
e.stopPropagation();
}
} );
node.appendChild( more[0] );
var moreButton = more[1];
var sublist = {
type: '_dyninput_element',
label: data.sublabel || data.label,
name: data.name,
value: data.value,
size: data.size,
remove: false,
maxlength: data.maxlength,
event: data.event
};
for( i = 0; i < min; ++i ) {
var elem = new Morebits.quickForm.element( sublist );
listNode.appendChild( elem.render() );
}
sublist.remove = true;
sublist.morebutton = moreButton;
sublist.listnode = listNode;
moreButton.sublist = sublist;
moreButton.area = listNode;
moreButton.max = max - min;
moreButton.counter = 0;
break;
case '_dyninput_element': // Private, similar to normal input
node = document.createElement( 'div' );
if( data.label ) {
label = node.appendChild( document.createElement( 'label' ) );
label.appendChild( document.createTextNode( data.label ) );
label.setAttribute( 'for', id );
}
subnode = node.appendChild( document.createElement( 'input' ) );
if( data.value ) {
subnode.setAttribute( 'value', data.value );
}
subnode.setAttribute( 'name', data.name );
subnode.setAttribute( 'type', 'text' );
if( data.size ) {
subnode.setAttribute( 'size', data.size );
}
if( data.maxlength ) {
subnode.setAttribute( 'maxlength', data.maxlength );
}
if( data.event ) {
subnode.addEventListener( 'keyup', data.event, false );
}
if( data.remove ) {
var remove = this.compute( {
type: 'button',
label: 'remove',
event: function(e) {
var list = e.target.listnode;
var node = e.target.inputnode;
var more = e.target.morebutton;
list.removeChild( node );
--more.counter;
more.removeAttribute( 'disabled' );
e.stopPropagation();
}
} );
node.appendChild( remove[0] );
var removeButton = remove[1];
removeButton.inputnode = node;
removeButton.listnode = data.listnode;
removeButton.morebutton = data.morebutton;
}
break;
case 'hidden':
node = document.createElement( 'input' );
node.setAttribute( 'type', 'hidden' );
node.values = data.value;
node.setAttribute( 'value', data.value );
node.setAttribute( 'name', data.name );
break;
case 'header':
node = document.createElement( 'h5' );
node.appendChild( document.createTextNode( data.label ) );
break;
case 'div':
node = document.createElement( 'div' );
if (data.name) {
node.setAttribute( 'name', data.name );
}
if (data.label) {
if ( ! $.isArray( data.label ) ) {
data.label = [ data.label ];
}
var result = document.createElement( 'span' );
result.className = 'quickformDescription';
for( i = 0; i < data.label.length; ++i ) {
if( typeof data.label[i] === 'string' ) {
result.appendChild( document.createTextNode( data.label[i] ) );
} else if( data.label[i] instanceof Element ) {
result.appendChild( data.label[i] );
}
}
node.appendChild( result );
}
break;
case 'submit':
node = document.createElement( 'span' );
childContainder = node.appendChild(document.createElement( 'input' ));
childContainder.setAttribute( 'type', 'submit' );
if( data.label ) {
childContainder.setAttribute( 'value', data.label );
}
childContainder.setAttribute( 'name', data.name || 'submit' );
if( data.disabled ) {
childContainder.setAttribute( 'disabled', 'disabled' );
}
break;
case 'button':
node = document.createElement( 'span' );
childContainder = node.appendChild(document.createElement( 'input' ));
childContainder.setAttribute( 'type', 'button' );
if( data.label ) {
childContainder.setAttribute( 'value', data.label );
}
childContainder.setAttribute( 'name', data.name );
if( data.disabled ) {
childContainder.setAttribute( 'disabled', 'disabled' );
}
if( data.event ) {
childContainder.addEventListener( 'click', data.event, false );
}
break;
case 'textarea':
node = document.createElement( 'div' );
node.setAttribute( 'id', 'div_' + id );
if( data.label ) {
label = node.appendChild( document.createElement( 'h5' ) );
label.appendChild( document.createTextNode( data.label ) );
// TODO need to nest a <label> tag in here without creating extra vertical space
//label.setAttribute( 'for', id );
}
subnode = node.appendChild( document.createElement( 'textarea' ) );
subnode.setAttribute( 'name', data.name );
if( data.cols ) {
subnode.setAttribute( 'cols', data.cols );
}
if( data.rows ) {
subnode.setAttribute( 'rows', data.rows );
}
if( data.disabled ) {
subnode.setAttribute( 'disabled', 'disabled' );
}
if( data.readonly ) {
subnode.setAttribute( 'readonly', 'readonly' );
}
if( data.value ) {
subnode.value = data.value;
}
break;
default:
throw new Error("Morebits.quickForm: unknown element type " + data.type.toString());
}
if( !childContainder ) {
childContainder = node;
}
if( data.tooltip ) {
Morebits.quickForm.element.generateTooltip( label || node , data );
}
if( data.extra ) {
childContainder.extra = data.extra;
}
if( data.style ) {
childContainder.setAttribute( 'style', data.style );
}
childContainder.setAttribute( 'id', data.id || id );
return [ node, childContainder ];
};
Morebits.quickForm.element.autoNWSW = function() {
return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 'sw' : 'nw';
};
Morebits.quickForm.element.generateTooltip = function QuickFormElementGenerateTooltip( node, data ) {
$('<span/>', {
'class': 'ui-icon ui-icon-help ui-icon-inline morebits-tooltip'
}).appendTo(node).tipsy({
'fallback': data.tooltip,
'fade': true,
'gravity': (data.type === "input" || data.type === "select") ?
Morebits.quickForm.element.autoNWSW : $.fn.tipsy.autoWE,
'html': true,
'delayOut': 250
});
};
/**
* Some utility methods for manipulating quickForms after their creation
* (None of them work for "dyninput" type fields at present)
*
* Morebits.quickForm.getElements(form, fieldName)
* Returns all form elements with a given field name or ID
*
* Morebits.quickForm.getCheckboxOrRadio(elementArray, value)
* Searches the array of elements for a checkbox or radio button with a certain |value| attribute
*
* Morebits.quickForm.getElementContainer(element)
* Returns the <div> containing the form element, or the form element itself
* May not work as expected on checkboxes or radios
*
* Morebits.quickForm.getElementLabelObject(element)
* Gets the HTML element that contains the label of the given form element (mainly for internal use)
*
* Morebits.quickForm.getElementLabel(element)
* Gets the label text of the element
*
* Morebits.quickForm.setElementLabel(element, labelText)
* Sets the label of the element to the given text
*
* Morebits.quickForm.overrideElementLabel(element, temporaryLabelText)
* Stores the element's current label, and temporarily sets the label to the given text
*
* Morebits.quickForm.resetElementLabel(element)
* Restores the label stored by overrideElementLabel
*
* Morebits.quickForm.setElementVisibility(element, visibility)
* Shows or hides a form element plus its label and tooltip
*
* Morebits.quickForm.setElementTooltipVisibility(element, visibility)
* Shows or hides the "question mark" icon next to a form element
*/
Morebits.quickForm.getElements = function QuickFormGetElements(form, fieldName) {
var $form = $(form);
var $elements = $form.find('[name="' + fieldName + '"]');
if ($elements.length > 0) {
return $elements.toArray();
}
$elements = $form.find('#' + fieldName);
if ($elements.length > 0) {
return $elements.toArray();
}
return null;
};
Morebits.quickForm.getCheckboxOrRadio = function QuickFormGetCheckboxOrRadio(elementArray, value) {
var found = $.grep(elementArray, function(el) {
return el.value === value;
});
if (found.length > 0) {
return found[0];
}
return null;
};
Morebits.quickForm.getElementContainer = function QuickFormGetElementContainer(element) {
// for divs, headings and fieldsets, the container is the element itself
if (element instanceof HTMLFieldSetElement || element instanceof HTMLDivElement ||
element instanceof HTMLHeadingElement) {
return element;
}
// for others, just return the parent node
return element.parentNode;
};
Morebits.quickForm.getElementLabelObject = function QuickFormGetElementLabelObject(element) {
// for buttons, divs and headers, the label is on the element itself
if (element.type === "button" || element.type === "submit" ||
element instanceof HTMLDivElement || element instanceof HTMLHeadingElement) {
return element;
// for fieldsets, the label is the child <legend> element
} else if (element instanceof HTMLFieldSetElement) {
return element.getElementsByTagName("legend")[0];
// for textareas, the label is the sibling <h5> element
} else if (element instanceof HTMLTextAreaElement) {
return element.parentNode.getElementsByTagName("h5")[0];
// for others, the label is the sibling <label> element
} else {
return element.parentNode.getElementsByTagName("label")[0];
}
return null;
};
Morebits.quickForm.getElementLabel = function QuickFormGetElementLabel(element) {
var labelElement = Morebits.quickForm.getElementLabelObject(element);
if (!labelElement) {
return null;
}
return labelElement.firstChild.textContent;
};
Morebits.quickForm.setElementLabel = function QuickFormSetElementLabel(element, labelText) {
var labelElement = Morebits.quickForm.getElementLabelObject(element);
if (!labelElement) {
return false;
}
labelElement.firstChild.textContent = labelText;
return true;
};
Morebits.quickForm.overrideElementLabel = function QuickFormOverrideElementLabel(element, temporaryLabelText) {
if (!element.hasAttribute("data-oldlabel")) {
element.setAttribute("data-oldlabel", Morebits.quickForm.getElementLabel(element));
}
return Morebits.quickForm.setElementLabel(element, temporaryLabelText);
};
Morebits.quickForm.resetElementLabel = function QuickFormResetElementLabel(element) {
if (element.hasAttribute("data-oldlabel")) {
return Morebits.quickForm.setElementLabel(element, element.getAttribute("data-oldlabel"));
}
return null;
};
Morebits.quickForm.setElementVisibility = function QuickFormSetElementVisibility(element, visibility) {
$(element).toggle(visibility);
};
Morebits.quickForm.setElementTooltipVisibility = function QuickFormSetElementTooltipVisibility(element, visibility) {
$(Morebits.quickForm.getElementContainer(element)).find(".morebits-tooltip").toggle(visibility);
};
/**
* **************** HTMLFormElement ****************
*
* getChecked:
* XXX Doesn't seem to work reliably across all browsers at the moment. -- see getChecked2 in twinkleunlink.js, which is better
*
* Returns an array containing the values of elements with the given name, that has it's
* checked property set to true. (i.e. a checkbox or a radiobutton is checked), or select options
* that have selected set to true. (don't try to mix selects with radio/checkboxes, please)
* Type is optional and can specify if either radio or checkbox (for the event
* that both checkboxes and radiobuttons have the same name.
*/
HTMLFormElement.prototype.getChecked = function( name, type ) {
var elements = this.elements[name];
if( !elements ) {
// if the element doesn't exists, return null.
return null;
}
var return_array = [];
var i;
if( elements instanceof HTMLSelectElement ) {
var options = elements.options;
for( i = 0; i < options.length; ++i ) {
if( options[i].selected ) {
if( options[i].values ) {
return_array.push( options[i].values );
} else {
return_array.push( options[i].value );
}
}
}
} else if( elements instanceof HTMLInputElement ) {
if( type && elements.type !== type ) {
return [];
} else if( elements.checked ) {
return [ elements.value ];
}
} else {
for( i = 0; i < elements.length; ++i ) {
if( elements[i].checked ) {
if( type && elements[i].type !== type ) {
continue;
}
if( elements[i].values ) {
return_array.push( elements[i].values );
} else {
return_array.push( elements[i].value );
}
}
}
}
return return_array;
};
/**
* **************** RegExp ****************
*
* RegExp.escape: Will escape a string to be used in a RegExp
*/
RegExp.escape = function( text, space_fix ) {
text = $.escapeRE(text);
// Special MediaWiki escape - underscore/space are often equivalent
if( space_fix ) {
text = text.replace( / |_/g, '[_ ]' );
}
return text;
};
/**
* **************** Morebits.bytes ****************
* Utility object for formatting byte values
*/
Morebits.bytes = function( value ) {
if( typeof value === 'string' ) {
var res = /(\d+) ?(\w?)(i?)B?/.exec( value );
var number = res[1];
var mag = res[2];
var si = res[3];
if( !number ) {
this.number = 0;
return;
}
if( !si ) {
this.value = number * Math.pow( 10, Morebits.bytes.magnitudes[mag] * 3 );
} else {
this.value = number * Math.pow( 2, Morebits.bytes.magnitudes[mag] * 10 );
}
} else {
this.value = value;
}
};
Morebits.bytes.magnitudes = {
'': 0,
'K': 1,
'M': 2,
'G': 3,
'T': 4,
'P': 5,
'E': 6,
'Z': 7,
'Y': 8
};
Morebits.bytes.rmagnitudes = {
0: '',
1: 'K',
2: 'M',
3: 'G',
4: 'T',
5: 'P',
6: 'E',
7: 'Z',
8: 'Y'
};
Morebits.bytes.prototype.valueOf = function() {
return this.value;
};
Morebits.bytes.prototype.toString = function( magnitude ) {
var tmp = this.value;
if( magnitude ) {
var si = /i/.test(magnitude);
var mag = magnitude.replace( /.*?(\w)i?B?.*/g, '$1' );
if( si ) {
tmp /= Math.pow( 2, Morebits.bytes.magnitudes[mag] * 10 );
} else {
tmp /= Math.pow( 10, Morebits.bytes.magnitudes[mag] * 3 );
}
if( parseInt( tmp, 10 ) !== tmp ) {
tmp = Number( tmp ).toPrecision( 4 );
}
return tmp + ' ' + mag + (si?'i':'') + 'B';
} else {
// si per default
var current = 0;
while( tmp >= 1024 ) {
tmp /= 1024;
++current;
}
tmp = this.value / Math.pow( 2, current * 10 );
if( parseInt( tmp, 10 ) !== tmp ) {
tmp = Number( tmp ).toPrecision( 4 );
}
return tmp + ' ' + Morebits.bytes.rmagnitudes[current] + ( current > 0 ? 'iB' : 'B' );
}
};
/**
* **************** String; Morebits.string ****************
*/
if (!String.prototype.trimLeft) {
String.prototype.trimLeft = function stringPrototypeLtrim( ) {
return this.replace( /^[\s]+/g, "" );
};
}
if (!String.prototype.trimRight) {
String.prototype.trimRight = function stringPrototypeRtrim( ) {
return this.replace( /[\s]+$/g, "" );
};
}
if (!String.prototype.trim) {
String.prototype.trim = function stringPrototypeTrim( ) {
return this.trimRight().trimLeft();
};
}
// Helper functions to change case of a string
Morebits.string = {
toUpperCaseFirstChar: function(str) {
str = str.toString();
return str.substr( 0, 1 ).toUpperCase() + str.substr( 1 );
},
toLowerCaseFirstChar: function(str) {
str = str.toString();
return str.substr( 0, 1 ).toLowerCase() + str.substr( 1 );
},
splitWeightedByKeys: function( str, start, end, skip ) {
if( start.length !== end.length ) {
throw new Error( 'start marker and end marker must be of the same length' );
}
var level = 0;
var initial = null;
var result = [];
if( ! $.isArray( skip ) ) {
if( skip === undefined ) {
skip = [];
} else if( typeof skip === 'string' ) {
skip = [ skip ];
} else {
throw new Error( "non-applicable skip parameter" );
}
}
for( var i = 0; i < str.length; ++i ) {
for( var j = 0; j < skip.length; ++j ) {
if( str.substr( i, skip[j].length ) === skip[j] ) {
i += skip[j].length - 1;
continue;
}
}
if( str.substr( i, start.length ) === start ) {
if( initial === null ) {
initial = i;
}
++level;
i += start.length - 1;
} else if( str.substr( i, end.length ) === end ) {
--level;
i += end.length - 1;
}
if( !level && initial !== null ) {
result.push( str.substring( initial, i + 1 ) );
initial = null;
}
}
return result;
},
// for deletion/other templates taking a freeform "reason" from a textarea (e.g. PROD, XFD, RPP)
formatReasonText: function( str ) {
return str.toString().trimRight().replace(/\|/g, "{{subst:!}}");
}
};
/**
* **************** Morebits.array ****************
*
* uniq(arr): returns a copy of the array with duplicates removed
*
* dups(arr): returns a copy of the array with the first instance of each value
* removed; subsequent instances of those values (duplicates) remain
*
* chunk(arr, size): breaks up |arr| into smaller arrays of length |size|, and
* returns an array of these "chunked" arrays
*/
Morebits.array = {
uniq: function(arr) {
if ( ! $.isArray( arr ) ) {
throw "A non-array object passed to Morebits.array.uniq";
}
var result = [];
for( var i = 0; i < arr.length; ++i ) {
var current = arr[i];
if( result.indexOf( current ) === -1 ) {
result.push( current );
}
}
return result;
},
dups: function(arr) {
if ( ! $.isArray( arr ) ) {
throw "A non-array object passed to Morebits.array.dups";
}
var uniques = [];
var result = [];
for( var i = 0; i < arr.length; ++i ) {
var current = arr[i];
if( uniques.indexOf( current ) === -1 ) {
uniques.push( current );
} else {
result.push( current );
}
}
return result;
},
chunk: function( arr, size ) {
if ( ! $.isArray( arr ) ) {
throw "A non-array object passed to Morebits.array.chunk";
}
if( typeof size !== 'number' || size <= 0 ) { // pretty impossible to do anything :)
return [ arr ]; // we return an array consisting of this array.
}
var result = [];
var current;
for( var i = 0; i < arr.length; ++i ) {
if( i % size === 0 ) { // when 'i' is 0, this is always true, so we start by creating one.
current = [];
result.push( current );
}
current.push( arr[i] );
}
return result;
}
};
/**
* **************** Morebits.getPageAssociatedUser ****************
* Get the user associated with the currently-viewed page.
* Currently works on User:, User talk:, Special:Contributions.
*/
Morebits.getPageAssociatedUser = function(){
var thisNamespaceId = mw.config.get('wgNamespaceNumber');
if ( thisNamespaceId === 2 /* User: */ || thisNamespaceId === 3 /* User talk: */ ) {
return mw.config.get('wgTitle').split( '/' )[0]; // only first part before any slashes, to work on subpages
}
if ( thisNamespaceId === -1 /* Special: */ && mw.config.get('wgCanonicalSpecialPageName') === "Contributions" ) {
return $('table.mw-contributions-table input[name="target"]')[0].getAttribute('value');
}
return false;
};
/**
* **************** Morebits.pageNameNorm ****************
* Stores a normalized version of the wgPageName variable (underscores converted to spaces).
* For queen/king/whatever and country!
*/
Morebits.pageNameNorm = mw.config.get('wgPageName').replace(/_/g, ' ');
/**
* **************** Morebits.unbinder ****************
* Used by Morebits.wikitext.page.commentOutImage
*/
Morebits.unbinder = function Unbinder( string ) {
if( typeof string !== 'string' ) {
throw new Error( "not a string" );
}
this.content = string;
this.counter = 0;
this.history = {};
this.prefix = '%UNIQ::' + Math.random() + '::';
this.postfix = '::UNIQ%';
};
Morebits.unbinder.prototype = {
unbind: function UnbinderUnbind( prefix, postfix ) {
var re = new RegExp( prefix + '(.*?)' + postfix, 'g' );
this.content = this.content.replace( re, Morebits.unbinder.getCallback( this ) );
},
rebind: function UnbinderRebind() {
var content = this.content;
content.self = this;
for( var current in this.history ) {
if( this.history.hasOwnProperty( current ) ) {
content = content.replace( current, this.history[current] );
}
}
return content;
},
prefix: null, // %UNIQ::0.5955981644938324::
postfix: null, // ::UNIQ%
content: null, // string
counter: null, // 0++
history: null // {}
};
Morebits.unbinder.getCallback = function UnbinderGetCallback(self) {
return function UnbinderCallback( match , a , b ) {
var current = self.prefix + self.counter + self.postfix;
self.history[current] = match;
++self.counter;
return current;
};
};
/**
* **************** Date ****************
* Helper functions to get the month as a string instead of a number
*
* Normally it is poor form to play with prototypes of primitive types, but it
* is fairly unlikely that anyone will iterate over a Date object.
*/
Date.monthNames = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December'
];
Date.monthNamesAbbrev = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec'
];
Date.prototype.getMonthName = function() {
return Date.monthNames[ this.getMonth() ];
};
Date.prototype.getMonthNameAbbrev = function() {
return Date.monthNamesAbbrev[ this.getMonth() ];
};
Date.prototype.getUTCMonthName = function() {
return Date.monthNames[ this.getUTCMonth() ];
};
Date.prototype.getUTCMonthNameAbbrev = function() {
return Date.monthNamesAbbrev[ this.getUTCMonth() ];
};
/**
* **************** Morebits.wikipedia ****************
* English Wikipedia-specific objects
*/
Morebits.wikipedia = {};
Morebits.wikipedia.namespaces = {
'-2': 'Media',
'-1': 'Special',
'0': '',
'1': 'Talk',
'2': 'User',
'3': 'User talk',
'4': 'Project',
'5': 'Project talk',
'6': 'File',
'7': 'File talk',
'8': 'MediaWiki',
'9': 'MediaWiki talk',
'10': 'Template',
'11': 'Template talk',
'12': 'Help',
'13': 'Help talk',
'14': 'Category',
'15': 'Category talk',
'100': 'Portal',
'101': 'Portal talk',
'108': 'Book',
'109': 'Book talk',
'118': 'Draft',
'119': 'Draft talk',
'446': 'Education Program',
'447': 'Education Program talk',
'710': 'TimedText',
'711': 'TimedText talk',
'828': 'Module',
'829': 'Module talk'
};
Morebits.wikipedia.namespacesFriendly = {
'0': '(Article)',
'1': 'Talk',
'2': 'User',
'3': 'User talk',
'4': 'Wikipedia',
'5': 'Wikipedia talk',
'6': 'File',
'7': 'File talk',
'8': 'MediaWiki',
'9': 'MediaWiki talk',
'10': 'Template',
'11': 'Template talk',
'12': 'Help',
'13': 'Help talk',
'14': 'Category',
'15': 'Category talk',
'100': 'Portal',
'101': 'Portal talk',
'108': 'Book',
'109': 'Book talk',
'118': 'Draft',
'119': 'Draft talk',
'446': 'Education Program',
'447': 'Education Program talk',
'710': 'TimedText',
'711': 'TimedText talk',
'828': 'Module',
'829': 'Module talk'
};
/**
* **************** Morebits.wiki ****************
* Various objects for wiki editing and API access
*/
Morebits.wiki = {};
// Determines whether the current page is a redirect or soft redirect
// (fails to detect soft redirects on edit, history, etc. pages)
Morebits.wiki.isPageRedirect = function wikipediaIsPageRedirect() {
return !!(mw.config.get("wgIsRedirect") || document.getElementById("softredirect"));
};
/**
* **************** Morebits.wiki.actionCompleted ****************
*
* Use of Morebits.wiki.actionCompleted():
* Every call to Morebits.wiki.api.post() results in the dispatch of
* an asynchronous callback. Each callback can in turn
* make an additional call to Morebits.wiki.api.post() to continue a
* processing sequence. At the conclusion of the final callback
* of a processing sequence, it is not possible to simply return to the
* original caller because there is no call stack leading back to
* the original context. Instead, Morebits.wiki.actionCompleted.event() is
* called to display the result to the user and to perform an optional
* page redirect.
*
* The determination of when to call Morebits.wiki.actionCompleted.event()
* is managed through the globals Morebits.wiki.numberOfActionsLeft and
* Morebits.wiki.nbrOfCheckpointsLeft. Morebits.wiki.numberOfActionsLeft is
* incremented at the start of every Morebits.wiki.api call and decremented
* after the completion of a callback function. If a callback function
* does not create a new Morebits.wiki.api object before exiting, it is the
* final step in the processing chain and Morebits.wiki.actionCompleted.event()
* will then be called.
*
* Optionally, callers may use Morebits.wiki.addCheckpoint() to indicate that
* processing is not complete upon the conclusion of the final callback function.
* This is used for batch operations. The end of a batch is signaled by calling
* Morebits.wiki.removeCheckpoint().
*/
Morebits.wiki.numberOfActionsLeft = 0;
Morebits.wiki.nbrOfCheckpointsLeft = 0;
Morebits.wiki.actionCompleted = function( self ) {
if( --Morebits.wiki.numberOfActionsLeft <= 0 && Morebits.wiki.nbrOfCheckpointsLeft <= 0 ) {
Morebits.wiki.actionCompleted.event( self );
}
};
// Change per action wanted
Morebits.wiki.actionCompleted.event = function() {
new Morebits.status( Morebits.wiki.actionCompleted.notice, Morebits.wiki.actionCompleted.postfix, 'info' );
if( Morebits.wiki.actionCompleted.redirect ) {
// if it isn't a URL, make it one. TODO: This breaks on the articles 'http://', 'ftp://', and similar ones.
if( !( (/^\w+\:\/\//).test( Morebits.wiki.actionCompleted.redirect ) ) ) {
Morebits.wiki.actionCompleted.redirect = mw.util.getUrl( Morebits.wiki.actionCompleted.redirect );
if( Morebits.wiki.actionCompleted.followRedirect === false ) {
Morebits.wiki.actionCompleted.redirect += "?redirect=no";
}
}
window.setTimeout( function() { window.location = Morebits.wiki.actionCompleted.redirect; }, Morebits.wiki.actionCompleted.timeOut );
}
};
Morebits.wiki.actionCompleted.timeOut = ( typeof window.wpActionCompletedTimeOut === 'undefined' ? 5000 : window.wpActionCompletedTimeOut );
Morebits.wiki.actionCompleted.redirect = null;
Morebits.wiki.actionCompleted.notice = 'Action';
Morebits.wiki.actionCompleted.postfix = 'completed';
Morebits.wiki.addCheckpoint = function() {
++Morebits.wiki.nbrOfCheckpointsLeft;
};
Morebits.wiki.removeCheckpoint = function() {
if( --Morebits.wiki.nbrOfCheckpointsLeft <= 0 && Morebits.wiki.numberOfActionsLeft <= 0 ) {
Morebits.wiki.actionCompleted.event();
}
};
/**
* **************** Morebits.wiki.api ****************
* An easy way to talk to the MediaWiki API.
*
* Constructor parameters:
* currentAction: the current action (required)
* query: the query (required)
* onSuccess: the function to call when request gotten
* statusElement: a Morebits.status object to use for status messages (optional)
* onError: the function to call if an error occurs (optional)
*/
Morebits.wiki.api = function( currentAction, query, onSuccess, statusElement, onError ) {
this.currentAction = currentAction;
this.query = query;
this.query.format = 'xml';
this.onSuccess = onSuccess;
this.onError = onError;
if( statusElement ) {
this.statelem = statusElement;
this.statelem.status( currentAction );
} else {
this.statelem = new Morebits.status( currentAction );
}
};
Morebits.wiki.api.prototype = {
currentAction: '',
onSuccess: null,
onError: null,
parent: window, // use global context if there is no parent object
query: null,
responseXML: null,
setParent: function(parent) { this.parent = parent; }, // keep track of parent object for callbacks
statelem: null, // this non-standard name kept for backwards compatibility
statusText: null, // result received from the API, normally "success" or "error"
errorCode: null, // short text error code, if any, as documented in the MediaWiki API
errorText: null, // full error description, if any
// post(): carries out the request
// do not specify a parameter unless you really really want to give jQuery some extra parameters
post: function( callerAjaxParameters ) {
++Morebits.wiki.numberOfActionsLeft;
var ajaxparams = $.extend( {}, {
context: this,
type: 'POST',
url: mw.util.wikiScript('api'),
data: Morebits.queryString.create(this.query),
dataType: 'xml'
}, callerAjaxParameters );
return $.ajax( ajaxparams ).done(
function(xml, statusText, jqXHR) {
this.statusText = statusText;
this.responseXML = xml;
this.errorCode = $(xml).find('error').attr('code');
this.errorText = $(xml).find('error').attr('info');
if (typeof this.errorCode === "string") {
// the API didn't like what we told it, e.g., bad edit token or an error creating a page
this.returnError();
return;
}
// invoke success callback if one was supplied
if (this.onSuccess) {
// set the callback context to this.parent for new code and supply the API object
// as the first argument to the callback (for legacy code)
this.onSuccess.call( this.parent, this );
} else {
this.statelem.info("done");
}
Morebits.wiki.actionCompleted();
}
).fail(
// only network and server errors reach here – complaints from the API itself are caught in success()
function(jqXHR, statusText, errorThrown) {
this.statusText = statusText;
this.errorThrown = errorThrown; // frequently undefined
this.errorText = statusText + ' "' + jqXHR.statusText + '" occurred while contacting the API.';
this.returnError();
}
); // the return value should be ignored, unless using callerAjaxParameters with |async: false|
},
returnError: function() {
this.statelem.error( this.errorText );
// invoke failure callback if one was supplied
if (this.onError) {
// set the callback context to this.parent for new code and supply the API object
// as the first argument to the callback for legacy code
this.onError.call( this.parent, this );
}
// don't complete the action so that the error remains displayed
},
getStatusElement: function() {
return this.statelem;
},
getErrorCode: function() {
return this.errorCode;
},
getErrorText: function() {
return this.errorText;
},
getXML: function() {
return this.responseXML;
}
};
/**
* **************** Morebits.wiki.page ****************
* Uses the MediaWiki API to load a page and optionally edit it, move it, etc.
*
* Callers are not permitted to directly access the properties of this class!
* All property access is through the appropriate get___() or set___() method.
*
* Callers should set Morebits.wiki.actionCompleted.notice and Morebits.wiki.actionCompleted.redirect
* before the first call to Morebits.wiki.page.load().
*
* Each of the callback functions takes one parameter, which is a
* reference to the Morebits.wiki.page object that registered the callback.
* Callback functions may invoke any Morebits.wiki.page prototype method using this reference.
*
*
* NOTE: This list of member functions is incomplete.
*
* Constructor: Morebits.wiki.page(pageName, currentAction)
* pageName - the name of the page, prefixed by the namespace (if any)
* (for the current page, use mw.config.get('wgPageName'))
* currentAction - a string describing the action about to be undertaken (optional)
*
* load(onSuccess, onFailure): Loads the text for the page
* onSuccess - callback function which is called when the load has succeeded
* onFailure - callback function which is called when the load fails (optional)
* XXX onFailure for load() is not yet implemented – do we need it? -- UncleDouggie
* probably not -- TTO
*
* save(onSuccess, onFailure): Saves the text for the page. Must be preceded by calling load().
* onSuccess - callback function which is called when the save has succeeded (optional)
* onFailure - callback function which is called when the save fails (optional)
* Warning: Calling save() can result in additional calls to the previous load() callbacks to
* recover from edit conflicts!
* In this case, callers must make the same edit to the new pageText and reinvoke save().
* This behavior can be disabled with setMaxConflictRetries(0).
*
* append(onSuccess, onFailure): Adds the text provided via setAppendText() to the end of the page.
* Does not require calling load() first.
* onSuccess - callback function which is called when the method has succeeded (optional)
* onFailure - callback function which is called when the method fails (optional)
*
* prepend(onSuccess, onFailure): Adds the text provided via setPrependText() to the start of the page.
* Does not require calling load() first.
* onSuccess - callback function which is called when the method has succeeded (optional)
* onFailure - callback function which is called when the method fails (optional)
*
* getPageName(): returns a string containing the name of the loaded page, including the namespace
*
* getPageText(): returns a string containing the text of the page after a successful load()
*
* setPageText(pageText)
* pageText - string containing the updated page text that will be saved when save() is called
*
* setAppendText(appendText)
* appendText - string containing the text that will be appended to the page when append() is called
*
* setPrependText(prependText)
* prependText - string containing the text that will be prepended to the page when prepend() is called
*
* setEditSummary(summary)
* summary - string containing the text of the edit summary that will be used when save() is called
*
* setMinorEdit(minorEdit)
* minorEdit is a boolean value:
* true - When save is called, the resulting edit will be marked as "minor".
* false - When save is called, the resulting edit will not be marked as "minor". (default)
*
* setBotEdit(botEdit)
* botEdit is a boolean value:
* true - When save is called, the resulting edit will be marked as "bot".
* false - When save is called, the resulting edit will not be marked as "bot". (default)
*
* setPageSection(pageSection)
* pageSection - integer specifying the section number to load or save. The default is |null|, which means
* that the entire page will be retrieved.
*
* setMaxConflictRetries(maxRetries)
* maxRetries - number of retries for save errors involving an edit conflict or loss of edit token
* default: 2
*
* setMaxRetries(maxRetries)
* maxRetries - number of retries for save errors not involving an edit conflict or loss of edit token
* default: 2
*
* setCallbackParameters(callbackParameters)
* callbackParameters - an object for use in a callback function
*
* getCallbackParameters(): returns the object previous set by setCallbackParameters()
*
* Callback notes: callbackParameters is for use by the caller only. The parameters
* allow a caller to pass the proper context into its callback function.
* Callers must ensure that any changes to the callbackParameters object
* within a load() callback still permit a proper re-entry into the
* load() callback if an edit conflict is detected upon calling save().
*
* getStatusElement(): returns the Status element created by the constructor
*
* setFollowRedirect(followRedirect)
* followRedirect is a boolean value:
* true - a maximum of one redirect will be followed.
* In the event of a redirect, a message is displayed to the user and
* the redirect target can be retrieved with getPageName().
* false - the requested pageName will be used without regard to any redirect. (default)
*
* setWatchlist(watchlistOption)
* watchlistOption is a boolean value:
* true - page will be added to the user's watchlist when save() is called
* false - watchlist status of the page will not be changed (default)
*
* setWatchlistFromPreferences(watchlistOption)
* watchlistOption is a boolean value:
* true - page watchlist status will be set based on the user's
* preference settings when save() is called
* false - watchlist status of the page will not be changed (default)
*
* Watchlist notes:
* 1. The MediaWiki API value of 'unwatch', which explicitly removes the page from the
* user's watchlist, is not used.
* 2. If both setWatchlist() and setWatchlistFromPreferences() are called,
* the last call takes priority.
* 3. Twinkle modules should use the appropriate preference to set the watchlist options.
* 4. Most Twinkle modules use setWatchlist().
* setWatchlistFromPreferences() is only needed for the few Twinkle watchlist preferences
* that accept a string value of 'default'.
*
* setCreateOption(createOption)
* createOption is a string value:
* 'recreate' - create the page if it does not exist, or edit it if it exists
* 'createonly' - create the page if it does not exist, but return an error if it
* already exists
* 'nocreate' - don't create the page, only edit it if it already exists
* null - create the page if it does not exist, unless it was deleted in the moment
* between retrieving the edit token and saving the edit (default)
*
* exists(): returns true if the page existed on the wiki when it was last loaded
*
* lookupCreator(onSuccess): Retrieves the username of the user who created the page
* onSuccess - callback function which is called when the username is found
* within the callback, the username can be retrieved using the getCreator() function
*
* getCreator(): returns the user who created the page following lookupCreator()
*
* getCurrentID(): returns a string containing the current revision ID of the page
*
* patrol(): marks the page as patrolled, if possible
*
* move(onSuccess, onFailure): Moves a page to another title
*
* deletePage(onSuccess, onFailure): Deletes a page (for admins only)
*
*/
/**
* Call sequence for common operations (optional final user callbacks not shown):
*
* Edit current contents of a page (no edit conflict):
* .load(userTextEditCallback) -> ctx.loadApi.post() -> ctx.loadApi.post.success() ->
* ctx.fnLoadSuccess() -> userTextEditCallback() -> .save() ->
* ctx.saveApi.post() -> ctx.loadApi.post.success() -> ctx.fnSaveSuccess()
*
* Edit current contents of a page (with edit conflict):
* .load(userTextEditCallback) -> ctx.loadApi.post() -> ctx.loadApi.post.success() ->
* ctx.fnLoadSuccess() -> userTextEditCallback() -> .save() ->
* ctx.saveApi.post() -> ctx.loadApi.post.success() -> ctx.fnSaveError() ->
* ctx.loadApi.post() -> ctx.loadApi.post.success() ->
* ctx.fnLoadSuccess() -> userTextEditCallback() -> .save() ->
* ctx.saveApi.post() -> ctx.loadApi.post.success() -> ctx.fnSaveSuccess()
*
* Append to a page (similar for prepend):
* .append() -> ctx.loadApi.post() -> ctx.loadApi.post.success() ->
* ctx.fnLoadSuccess() -> ctx.fnAutoSave() -> .save() ->
* ctx.saveApi.post() -> ctx.loadApi.post.success() -> ctx.fnSaveSuccess()
*
* Notes:
* 1. All functions following Morebits.wiki.api.post() are invoked asynchronously
* from the jQuery AJAX library.
* 2. The sequence for append/prepend could be slightly shortened, but it would require
* significant duplication of code for little benefit.
*/
Morebits.wiki.page = function(pageName, currentAction) {
if (!currentAction) {
currentAction = 'Opening page "' + pageName + '"';
}
/**
* Private context variables
*
* This context is not visible to the outside, thus all the data here
* must be accessed via getter and setter functions.
*/
var ctx = {
// backing fields for public properties
pageName: pageName,
pageExists: false,
editSummary: null,
callbackParameters: null,
statusElement: new Morebits.status(currentAction),
// - edit
pageText: null,
editMode: 'all', // save() replaces entire contents of the page by default
appendText: null, // can't reuse pageText for this because pageText is needed to follow a redirect
prependText: null, // can't reuse pageText for this because pageText is needed to follow a redirect
createOption: null,
minorEdit: false,
botEdit: false,
pageSection: null,
maxConflictRetries: 2,
maxRetries: 2,
followRedirect: false,
watchlistOption: 'nochange',
creator: null,
// - revert
revertOldID: null,
// - move
moveDestination: null,
moveTalkPage: false,
moveSubpages: false,
moveSuppressRedirect: false,
// - protect
protectEdit: null,
protectMove: null,
protectCreate: null,
protectCascade: false,
// - stabilize (FlaggedRevs)
flaggedRevs: null,
// internal status
pageLoaded: false,
editToken: null,
loadTime: null,
lastEditTime: null,
revertCurID: null,
revertUser: null,
fullyProtected: false,
suppressProtectWarning: false,
conflictRetries: 0,
retries: 0,
// callbacks
onLoadSuccess: null,
onLoadFailure: null,
onSaveSuccess: null,
onSaveFailure: null,
onLookupCreatorSuccess: null,
onMoveSuccess: null,
onMoveFailure: null,
onDeleteSuccess: null,
onDeleteFailure: null,
onProtectSuccess: null,
onProtectFailure: null,
onStabilizeSuccess: null,
onStabilizeFailure: null,
// internal objects
loadQuery: null,
loadApi: null,
saveApi: null,
lookupCreatorApi: null,
moveApi: null,
moveProcessApi: null,
deleteApi: null,
deleteProcessApi: null,
protectApi: null,
protectProcessApi: null,
stabilizeApi: null,
stabilizeProcessApi: null
};
var emptyFunction = function() { };
/**
* Public interface accessors
*/
this.getPageName = function() {
return ctx.pageName;
};
this.getPageText = function() {
return ctx.pageText;
};
this.setPageText = function(pageText) {
ctx.editMode = 'all';
ctx.pageText = pageText;
};
this.setAppendText = function(appendText) {
ctx.editMode = 'append';
ctx.appendText = appendText;
};
this.setPrependText = function(prependText) {
ctx.editMode = 'prepend';
ctx.prependText = prependText;
};
this.setEditSummary = function(summary) {
ctx.editSummary = summary;
};
this.setCreateOption = function(createOption) {
ctx.createOption = createOption;
};
this.setMinorEdit = function(minorEdit) {
ctx.minorEdit = minorEdit;
};
this.setBotEdit = function(botEdit) {
ctx.botEdit = botEdit;
};
this.setPageSection = function(pageSection) {
ctx.pageSection = pageSection;
};
this.setMaxConflictRetries = function(maxRetries) {
ctx.maxConflictRetries = maxRetries;
};
this.setMaxRetries = function(maxRetries) {
ctx.maxRetries = maxRetries;
};
this.setCallbackParameters = function(callbackParameters) {
ctx.callbackParameters = callbackParameters;
};
this.getCallbackParameters = function() {
return ctx.callbackParameters;
};
this.getCreator = function() {
return ctx.creator;
};
this.setOldID = function(oldID) {
ctx.revertOldID = oldID;
};
this.getCurrentID = function() {
return ctx.revertCurID;
};
this.getRevisionUser = function() {
return ctx.revertUser;
};
this.setMoveDestination = function(destination) {
ctx.moveDestination = destination;
};
this.setMoveTalkPage = function(flag) {
ctx.moveTalkPage = !!flag;
};
this.setMoveSubpages = function(flag) {
ctx.moveSubpages = !!flag;
};
this.setMoveSuppressRedirect = function(flag) {
ctx.moveSuppressRedirect = !!flag;
};
this.setEditProtection = function(level, expiry) {
ctx.protectEdit = { level: level, expiry: expiry };
};
this.setMoveProtection = function(level, expiry) {
ctx.protectMove = { level: level, expiry: expiry };
};
this.setCreateProtection = function(level, expiry) {
ctx.protectCreate = { level: level, expiry: expiry };
};
this.setCascadingProtection = function(flag) {
ctx.protectCascade = !!flag;
};
this.setFlaggedRevs = function(level, expiry) {
ctx.flaggedRevs = { level: level, expiry: expiry };
};
this.getStatusElement = function() {
return ctx.statusElement;
};
this.setFollowRedirect = function(followRedirect) {
if (ctx.pageLoaded) {
ctx.statusElement.error("Internal error: cannot change redirect setting after the page has been loaded!");
return;
}
ctx.followRedirect = followRedirect;
};
this.setWatchlist = function(flag) {
if (flag) {
ctx.watchlistOption = 'watch';
} else {
ctx.watchlistOption = 'nochange';
}
};
this.setWatchlistFromPreferences = function(flag) {
if (flag) {
ctx.watchlistOption = 'preferences';
} else {
ctx.watchlistOption = 'nochange';
}
};
this.suppressProtectWarning = function() {
ctx.suppressProtectWarning = true;
};
this.exists = function() {
return ctx.pageExists;
};
this.load = function(onSuccess, onFailure) {
ctx.onLoadSuccess = onSuccess;
ctx.onLoadFailure = onFailure || emptyFunction;
// Need to be able to do something after the page loads
if (!onSuccess) {
ctx.statusElement.error("Internal error: no onSuccess callback provided to load()!");
ctx.onLoadFailure(this);
return;
}
ctx.loadQuery = {
action: 'query',
prop: 'info|revisions',
intoken: 'edit', // fetch an edit token
titles: ctx.pageName
// don't need rvlimit=1 because we don't need rvstartid here and only one actual rev is returned by default
};
if (ctx.editMode === 'all') {
ctx.loadQuery.rvprop = 'content|timestamp'; // get the page content at the same time, if needed
} else if (ctx.editMode === 'revert') {
ctx.loadQuery.rvprop = 'timestamp';
ctx.loadQuery.rvlimit = 1;
ctx.loadQuery.rvstartid = ctx.revertOldID;
}
if (ctx.followRedirect) {
ctx.loadQuery.redirects = ''; // follow all redirects
}
if (typeof ctx.pageSection === 'number') {
ctx.loadQuery.rvsection = ctx.pageSection;
}
if (Morebits.userIsInGroup('sysop')) {
ctx.loadQuery.inprop = 'protection';
}
ctx.loadApi = new Morebits.wiki.api("Retrieving page...", ctx.loadQuery, fnLoadSuccess, ctx.statusElement, ctx.onLoadFailure);
ctx.loadApi.setParent(this);
ctx.loadApi.post();
};
// Save updated .pageText to Wikipedia
// Only valid after successful .load()
this.save = function(onSuccess, onFailure) {
ctx.onSaveSuccess = onSuccess;
ctx.onSaveFailure = onFailure || emptyFunction;
if (!ctx.pageLoaded) {
ctx.statusElement.error("Internal error: attempt to save a page that has not been loaded!");
ctx.onSaveFailure(this);
return;
}
if (!ctx.editSummary) {
ctx.statusElement.error("Internal error: edit summary not set before save!");
ctx.onSaveFailure(this);
return;
}
if (ctx.fullyProtected && !ctx.suppressProtectWarning &&
!confirm('You are about to make an edit to the fully protected page "' + ctx.pageName +
(ctx.fullyProtected === 'infinity' ? '" (protected indefinitely)' : ('" (protection expiring ' + ctx.fullyProtected + ')')) +
'. \n\nClick OK to proceed with the edit, or Cancel to skip this edit.')) {
ctx.statusElement.error("Edit to fully protected page was aborted.");
ctx.onSaveFailure(this);
return;
}
ctx.retries = 0;
var query = {
action: 'edit',
title: ctx.pageName,
summary: ctx.editSummary,
token: ctx.editToken,
watchlist: ctx.watchlistOption
};
if (typeof ctx.pageSection === 'number') {
query.section = ctx.pageSection;
}
// Set minor edit attribute. If these parameters are present with any value, it is interpreted as true
if (ctx.minorEdit) {
query.minor = true;
} else {
query.notminor = true; // force Twinkle config to override user preference setting for "all edits are minor"
}
// Set bot edit attribute. If this paramter is present with any value, it is interpreted as true
if (ctx.botEdit) {
query.bot = true;
}
switch (ctx.editMode) {
case 'append':
query.appendtext = ctx.appendText; // use mode to append to current page contents
break;
case 'prepend':
query.prependtext = ctx.prependText; // use mode to prepend to current page contents
break;
case 'revert':
query.undo = ctx.revertCurID;
query.undoafter = ctx.revertOldID;
if (ctx.lastEditTime) {
query.basetimestamp = ctx.lastEditTime; // check that page hasn't been edited since it was loaded
}
query.starttimestamp = ctx.loadTime; // check that page hasn't been deleted since it was loaded (don't recreate bad stuff)
break;
default:
query.text = ctx.pageText; // replace entire contents of the page
if (ctx.lastEditTime) {
query.basetimestamp = ctx.lastEditTime; // check that page hasn't been edited since it was loaded
}
query.starttimestamp = ctx.loadTime; // check that page hasn't been deleted since it was loaded (don't recreate bad stuff)
break;
}
if (['recreate', 'createonly', 'nocreate'].indexOf(ctx.createOption) !== -1) {
query[ctx.createOption] = '';
}
ctx.saveApi = new Morebits.wiki.api( "Saving page...", query, fnSaveSuccess, ctx.statusElement, fnSaveError);
ctx.saveApi.setParent(this);
ctx.saveApi.post();
};
this.append = function(onSuccess, onFailure) {
ctx.editMode = 'append';
ctx.onSaveSuccess = onSuccess;
ctx.onSaveFailure = onFailure || emptyFunction;
this.load(fnAutoSave, ctx.onSaveFailure);
};
this.prepend = function(onSuccess, onFailure) {
ctx.editMode = 'prepend';
ctx.onSaveSuccess = onSuccess;
ctx.onSaveFailure = onFailure || emptyFunction;
this.load(fnAutoSave, ctx.onSaveFailure);
};
this.lookupCreator = function(onSuccess) {
if (!onSuccess) {
ctx.statusElement.error("Internal error: no onSuccess callback provided to lookupCreator()!");
return;
}
ctx.onLookupCreatorSuccess = onSuccess;
var query = {
'action': 'query',
'prop': 'revisions',
'titles': ctx.pageName,
'rvlimit': 1,
'rvprop': 'user',
'rvdir': 'newer'
};
if (ctx.followRedirect) {
query.redirects = ''; // follow all redirects
}
ctx.lookupCreatorApi = new Morebits.wiki.api("Retrieving page creator information", query, fnLookupCreatorSuccess, ctx.statusElement);
ctx.lookupCreatorApi.setParent(this);
ctx.lookupCreatorApi.post();
};
this.patrol = function() {
// There's no patrol link on page, so we can't patrol
if ( !$( '.patrollink' ).length ) {
return;
}
// Extract the rcid token from the "Mark page as patrolled" link on page
var patrolhref = $( '.patrollink a' ).attr( 'href' ),
rcid = mw.util.getParamValue( 'rcid', patrolhref );
if ( rcid ) {
var patrolstat = new Morebits.status( 'Marking page as patrolled' );
var wikipedia_api = new Morebits.wiki.api( 'doing...', {
action: 'patrol',
rcid: rcid,
token: mw.user.tokens.get( 'patrolToken' )
}, null, patrolstat );
// We don't really care about the response
wikipedia_api.post();
}
};
this.revert = function(onSuccess, onFailure) {
ctx.onSaveSuccess = onSuccess;
ctx.onSaveFailure = onFailure || emptyFunction;
if (!ctx.revertOldID) {
ctx.statusElement.error("Internal error: revision ID to revert to was not set before revert!");
ctx.onSaveFailure(this);
return;
}
ctx.editMode = 'revert';
this.load(fnAutoSave, ctx.onSaveFailure);
};
this.move = function(onSuccess, onFailure) {
ctx.onMoveSuccess = onSuccess;
ctx.onMoveFailure = onFailure || emptyFunction;
if (!ctx.editSummary) {
ctx.statusElement.error("Internal error: move reason not set before move (use setEditSummary function)!");
ctx.onMoveFailure(this);
return;
}
if (!ctx.moveDestination) {
ctx.statusElement.error("Internal error: destination page name was not set before move!");
ctx.onMoveFailure(this);
return;
}
var query = {
action: 'query',
prop: 'info',
intoken: 'move',
titles: ctx.pageName
};
if (ctx.followRedirect) {
query.redirects = ''; // follow all redirects
}
if (Morebits.userIsInGroup('sysop')) {
query.inprop = 'protection';
}
ctx.moveApi = new Morebits.wiki.api("retrieving move token...", query, fnProcessMove, ctx.statusElement, ctx.onMoveFailure);
ctx.moveApi.setParent(this);
ctx.moveApi.post();
};
// |delete| is a reserved word in some flavours of JS
this.deletePage = function(onSuccess, onFailure) {
ctx.onDeleteSuccess = onSuccess;
ctx.onDeleteFailure = onFailure || emptyFunction;
// if a non-admin tries to do this, don't bother
if (!Morebits.userIsInGroup('sysop')) {
ctx.statusElement.error("Cannot delete page: only admins can do that");
ctx.onDeleteFailure(this);
return;
}
if (!ctx.editSummary) {
ctx.statusElement.error("Internal error: delete reason not set before delete (use setEditSummary function)!");
ctx.onDeleteFailure(this);
return;
}
var query = {
action: 'query',
prop: 'info',
inprop: 'protection',
intoken: 'delete',
titles: ctx.pageName
};
if (ctx.followRedirect) {
query.redirects = ''; // follow all redirects
}
ctx.deleteApi = new Morebits.wiki.api("retrieving delete token...", query, fnProcessDelete, ctx.statusElement, ctx.onDeleteFailure);
ctx.deleteApi.setParent(this);
ctx.deleteApi.post();
};
this.protect = function(onSuccess, onFailure) {
ctx.onProtectSuccess = onSuccess;
ctx.onProtectFailure = onFailure || emptyFunction;
// if a non-admin tries to do this, don't bother
if (!Morebits.userIsInGroup('sysop')) {
ctx.statusElement.error("Cannot protect page: only admins can do that");
ctx.onProtectFailure(this);
return;
}
if (!ctx.protectEdit && !ctx.protectMove && !ctx.protectCreate) {
ctx.statusElement.error("Internal error: you must set edit and/or move and/or create protection before calling protect()!");
ctx.onProtectFailure(this);
return;
}
if (!ctx.editSummary) {
ctx.statusElement.error("Internal error: protection reason not set before protect (use setEditSummary function)!");
ctx.onProtectFailure(this);
return;
}
var query = {
action: 'query',
prop: 'info',
inprop: 'protection',
intoken: 'protect',
titles: ctx.pageName,
watchlist: ctx.watchlistOption
};
if (ctx.followRedirect) {
query.redirects = ''; // follow all redirects
}
ctx.protectApi = new Morebits.wiki.api("retrieving protect token...", query, fnProcessProtect, ctx.statusElement, ctx.onProtectFailure);
ctx.protectApi.setParent(this);
ctx.protectApi.post();
};
// apply FlaggedRevs protection-style settings
// only works where $wgFlaggedRevsProtection = true (i.e. where FlaggedRevs
// settings appear on the wiki's "protect" tab)
this.stabilize = function(onSuccess, onFailure) {
ctx.onStabilizeSuccess = onSuccess;
ctx.onStabilizeFailure = onFailure || emptyFunction;
// if a non-admin tries to do this, don't bother
if (!Morebits.userIsInGroup('sysop')) {
ctx.statusElement.error("Cannot apply FlaggedRevs settings: only admins can do that");
ctx.onStabilizeFailure(this);
return;
}
if (!ctx.flaggedRevs) {
ctx.statusElement.error("Internal error: you must set flaggedRevs before calling stabilize()!");
ctx.onStabilizeFailure(this);
return;
}
if (!ctx.editSummary) {
ctx.statusElement.error("Internal error: reason not set before calling stabilize() (use setEditSummary function)!");
ctx.onStabilizeFailure(this);
return;
}
var query = {
action: 'query',
prop: 'info|flagged',
intoken: 'edit',
titles: ctx.pageName
};
if (ctx.followRedirect) {
query.redirects = ''; // follow all redirects
}
ctx.stabilizeApi = new Morebits.wiki.api("retrieving stabilize token...", query, fnProcessStabilize, ctx.statusElement, ctx.onStabilizeFailure);
ctx.stabilizeApi.setParent(this);
ctx.stabilizeApi.post();
};
/**
* Private member functions
*
* These are not exposed outside
*/
// callback from loadSuccess() for append() and prepend() threads
var fnAutoSave = function(pageobj) {
pageobj.save(ctx.onSaveSuccess, ctx.onSaveFailure);
};
// callback from loadApi.post()
var fnLoadSuccess = function() {
var xml = ctx.loadApi.getXML();
if ( !fnCheckPageName(xml, ctx.onLoadFailure) ) {
return; // abort
}
ctx.pageExists = ($(xml).find('page').attr('missing') !== "");
if (ctx.pageExists) {
ctx.pageText = $(xml).find('rev').text();
} else {
ctx.pageText = ''; // allow for concatenation, etc.
}
// extract protection info, to alert admins when they are about to edit a protected page
if (Morebits.userIsInGroup('sysop')) {
var editprot = $(xml).find('pr[type="edit"]');
if (editprot.length > 0 && editprot.attr('level') === 'sysop') {
ctx.fullyProtected = editprot.attr('expiry');
} else {
ctx.fullyProtected = false;
}
}
ctx.editToken = $(xml).find('page').attr('edittoken');
if (!ctx.editToken) {
ctx.statusElement.error("Failed to retrieve edit token.");
ctx.onLoadFailure(this);
return;
}
ctx.loadTime = $(xml).find('page').attr('starttimestamp');
if (!ctx.loadTime) {
ctx.statusElement.error("Failed to retrieve start timestamp.");
ctx.onLoadFailure(this);
return;
}
ctx.lastEditTime = $(xml).find('rev').attr('timestamp');
ctx.revertCurID = $(xml).find('page').attr('lastrevid');
if (ctx.editMode === 'revert') {
ctx.revertCurID = $(xml).find('rev').attr('revid');
if (!ctx.revertCurID) {
ctx.statusElement.error("Failed to retrieve current revision ID.");
ctx.onLoadFailure(this);
return;
}
ctx.revertUser = $(xml).find('rev').attr('user');
if (!ctx.revertUser) {
if ($(xml).find('rev').attr('userhidden') === "") { // username was RevDel'd or oversighted
ctx.revertUser = "<username hidden>";
} else {
ctx.statusElement.error("Failed to retrieve user who made the revision.");
ctx.onLoadFailure(this);
return;
}
}
// set revert edit summary
ctx.editSummary = "[[Help:Revert|Reverted]] to revision " + ctx.revertOldID + " by " + ctx.revertUser + ": " + ctx.editSummary;
}
ctx.pageLoaded = true;
// alert("Generate edit conflict now"); // for testing edit conflict recovery logic
ctx.onLoadSuccess(this); // invoke callback
};
// helper function to parse the page name returned from the API
var fnCheckPageName = function(xml, onFailure) {
if (!onFailure) {
onFailure = emptyFunction;
}
// check for invalid titles
if ( $(xml).find('page').attr('invalid') === "" ) {
ctx.statusElement.error("The page title is invalid: " + ctx.pageName);
onFailure(this);
return false; // abort
}
// retrieve actual title of the page after normalization and redirects
if ( $(xml).find('page').attr('title') ) {
var resolvedName = $(xml).find('page').attr('title');
// only notify user for redirects, not normalization
if ( $(xml).find('redirects').length > 0 ) {
Morebits.status.info("Info", "Redirected from " + ctx.pageName + " to " + resolvedName );
}
ctx.pageName = resolvedName; // always update in case of normalization
}
else {
// could be a circular redirect or other problem
ctx.statusElement.error("Could not resolve redirects for: " + ctx.pageName);
onFailure(this);
// force error to stay on the screen
++Morebits.wiki.numberOfActionsLeft;
return false; // abort
}
return true; // all OK
};
// callback from saveApi.post()
var fnSaveSuccess = function() {
ctx.editMode = 'all'; // cancel append/prepend/revert modes
var xml = ctx.saveApi.getXML();
// see if the API thinks we were successful
if ($(xml).find('edit').attr('result') === "Success") {
// real success
// default on success action - display link for edited page
var link = document.createElement('a');
link.setAttribute('href', mw.util.getUrl(ctx.pageName) );
link.appendChild(document.createTextNode(ctx.pageName));
ctx.statusElement.info(['completed (', link, ')']);
if (ctx.onSaveSuccess) {
ctx.onSaveSuccess(this); // invoke callback
}
return;
}
// errors here are only generated by extensions which hook APIEditBeforeSave within MediaWiki
// Wikimedia wikis should only return spam blacklist errors, captchas, and AbuseFilter messages
var $editNode = $(xml).find('edit');
var blacklist = $editNode.attr('spamblacklist');
if (blacklist) {
var code = document.createElement('code');
code.style.fontFamily = "monospace";
code.appendChild(document.createTextNode(blacklist));
ctx.statusElement.error(['Could not save the page because the URL ', code, ' is on the spam blacklist.']);
} else if ( $(xml).find('captcha').length > 0 ) {
ctx.statusElement.error("Could not save the page because the wiki server wanted you to fill out a CAPTCHA.");
} else if ( $editNode.attr('code') === 'abusefilter-disallowed' ) {
ctx.statusElement.error('The edit was disallowed by the edit filter rule "' + $editNode.attr('info').substring(17) + '".');
} else if ( $editNode.attr('info').indexOf('Hit AbuseFilter:') === 0 ) {
var div = document.createElement('div');
div.className = "toccolours";
div.style.fontWeight = "normal";
div.style.color = "black";
div.innerHTML = $editNode.attr('warning');
ctx.statusElement.error([ 'The following warning was returned by the edit filter: ', div, 'If you wish to proceed with the edit, please carry it out again. This warning wil not appear a second time.' ]);
// XXX provide the user with a way to automatically retry the action if they so choose -
// I can't see how to do this without creating a UI dependency on Morebits.wiki.page though -- TTO
} else {
ctx.statusElement.error("Unknown error received from API while saving page");
}
// force error to stay on the screen
++Morebits.wiki.numberOfActionsLeft;
ctx.onSaveFailure(this);
};
// callback from saveApi.post()
var fnSaveError = function() {
var errorCode = ctx.saveApi.getErrorCode();
// check for edit conflict
if ( errorCode === "editconflict" && ctx.conflictRetries++ < ctx.maxConflictRetries ) {
// edit conflicts can occur when the page needs to be purged from the server cache
var purgeQuery = {
action: 'purge',
titles: ctx.pageName // redirects are already resolved
};
var purgeApi = new Morebits.wiki.api("Edit conflict detected, purging server cache", purgeQuery, null, ctx.statusElement);
var result = purgeApi.post( { async: false } ); // just wait for it, result is for debugging
--Morebits.wiki.numberOfActionsLeft; // allow for normal completion if retry succeeds
ctx.statusElement.info("Edit conflict detected, reapplying edit");
ctx.loadApi.post(); // reload the page and reapply the edit
// check for loss of edit token
// it's impractical to request a new token here, so invoke edit conflict logic when this happens
} else if ( errorCode === "notoken" && ctx.conflictRetries++ < ctx.maxConflictRetries ) {
ctx.statusElement.info("Edit token is invalid, retrying");
--Morebits.wiki.numberOfActionsLeft; // allow for normal completion if retry succeeds
ctx.loadApi.post(); // reload
// check for network or server error
} else if ( errorCode === "undefined" && ctx.retries++ < ctx.maxRetries ) {
// the error might be transient, so try again
ctx.statusElement.info("Save failed, retrying");
--Morebits.wiki.numberOfActionsLeft; // allow for normal completion if retry succeeds
ctx.saveApi.post(); // give it another go!
// hard error, give up
} else {
// non-admin attempting to edit a protected page - this gives a friendlier message than the default
if ( errorCode === "protectedpage" ) {
ctx.statusElement.error( "Failed to save edit: Page is fully protected" );
} else {
ctx.statusElement.error( "Failed to save edit: " + ctx.saveApi.getErrorText() );
}
ctx.editMode = 'all'; // cancel append/prepend/revert modes
if (ctx.onSaveFailure) {
ctx.onSaveFailure(this); // invoke callback
}
}
};
var fnLookupCreatorSuccess = function() {
var xml = ctx.lookupCreatorApi.getXML();
if ( !fnCheckPageName(xml) ) {
return; // abort
}
ctx.creator = $(xml).find('rev').attr('user');
if (!ctx.creator) {
ctx.statusElement.error("Could not find name of page creator");
return;
}
ctx.onLookupCreatorSuccess(this);
};
var fnProcessMove = function() {
var xml = ctx.moveApi.getXML();
if ($(xml).find('page').attr('missing') === "") {
ctx.statusElement.error("Cannot move the page, because it no longer exists");
ctx.onMoveFailure(this);
return;
}
// extract protection info
if (Morebits.userIsInGroup('sysop')) {
var editprot = $(xml).find('pr[type="edit"]');
if (editprot.length > 0 && editprot.attr('level') === 'sysop' && !ctx.suppressProtectWarning &&
!confirm('You are about to move the fully protected page "' + ctx.pageName +
(editprot.attr('expiry') === 'infinity' ? '" (protected indefinitely)' : ('" (protection expiring ' + editprot.attr('expiry') + ')')) +
'. \n\nClick OK to proceed with the move, or Cancel to skip this move.')) {
ctx.statusElement.error("Move of fully protected page was aborted.");
ctx.onMoveFailure(this);
return;
}
}
var moveToken = $(xml).find('page').attr('movetoken');
if (!moveToken) {
ctx.statusElement.error("Failed to retrieve move token.");
ctx.onMoveFailure(this);
return;
}
var query = {
'action': 'move',
'from': $(xml).find('page').attr('title'),
'to': ctx.moveDestination,
'token': moveToken,
'reason': ctx.editSummary
};
if (ctx.moveTalkPage) {
query.movetalk = 'true';
}
if (ctx.moveSubpages) {
query.movesubpages = 'true'; // XXX don't know whether this works for non-admins
}
if (ctx.moveSuppressRedirect) {
query.noredirect = 'true';
}
if (ctx.watchlistOption === 'watch') {
query.watch = 'true';
}
ctx.moveProcessApi = new Morebits.wiki.api("moving page...", query, ctx.onMoveSuccess, ctx.statusElement, ctx.onMoveFailure);
ctx.moveProcessApi.setParent(this);
ctx.moveProcessApi.post();
};
var fnProcessDelete = function() {
var xml = ctx.deleteApi.getXML();
if ($(xml).find('page').attr('missing') === "") {
ctx.statusElement.error("Cannot delete the page, because it no longer exists");
ctx.onDeleteFailure(this);
return;
}
// extract protection info
var editprot = $(xml).find('pr[type="edit"]');
if (editprot.length > 0 && editprot.attr('level') === 'sysop' && !ctx.suppressProtectWarning &&
!confirm('You are about to delete the fully protected page "' + ctx.pageName +
(editprot.attr('expiry') === 'infinity' ? '" (protected indefinitely)' : ('" (protection expiring ' + editprot.attr('expiry') + ')')) +
'. \n\nClick OK to proceed with the deletion, or Cancel to skip this deletion.')) {
ctx.statusElement.error("Deletion of fully protected page was aborted.");
ctx.onDeleteFailure(this);
return;
}
var deleteToken = $(xml).find('page').attr('deletetoken');
if (!deleteToken) {
ctx.statusElement.error("Failed to retrieve delete token.");
ctx.onDeleteFailure(this);
return;
}
var query = {
'action': 'delete',
'title': $(xml).find('page').attr('title'),
'token': deleteToken,
'reason': ctx.editSummary
};
if (ctx.watchlistOption === 'watch') {
query.watch = 'true';
}
ctx.deleteProcessApi = new Morebits.wiki.api("deleting page...", query, ctx.onDeleteSuccess, ctx.statusElement, fnProcessDeleteError);
ctx.deleteProcessApi.setParent(this);
ctx.deleteProcessApi.post();
};
// callback from deleteProcessApi.post()
var fnProcessDeleteError = function() {
var errorCode = ctx.deleteProcessApi.getErrorCode();
// check for "Database query error"
if ( errorCode === "internal_api_error_DBQueryError" && ctx.retries++ < ctx.maxRetries ) {
ctx.statusElement.info("Database query error, retrying");
--Morebits.wiki.numberOfActionsLeft; // allow for normal completion if retry succeeds
ctx.deleteProcessApi.post(); // give it another go!
// hard error, give up
} else {
ctx.statusElement.error( "Failed to delete the page: " + ctx.deleteProcessApi.getErrorText() );
if (ctx.onDeleteFailure) {
ctx.onDeleteFailure.call(this, ctx.deleteProcessApi); // invoke callback
}
}
};
var fnProcessProtect = function() {
var xml = ctx.protectApi.getXML();
var missing = ($(xml).find('page').attr('missing') === "");
if (((ctx.protectEdit || ctx.protectMove) && missing)) {
ctx.statusElement.error("Cannot protect the page, because it no longer exists");
ctx.onProtectFailure(this);
return;
}
if (ctx.protectCreate && !missing) {
ctx.statusElement.error("Cannot create protect the page, because it already exists");
ctx.onProtectFailure(this);
return;
}
// TODO cascading protection not possible on edit<sysop
var protectToken = $(xml).find('page').attr('protecttoken');
if (!protectToken) {
ctx.statusElement.error("Failed to retrieve protect token.");
ctx.onProtectFailure(this);
return;
}
// fetch existing protection levels
var prs = $(xml).find('pr');
var editprot = prs.filter('[type="edit"]');
var moveprot = prs.filter('[type="move"]');
var createprot = prs.filter('[type="create"]');
var protections = [], expirys = [];
// set edit protection level
if (ctx.protectEdit) {
protections.push('edit=' + ctx.protectEdit.level);
expirys.push(ctx.protectEdit.expiry);
} else if (editprot.length) {
protections.push('edit=' + editprot.attr("level"));
expirys.push(editprot.attr("expiry").replace("infinity", "indefinite"));
}
if (ctx.protectMove) {
protections.push('move=' + ctx.protectMove.level);
expirys.push(ctx.protectMove.expiry);
} else if (moveprot.length) {
protections.push('move=' + moveprot.attr("level"));
expirys.push(moveprot.attr("expiry").replace("infinity", "indefinite"));
}
if (ctx.protectCreate) {
protections.push('create=' + ctx.protectCreate.level);
expirys.push(ctx.protectCreate.expiry);
} else if (createprot.length) {
protections.push('create=' + createprot.attr("level"));
expirys.push(createprot.attr("expiry").replace("infinity", "indefinite"));
}
var query = {
action: 'protect',
title: $(xml).find('page').attr('title'),
token: protectToken,
protections: protections.join('|'),
expiry: expirys.join('|'),
reason: ctx.editSummary
};
if (ctx.protectCascade) {
query.cascade = 'true';
}
if (ctx.watchlistOption === 'watch') {
query.watch = 'true';
}
ctx.protectProcessApi = new Morebits.wiki.api("protecting page...", query, ctx.onProtectSuccess, ctx.statusElement, ctx.onProtectFailure);
ctx.protectProcessApi.setParent(this);
ctx.protectProcessApi.post();
};
var fnProcessStabilize = function() {
var xml = ctx.stabilizeApi.getXML();
var missing = ($(xml).find('page').attr('missing') === "");
if (missing) {
ctx.statusElement.error("Cannot protect the page, because it no longer exists");
ctx.onStabilizeFailure(this);
return;
}
var stabilizeToken = $(xml).find('page').attr('edittoken');
if (!stabilizeToken) {
ctx.statusElement.error("Failed to retrieve stabilize token.");
ctx.onStabilizeFailure(this);
return;
}
var query = {
action: 'stabilize',
title: $(xml).find('page').attr('title'),
token: stabilizeToken,
protectlevel: ctx.flaggedRevs.level,
expiry: ctx.flaggedRevs.expiry,
reason: ctx.editSummary
};
if (ctx.watchlistOption === 'watch') {
query.watch = 'true';
}
ctx.stabilizeProcessApi = new Morebits.wiki.api("configuring stabilization settings...", query, ctx.onStabilizeSuccess, ctx.statusElement, ctx.onStabilizeFailure);
ctx.stabilizeProcessApi.setParent(this);
ctx.stabilizeProcessApi.post();
};
}; // end Morebits.wiki.page
/** Morebits.wiki.page TODO: (XXX)
* - Should we retry loads also?
* - Need to reset current action before the save?
* - Deal with action.completed stuff
* - Need to reset all parameters once done (e.g. edit summary, move destination, etc.)
*/
/**
* **************** Morebits.wiki.preview ****************
* Uses the API to parse a fragment of wikitext and render it as HTML.
*
* Constructor: Morebits.wiki.preview(previewbox, currentAction)
* previewbox - the <div> element that will contain the rendered HTML
*
* beginRender(wikitext): Displays the preview box, and begins an asynchronous attempt
* to render the specified wikitext.
* wikitext - wikitext to render; most things should work, including subst: and ~~~~
*
* closePreview(): Hides the preview box and clears it.
*
* The suggested implementation pattern (in Morebits.simpleWindow + Morebits.quickForm situations) is to
* construct a Morebits.wiki.preview object after rendering a Morebits.quickForm, and bind the object
* to an arbitrary property of the form (e.g. |previewer|). For an example, see
* twinklewarn.js.
*/
Morebits.wiki.preview = function(previewbox) {
this.previewbox = previewbox;
$(previewbox).addClass("morebits-previewbox").hide();
this.beginRender = function(wikitext) {
$(previewbox).show();
var statusspan = document.createElement('span');
previewbox.appendChild(statusspan);
Morebits.status.init(statusspan);
var query = {
action: 'parse',
prop: 'text',
pst: 'true', // PST = pre-save transform; this makes substitution work properly
text: wikitext,
title: mw.config.get('wgPageName')
};
var renderApi = new Morebits.wiki.api("loading...", query, fnRenderSuccess, new Morebits.status("Preview"));
renderApi.post();
};
var fnRenderSuccess = function(apiobj) {
var xml = apiobj.getXML();
var html = $(xml).find('text').text();
if (!html) {
apiobj.statelem.error("failed to retrieve preview, or template was blanked");
return;
}
previewbox.innerHTML = html;
};
this.closePreview = function() {
$(previewbox).empty().hide();
};
};
/**
* **************** Morebits.wikitext ****************
* Wikitext manipulation
*/
Morebits.wikitext = {};
Morebits.wikitext.template = {
parse: function( text, start ) {
var count = -1;
var level = -1;
var equals = -1;
var current = '';
var result = {
name: '',
parameters: {}
};
var key, value;
for( var i = start; i < text.length; ++i ) {
var test3 = text.substr( i, 3 );
if( test3 === '{{{' ) {
current += '{{{';
i += 2;
++level;
continue;
}
if( test3 === '}}}' ) {
current += '}}}';
i += 2;
--level;
continue;
}
var test2 = text.substr( i, 2 );
if( test2 === '{{' || test2 === '[[' ) {
current += test2;
++i;
++level;
continue;
}
if( test2 === '[[' ) {
current += test2;
++i;
--level;
continue;
}
if( test2 === '}}' ) {
current += test2;
++i;
--level;
if( level <= 0 ) {
if( count === -1 ) {
result.name = current.substring(2).trim();
++count;
} else {
if( equals !== -1 ) {
key = current.substring( 0, equals ).trim();
value = current.substring( equals ).trim();
result.parameters[key] = value;
equals = -1;
} else {
result.parameters[count] = current;
++count;
}
}
break;
}
continue;
}
if( text.charAt(i) === '|' && level <= 0 ) {
if( count === -1 ) {
result.name = current.substring(2).trim();
++count;
} else {
if( equals !== -1 ) {
key = current.substring( 0, equals ).trim();
value = current.substring( equals + 1 ).trim();
result.parameters[key] = value;
equals = -1;
} else {
result.parameters[count] = current;
++count;
}
}
current = '';
} else if( equals === -1 && text.charAt(i) === '=' && level <= 0 ) {
equals = current.length;
current += text.charAt(i);
} else {
current += text.charAt(i);
}
}
return result;
}
};
Morebits.wikitext.page = function mediawikiPage( text ) {
this.text = text;
};
Morebits.wikitext.page.prototype = {
text: '',
removeLink: function( link_target ) {
var first_char = link_target.substr( 0, 1 );
var link_re_string = "[" + first_char.toUpperCase() + first_char.toLowerCase() + ']' + RegExp.escape( link_target.substr( 1 ), true );
var link_simple_re = new RegExp( "\\[\\[:?(" + link_re_string + ")\\]\\]", 'g' );
var link_named_re = new RegExp( "\\[\\[:?" + link_re_string + "\\|(.+?)\\]\\]", 'g' );
this.text = this.text.replace( link_simple_re, "$1" ).replace( link_named_re, "$1" );
},
commentOutImage: function( image, reason ) {
var unbinder = new Morebits.unbinder( this.text );
unbinder.unbind( '<!--', '-->' );
reason = reason ? (reason + ': ') : '';
var first_char = image.substr( 0, 1 );
var image_re_string = "[" + first_char.toUpperCase() + first_char.toLowerCase() + ']' + RegExp.escape( image.substr( 1 ), true );
/*
* Check for normal image links, i.e. [[Image:Foobar.png|...]]
* Will eat the whole link
*/
var links_re = new RegExp( "\\[\\[(?:[Ii]mage|[Ff]ile):\\s*" + image_re_string );
var allLinks = Morebits.array.uniq(Morebits.string.splitWeightedByKeys( unbinder.content, '[[', ']]' ));
for( var i = 0; i < allLinks.length; ++i ) {
if( links_re.test( allLinks[i] ) ) {
var replacement = '<!-- ' + reason + allLinks[i] + ' -->';
unbinder.content = unbinder.content.replace( allLinks[i], replacement, 'g' );
}
}
// unbind the newly created comments
unbinder.unbind( '<!--', '-->' );
/*
* Check for gallery images, i.e. instances that must start on a new line, eventually preceded with some space, and must include Image: prefix
* Will eat the whole line.
*/
var gallery_image_re = new RegExp( "(^\\s*(?:[Ii]mage|[Ff]ile):\\s*" + image_re_string + ".*?$)", 'mg' );
unbinder.content = unbinder.content.replace( gallery_image_re, "<!-- " + reason + "$1 -->" );
// unbind the newly created comments
unbinder.unbind( '<!--', '-->' );
/*
* Check free image usages, for example as template arguments, might have the Image: prefix excluded, but must be preceeded by an |
* Will only eat the image name and the preceeding bar and an eventual named parameter
*/
var free_image_re = new RegExp( "(\\|\\s*(?:[\\w\\s]+\\=)?\\s*(?:(?:[Ii]mage|[Ff]ile):\\s*)?" + image_re_string + ")", 'mg' );
unbinder.content = unbinder.content.replace( free_image_re, "<!-- " + reason + "$1 -->" );
// Rebind the content now, we are done!
this.text = unbinder.rebind();
},
addToImageComment: function( image, data ) {
var first_char = image.substr( 0, 1 );
var first_char_regex = RegExp.escape( first_char, true );
if( first_char.toUpperCase() !== first_char.toLowerCase() ) {
first_char_regex = '[' + RegExp.escape( first_char.toUpperCase(), true ) + RegExp.escape( first_char.toLowerCase(), true ) + ']';
}
var image_re_string = "(?:[Ii]mage|[Ff]ile):\\s*" + first_char_regex + RegExp.escape( image.substr( 1 ), true );
var links_re = new RegExp( "\\[\\[" + image_re_string );
var allLinks = Morebits.array.uniq(Morebits.string.splitWeightedByKeys( this.text, '[[', ']]' ));
for( var i = 0; i < allLinks.length; ++i ) {
if( links_re.test( allLinks[i] ) ) {
var replacement = allLinks[i];
// just put it at the end?
replacement = replacement.replace( /\]\]$/, '|' + data + ']]' );
this.text = this.text.replace( allLinks[i], replacement, 'g' );
}
}
var gallery_re = new RegExp( "^(\\s*" + image_re_string + '.*?)\\|?(.*?)$', 'mg' );
var newtext = "$1|$2 " + data;
this.text = this.text.replace( gallery_re, newtext );
},
removeTemplate: function( template ) {
var first_char = template.substr( 0, 1 );
var template_re_string = "(?:[Tt]emplate:)?\\s*[" + first_char.toUpperCase() + first_char.toLowerCase() + ']' + RegExp.escape( template.substr( 1 ), true );
var links_re = new RegExp( "\\{\\{" + template_re_string );
var allTemplates = Morebits.array.uniq(Morebits.string.splitWeightedByKeys( this.text, '{{', '}}', [ '{{{', '}}}' ] ));
for( var i = 0; i < allTemplates.length; ++i ) {
if( links_re.test( allTemplates[i] ) ) {
this.text = this.text.replace( allTemplates[i], '', 'g' );
}
}
},
getText: function() {
return this.text;
}
};
/**
* **************** Morebits.queryString ****************
* Maps the querystring to an object
*
* Functions:
*
* Morebits.queryString.exists(key)
* returns true if the particular key is set
* Morebits.queryString.get(key)
* returns the value associated to the key
* Morebits.queryString.equals(key, value)
* returns true if the value associated with given key equals given value
* Morebits.queryString.toString()
* returns the query string as a string
* Morebits.queryString.create( hash )
* creates an querystring and encodes strings via encodeURIComponent and joins arrays with |
*
* In static context, the value of location.search.substring(1), else the value given to the constructor is going to be used. The mapped hash is saved in the object.
*
* Example:
*
* var value = Morebits.queryString.get('key');
* var obj = new Morebits.queryString('foo=bar&baz=quux');
* value = obj.get('foo');
*/
Morebits.queryString = function QueryString(qString) {
this.string = qString;
this.params = {};
if( !qString.length ) {
return;
}
qString.replace(/\+/, ' ');
var args = qString.split('&');
for( var i = 0; i < args.length; ++i ) {
var pair = args[i].split( '=' );
var key = decodeURIComponent( pair[0] ), value = key;
if( pair.length === 2 ) {
value = decodeURIComponent( pair[1] );
}
this.params[key] = value;
}
};
Morebits.queryString.staticstr = null;
Morebits.queryString.staticInit = function() {
if( !Morebits.queryString.staticstr ) {
Morebits.queryString.staticstr = new Morebits.queryString(location.search.substring(1));
}
};
Morebits.queryString.get = function(key) {
Morebits.queryString.staticInit();
return Morebits.queryString.staticstr.get(key);
};
Morebits.queryString.prototype.get = function(key) {
return this.params[key] ? this.params[key] : null;
};
Morebits.queryString.exists = function(key) {
Morebits.queryString.staticInit();
return Morebits.queryString.staticstr.exists(key);
};
Morebits.queryString.prototype.exists = function(key) {
return this.params[key] ? true : false;
};
Morebits.queryString.equals = function(key, value) {
Morebits.queryString.staticInit();
return Morebits.queryString.staticstr.equals(key, value);
};
Morebits.queryString.prototype.equals = function(key, value) {
return this.params[key] === value ? true : false;
};
Morebits.queryString.toString = function() {
Morebits.queryString.staticInit();
return Morebits.queryString.staticstr.toString();
};
Morebits.queryString.prototype.toString = function() {
return this.string ? this.string : null;
};
Morebits.queryString.create = function( arr ) {
var resarr = [];
var editToken; // KLUGE: this should always be the last item in the query string (bug TW-B-0013)
for( var i in arr ) {
if( arr[i] === undefined ) {
continue;
}
var res;
if( $.isArray( arr[i] ) ){
var v = [];
for(var j = 0; j < arr[i].length; ++j ) {
v[j] = encodeURIComponent( arr[i][j] );
}
res = v.join('|');
} else {
res = encodeURIComponent( arr[i] );
}
if( i === 'token' ) {
editToken = res;
} else {
resarr.push( encodeURIComponent( i ) + '=' + res );
}
}
if( editToken !== undefined ) {
resarr.push( 'token=' + editToken );
}
return resarr.join('&');
};
Morebits.queryString.prototype.create = Morebits.queryString.create;
/**
* **************** Morebits.status ****************
*/
Morebits.status = function Status( text, stat, type ) {
this.textRaw = text;
this.text = this.codify(text);
this.type = type || 'status';
this.generate();
if( stat ) {
this.update( stat, type );
}
};
Morebits.status.init = function( root ) {
if( !( root instanceof Element ) ) {
throw new Error( 'object not an instance of Element' );
}
while( root.hasChildNodes() ) {
root.removeChild( root.firstChild );
}
Morebits.status.root = root;
Morebits.status.errorEvent = null;
};
Morebits.status.root = null;
Morebits.status.onError = function( handler ) {
if ( $.isFunction( handler ) ) {
Morebits.status.errorEvent = handler;
} else {
throw "Morebits.status.onError: handler is not a function";
}
};
Morebits.status.prototype = {
stat: null,
text: null,
textRaw: null,
type: 'status',
target: null,
node: null,
linked: false,
link: function() {
if( ! this.linked && Morebits.status.root ) {
Morebits.status.root.appendChild( this.node );
this.linked = true;
}
},
unlink: function() {
if( this.linked ) {
Morebits.status.root.removeChild( this.node );
this.linked = false;
}
},
codify: function( obj ) {
if ( ! $.isArray( obj ) ) {
obj = [ obj ];
}
var result;
result = document.createDocumentFragment();
for( var i = 0; i < obj.length; ++i ) {
if( typeof obj[i] === 'string' ) {
result.appendChild( document.createTextNode( obj[i] ) );
} else if( obj[i] instanceof Element ) {
result.appendChild( obj[i] );
} // Else cosmic radiation made something shit
}
return result;
},
update: function( status, type ) {
this.stat = this.codify( status );
if( type ) {
this.type = type;
if (type === 'error') {
// hack to force the page not to reload when an error is output - see also Morebits.status() above
Morebits.wiki.numberOfActionsLeft = 1000;
// call error callback
if (Morebits.status.errorEvent) {
Morebits.status.errorEvent();
}
// also log error messages in the browser console
if (console && console.error) {
console.error(this.textRaw + ": " + status);
}
}
}
this.render();
},
generate: function() {
this.node = document.createElement( 'div' );
this.node.appendChild( document.createElement('span') ).appendChild( this.text );
this.node.appendChild( document.createElement('span') ).appendChild( document.createTextNode( ': ' ) );
this.target = this.node.appendChild( document.createElement( 'span' ) );
this.target.appendChild( document.createTextNode( '' ) ); // dummy node
},
render: function() {
this.node.className = 'tw_status_' + this.type;
while( this.target.hasChildNodes() ) {
this.target.removeChild( this.target.firstChild );
}
this.target.appendChild( this.stat );
this.link();
},
status: function( status ) {
this.update( status, 'status');
},
info: function( status ) {
this.update( status, 'info');
},
warn: function( status ) {
this.update( status, 'warn');
},
error: function( status ) {
this.update( status, 'error');
}
};
Morebits.status.info = function( text, status ) {
return new Morebits.status( text, status, 'info' );
};
Morebits.status.warn = function( text, status ) {
return new Morebits.status( text, status, 'warn' );
};
Morebits.status.error = function( text, status ) {
return new Morebits.status( text, status, 'error' );
};
/**
* **************** Morebits.htmlNode() ****************
* Simple helper function to create a simple node
*/
Morebits.htmlNode = function ( type, content, color ) {
var node = document.createElement( type );
if( color ) {
node.style.color = color;
}
node.appendChild( document.createTextNode( content ) );
return node;
};
/**
* **************** Morebits.simpleWindow ****************
* A simple draggable window
* now a wrapper for jQuery UI's dialog feature
*/
// The height passed in here is the maximum allowable height for the content area.
Morebits.simpleWindow = function SimpleWindow( width, height ) {
var content = document.createElement( 'div' );
this.content = content;
content.className = 'morebits-dialog-content';
this.height = height;
$(this.content).dialog({
autoOpen: false,
buttons: { "Placeholder button": function() {} },
dialogClass: 'morebits-dialog',
width: Math.min(parseInt(window.innerWidth, 10), parseInt(width ? width : 800, 10)),
// give jQuery the given height value (which represents the anticipated height of the dialog) here, so
// it can position the dialog appropriately
// the 20 pixels represents adjustment for the extra height of the jQuery dialog "chrome", compared
// to that of the old SimpleWindow
height: height + 20,
close: function(event, ui) {
// dialogs and their content can be destroyed once closed
$(event.target).dialog("destroy").remove();
},
resize: function(event, ui) {
this.style.maxHeight = "";
}
});
var $widget = $(this.content).dialog("widget");
// add background gradient to titlebar
var $titlebar = $widget.find(".ui-dialog-titlebar");
var oldstyle = $titlebar.attr("style");
$titlebar.attr("style", (oldstyle ? oldstyle : "") + '; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB%2FqqA%2BAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEhQTFRFr73ZobTPusjdsMHZp7nVwtDhzNbnwM3fu8jdq7vUt8nbxtDkw9DhpbfSvMrfssPZqLvVztbno7bRrr7W1d%2Fs1N7qydXk0NjpkW7Q%2BgAAADVJREFUeNoMwgESQCAAAMGLkEIi%2FP%2BnbnbpdB59app5Vdg0sXAoMZCpGoFbK6ciuy6FX4ABAEyoAef0BXOXAAAAAElFTkSuQmCC) !important;');
// delete the placeholder button (it's only there so the buttonpane gets created)
$widget.find("button").each(function(key, value) {
value.parentNode.removeChild(value);
});
// add container for the buttons we add, and the footer links (if any)
var buttonspan = document.createElement("span");
buttonspan.className = "morebits-dialog-buttons";
var linksspan = document.createElement("span");
linksspan.className = "morebits-dialog-footerlinks";
$widget.find(".ui-dialog-buttonpane").append(buttonspan, linksspan);
};
Morebits.simpleWindow.prototype = {
buttons: [],
height: 600,
hasFooterLinks: false,
scriptName: null,
// Focuses the dialog. This might work, or on the contrary, it might not.
focus: function(event) {
$(this.content).dialog("moveToTop");
return this;
},
// Closes the dialog. If this is set as an event handler, it will stop the event from doing anything more.
close: function(event) {
if (event) {
event.preventDefault();
}
$(this.content).dialog("close");
return this;
},
// Shows the dialog. Calling display() on a dialog that has previously been closed might work, but it is not guaranteed.
display: function() {
if (this.scriptName) {
var $widget = $(this.content).dialog("widget");
$widget.find(".morebits-dialog-scriptname").remove();
var scriptnamespan = document.createElement("span");
scriptnamespan.className = "morebits-dialog-scriptname";
scriptnamespan.textContent = this.scriptName + " \u00B7 "; // U+00B7 MIDDLE DOT = ·
$widget.find(".ui-dialog-title").prepend(scriptnamespan);
}
var dialog = $(this.content).dialog("open");
if (window.setupTooltips && window.pg && window.pg.re && window.pg.re.diff) { // tie in with NAVPOP
dialog.parent()[0].ranSetupTooltipsAlready = false;
setupTooltips(dialog.parent()[0]);
}
this.setHeight( this.height ); // init height algorithm
return this;
},
// Sets the dialog title.
setTitle: function( title ) {
$(this.content).dialog("option", "title", title);
return this;
},
// Sets the script name, appearing as a prefix to the title to help users determine which
// user script is producing which dialog. For instance, Twinkle modules set this to "Twinkle".
setScriptName: function( name ) {
this.scriptName = name;
return this;
},
// Sets the dialog width.
setWidth: function( width ) {
$(this.content).dialog("option", "width", width);
return this;
},
// Sets the dialog's maximum height. The dialog will auto-size to fit its contents,
// but the content area will grow no larger than the height given here.
setHeight: function( height ) {
this.height = height;
// from display time onwards, let the browser determine the optimum height, and instead limit the height at the given value
// note that the given height will exclude the approx. 20px that the jQuery UI chrome has in height in addition to the height
// of an equivalent "classic" Morebits.simpleWindow
if (parseInt(getComputedStyle($(this.content).dialog("widget")[0], null).height, 10) > window.innerHeight) {
$(this.content).dialog("option", "height", window.innerHeight - 2).dialog("option", "position", "top");
} else {
$(this.content).dialog("option", "height", "auto");
}
$(this.content).dialog("widget").find(".morebits-dialog-content")[0].style.maxHeight = parseInt(this.height - 30, 10) + "px";
return this;
},
// Sets the content of the dialog to the given element node, usually from rendering a Morebits.quickForm.
// Re-enumerates the footer buttons, but leaves the footer links as they are.
// Be sure to call this at least once before the dialog is displayed...
setContent: function( content ) {
this.purgeContent();
this.addContent( content );
return this;
},
addContent: function( content ) {
this.content.appendChild( content );
// look for submit buttons in the content, hide them, and add a proxy button to the button pane
var thisproxy = this;
$(this.content).find('input[type="submit"], button[type="submit"]').each(function(key, value) {
value.style.display = "none";
var button = document.createElement("button");
button.textContent = (value.hasAttribute("value") ? value.getAttribute("value") : (value.textContent ? value.textContent : "Submit Query"));
// here is an instance of cheap coding, probably a memory-usage hit in using a closure here
button.addEventListener("click", function() { value.click(); }, false);
thisproxy.buttons.push(button);
});
// remove all buttons from the button pane and re-add them
if (this.buttons.length > 0) {
$(this.content).dialog("widget").find(".morebits-dialog-buttons").empty().append(this.buttons)[0].removeAttribute("data-empty");
} else {
$(this.content).dialog("widget").find(".morebits-dialog-buttons")[0].setAttribute("data-empty", "data-empty"); // used by CSS
}
return this;
},
purgeContent: function( content ) {
this.buttons = [];
// delete all buttons in the buttonpane
$(this.content).dialog("widget").find(".morebits-dialog-buttons").empty();
while( this.content.hasChildNodes() ) {
this.content.removeChild( this.content.firstChild );
}
return this;
},
// Adds a link in the bottom-right corner of the dialog.
// This can be used to provide help or policy links.
// For example, Twinkle's CSD module adds a link to the CSD policy page,
// as well as a link to Twinkle's documentation.
addFooterLink: function( text, wikiPage ) {
var $footerlinks = $(this.content).dialog("widget").find(".morebits-dialog-footerlinks");
if (this.hasFooterLinks) {
var bullet = document.createElement("span");
bullet.textContent = " \u2022 "; // U+2022 BULLET
$footerlinks.append(bullet);
}
var link = document.createElement("a");
link.setAttribute("href", mw.util.getUrl(wikiPage) );
link.setAttribute("title", wikiPage);
link.setAttribute("target", "_blank");
link.textContent = text;
$footerlinks.append(link);
this.hasFooterLinks = true;
return this;
},
setModality: function( modal ) {
$(this.content).dialog("option", "modal", modal);
return this;
}
};
// Enables or disables all footer buttons on all Morebits.simpleWindows in the current page.
// This should be called with |false| when the button(s) become irrelevant (e.g. just before Morebits.status.init is called).
// This is not an instance method so that consumers don't have to keep a reference to the original
// Morebits.simpleWindow object sitting around somewhere. Anyway, most of the time there will only be one
// Morebits.simpleWindow open, so this shouldn't matter.
Morebits.simpleWindow.setButtonsEnabled = function( enabled ) {
$(".morebits-dialog-buttons button").attr("disabled", !enabled);
};
// Twinkle blacklist was removed per consensus at http://en.wikipedia.org/wiki/Wikipedia:Administrators%27_noticeboard/Archive221#New_Twinkle_blacklist_proposal
} ( window, document, jQuery )); // End wrap with anonymous function
/**
* If this script is being executed outside a ResourceLoader context, we add some
* global assignments for legacy scripts, hopefully these can be removed down the line
*
* IMPORTANT NOTE:
* PLEASE DO NOT USE THESE ALIASES IN NEW CODE!
* Thanks.
*/
if ( typeof arguments === "undefined" ) { // typeof is here for a reason...
window.SimpleWindow = Morebits.simpleWindow;
window.QuickForm = Morebits.quickForm;
window.Wikipedia = Morebits.wiki;
window.Status = Morebits.status;
window.QueryString = Morebits.queryString;
}
// </nowiki>
454beb52e81edac0df25ab52d7ea2a2717f4529d
MediaWiki:Gadget-move-to-sandbox
8
93
246
245
2014-01-16T23:53:07Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
[[Wikipedia:Narzędzia/Przenieś do brudnopisu|Przenieś do brudnopisu]] – skrypt dodaje w przestrzeni głównej link w menu narzędzia, który umożliwia szybkie przenoszenie stron do brudnopisu autora.
407bcedc85f4705318acf59fe244ce19d923f438
245
2011-10-29T10:22:30Z
Beau
0
wikitext
text/x-wiki
[[Wikipedia:Narzędzia/Przenieś do brudnopisu|Przenieś do brudnopisu]] – skrypt dodaje w przestrzeni głównej link w menu narzędzia, który umożliwia szybkie przenoszenie stron do brudnopisu autora.
407bcedc85f4705318acf59fe244ce19d923f438
MediaWiki:Gadget-move-to-sandbox.css
8
95
250
249
2014-01-16T23:53:07Z
Ffkapa
2
1 wersja
css
text/css
.moveToSandboxDialog label, .moveToSandboxDialog input, .moveToSandboxDialog textarea, #mtsg-author { display:block; }
.moveToSandboxDialog input.text, .moveToSandboxDialog textarea, #mtsg-author { margin-bottom:12px; width:95%; padding: .4em; }
.moveToSandboxDialog fieldset { padding:0; border:0; }
.moveToSandboxDialog .ui-widget-content { border: 1px solid #DDD; }
#mtsg-error { color: red; }
#mtsg-jobs img { margin-left: 10px; margin-right: 4px; padding: 1px; vertical-align: middle; }
#mtsg-message { font-family: monospace; font-size: 13px; }
.mtsg-message-full { height: 190px; }
c21b671230975aebaee89ac3a3fb92d9b5df6b46
249
2012-01-21T16:56:15Z
Beau
0
rozmiar
css
text/css
.moveToSandboxDialog label, .moveToSandboxDialog input, .moveToSandboxDialog textarea, #mtsg-author { display:block; }
.moveToSandboxDialog input.text, .moveToSandboxDialog textarea, #mtsg-author { margin-bottom:12px; width:95%; padding: .4em; }
.moveToSandboxDialog fieldset { padding:0; border:0; }
.moveToSandboxDialog .ui-widget-content { border: 1px solid #DDD; }
#mtsg-error { color: red; }
#mtsg-jobs img { margin-left: 10px; margin-right: 4px; padding: 1px; vertical-align: middle; }
#mtsg-message { font-family: monospace; font-size: 13px; }
.mtsg-message-full { height: 190px; }
c21b671230975aebaee89ac3a3fb92d9b5df6b46
MediaWiki:Gadget-move-to-sandbox.js
8
94
248
247
2014-01-16T23:53:07Z
Ffkapa
2
1 wersja
javascript
text/javascript
/* Translatable strings */
mw.messages.set( {
'mtsg-move-link': 'Przenieś do brudnopisu',
'mtsg-user-talk-link': 'dyskusja',
'mtsg-user-contribs-link': 'wkład',
'mtsg-dialog-title': 'Przenieś do brudnopisu',
'mtsg-author-label': 'Autor artykułu:',
'mtsg-author-pending': 'sprawdzanie',
'mtsg-destination-label': 'Docelowa nazwa artykułu:',
'mtsg-reason-label': 'Uzasadnienie:',
'mtsg-default-reason': 'artykuł należy dopracować',
'mtsg-message-label': 'Wiadomość dla użytkownika:',
'mtsg-error-label': 'Błąd:',
'mtsg-jobs-label': 'Wykonywane zadania:',
'mtsg-link-placeholder': '$link',
'mtsg-default-message': 'Witaj. Twój artykuł nie nadaje się jeszcze do publikacji w Wikipedii, dlatego został przeniesiony do twojego brudnopisu [[$link]], gdzie możesz nad nim popracować. Należy w nim poprawić:\n* ...\n* ...\n* ...\nPo skończeniu użyj [[Pomoc:Zmiana nazwy strony|zakładki przenieś]], aby opublikować go ponownie. Jeżeli nie możesz przenieść samodzielnie (należy mieć konto zarejestrowane od co najmniej 4 dni oraz 10 edycji), zwróć się do dowolnego bardziej zaawansowanego wikipedysty lub do [[WP:PdA|administratorów]]. Pozdrawiam, ~~' + '~~',
'mtsg-confirm-button': 'Przenieś',
'mtsg-cancel-button': 'Anuluj',
'mtsg-move-page-job': 'Przenoszenie strony',
'mtsg-insert-speedy-job': 'Wstawianie szablonu ek do przekierowania',
'mtsg-send-message-job': 'Wysyłanie wiadomości autorowi',
'mtsg-redirect-job': 'Przejście na stronę po przenosinach',
'mtsg-speedy-template': '{' + '{ek|1=strona została przeniesiona do [[$1|brudnopisu autora]]}}\n',
'mtsg-speedy-summary': 'Oznaczenie przekierowania po przenosinach do skasowania',
'mtsg-error-nonexistent-page': 'Artykuł nie istnieje.',
'mtsg-error-unknown-author': 'Nie można określić autora artykułu.',
'mtsg-error-anonymous-author': 'Anonimowy użytkownik nie posiada brudnopisu.',
'mtsg-error-no-move-permission': 'Nie masz uprawnień do przenoszenia stron.',
'mtsg-error-empty-destination-name': 'Nazwa strony docelowej nie może być pusta.',
'mtsg-error-move-message-not-changed': 'Uzupełnij wiadomość do użytkownika.',
'mtsg-error-caught-exception': 'Wystąpił błąd podczas działania gadżetu. Przekaż następujące informacje autorowi:',
'mtsg-error-api-error': 'Operacja się nie powiodła' // FIXME
} );
window.moveToSandboxGadget = { /** Version of the gadget */
version: 7,
/* Gadget variables */
canSuppressRedirect: false,
moveToken: null,
moveSource: mw.config.get( 'wgPageName' ).replace( /_/g, ' ' ),
moveDestination: null,
moveReason: null,
author: null,
jobQueue: [],
currentJob: null,
debug: false,
/** Gadget entry point */
init: function() {
if ( mw.config.get( 'wgNamespaceNumber' ) != 0 || mw.config.get( 'wgArticleId' ) == 0 ) {
return;
}
var that = this;
jQuery( document ).ready( function() {
that.addMenu();
} );
},
/** Adds menu for triggering dialog box */
addMenu: function() {
var that = this;
mw.util.addPortletLink( 'p-tb', '', mw.msg( 'mtsg-move-link' ), 'move-to-sandbox' );
jQuery( '#move-to-sandbox a' ).click( function( event ) {
that.open();
event.preventDefault();
} ).attr( 'href', '#' );
},
/** Shows dialog box */
open: function() {
var dialog = jQuery('<div></div>').append(
'<form>' +
'<fieldset id="mtsg-fieldset">' +
'<label for="mtsg-author">' + mw.msg( 'mtsg-author-label' ) + '</label>' +
'<span id="mtsg-author" class="text ui-widget-content ui-corner-all">' + mw.msg( 'mtsg-author-pending' ) + '</span>' +
'<label for="mtsg-destination">' + mw.msg( 'mtsg-destination-label' ) + '</label>' +
'<input type="text" name="mtsg-destination" id="mtsg-destination" class="text ui-widget-content ui-corner-all" disabled="disabled"/>' +
'<label for="mtsg-reason">' + mw.msg( 'mtsg-reason-label' ) + '</label>' +
'<input type="text" name="mtsg-reason" id="mtsg-reason" class="text ui-widget-content ui-corner-all" value="' + mw.msg( 'mtsg-default-reason' ) + '"/>' +
'<label for="mtsg-message">' + mw.msg( 'mtsg-message-label' ) + '</label>' +
'<textarea rows="3" name="mtsg-message" id="mtsg-message" class="text ui-widget-content ui-corner-all mtsg-message-full">' + mw.message( 'mtsg-default-message' ).plain() + '</textarea>' +
'</fieldset>' +
'</form>'
);
var buttons = {};
buttons[mw.msg( 'mtsg-cancel-button' )] = function() {
jQuery( this ).dialog( 'close' );
};
jQuery( dialog ).dialog( {
width: 600,
height: 600,
modal: true,
resizable: false,
draggable: true,
closeOnEscape: true,
dialogClass: 'moveToSandboxDialog',
title: mw.msg( 'mtsg-dialog-title' ),
close: function() {
jQuery( this ).dialog( 'destroy' );
jQuery( this ).remove();
},
buttons: buttons
} );
var that = this;
var request = {
action: 'query',
prop: 'revisions|info',
rvprop: 'user|userid',
rvdir: 'newer',
meta: 'userinfo',
uiprop: 'rights',
titles: mw.config.get( 'wgPageName' ),
rvlimit: 1,
intoken: 'move'
};
this.callApi( request, function( data ) {
var page = data.query.pages[mw.config.get( 'wgArticleId' )];
if ( !page ) {
that.showError( mw.msg( 'mtsg-error-nonexistent-page' ) );
return;
}
var revision = page.revisions[0];
if ( !revision || !revision.user ) {
that.showError( mw.msg( 'mtsg-error-unknown-author' ) );
return;
}
jQuery('#mtsg-author').empty().append(
jQuery('<a></a>').attr('href', mw.util.wikiGetlink('User:' + revision.user)).append(document.createTextNode(revision.user)),
' (',
jQuery('<a>' + mw.msg( 'mtsg-user-talk-link' ) + '</a>').attr('href', mw.util.wikiGetlink('User_talk:' + revision.user)),
', ',
jQuery('<a>' + mw.msg( 'mtsg-user-contribs-link' ) + '</a>').attr('href', mw.util.wikiGetlink('Special:Contributions/' + revision.user)),
')'
);
if ( !revision.userid ) {
that.showError( mw.msg( 'mtsg-error-anonymous-author' ) );
return;
}
jQuery( '#mtsg-destination' ).attr( 'disabled', false ).val( mw.config.get( 'wgFormattedNamespaces' )[2] + ':' + revision.user + '/' + that.moveSource );
var userRights = data.query.userinfo.rights;
if ( jQuery.inArray( 'move', userRights ) == -1 ) {
that.showError( mw.msg( 'mtsg-error-no-move-permission' ) );
return;
}
that.canSuppressRedirect = jQuery.inArray( 'suppressredirect', userRights ) > -1;
that.moveToken = page.movetoken;
that.author = revision.user;
// Add confirm button
buttons[mw.msg( 'mtsg-confirm-button' )] = function() {
that.confirm( dialog )
};
jQuery( dialog ).dialog( "option", "buttons", buttons );
} );
},
/** Shows error on the dialog */
showError: function( message ) {
// Shrink the message field
jQuery( '#mtsg-message' ).removeClass( 'mtsg-message-full' );
jQuery( '#mtsg-fieldset' ).append( '<label for="mtsg-error">' + mw.msg( 'mtsg-error-label' ) + '</label>' );
jQuery( '#mtsg-fieldset' ).append( '<p id="mtsg-error">' + message + '</p>' );
this.updateCurrentStatus( 'error' );
},
updateCurrentStatus: function( status ) {
if ( !this.currentJob ) {
return;
}
if ( status == 'done' ) {
this.currentJob.image.src = '//upload.wikimedia.org/wikipedia/commons/thumb/3/34/Crystal_Clear_app_clean.png/16px-Crystal_Clear_app_clean.png';
} else if ( status == 'running' ) {
this.currentJob.image.src = '//upload.wikimedia.org/wikipedia/commons/3/32/Loader3.gif';
} else {
this.currentJob.image.src = '//upload.wikimedia.org/wikipedia/commons/thumb/9/99/Crystal_128_error.svg/16px-Crystal_128_error.svg.png';
}
},
/** Exception handler */
handleException: function( e ) {
var message = errorCaughtException + '\n' + e.name + ':' + e.message;
if ( e.stack ) {
message += '\n' + e.stack;
}
showError( message );
},
/** Creates list of jobs, and starts executing them */
processQueue: function() {
jQuery( '#mtsg-fieldset' ).append( '<label for="mtsg-jobs">' + mw.msg( 'mtsg-jobs-label' ) + '</label>' );
jQuery( '#mtsg-fieldset' ).append( '<div id="mtsg-jobs"></div>' );
// Shrink the message field
jQuery( '#mtsg-message' ).removeClass( 'mtsg-message-full' );
for ( var index in this.jobQueue ) {
var job = this.jobQueue[index];
var image = jQuery( '<img src="//upload.wikimedia.org/wikipedia/commons/1/11/Hourglass.png" width="16" height="16">' );
jQuery( '#mtsg-jobs' ).append( jQuery( '<div id="job-' + job.name + '"></div>' ).append( image, job.description ) );
job.image = image[0];
}
this.executeNextJob();
},
/** Executes next enqueued job */
executeNextJob: function() {
if ( this.currentJob ) {
this.updateCurrentStatus( 'done' );
}
if ( !this.jobQueue.length ) {
if ( this.debug ) {
console.log( 'There are no jobs left' );
}
return;
}
var that = this;
var job = this.jobQueue.shift();
if ( this.debug ) {
console.log( 'Executing job: ' + job.name );
console.log( job );
}
job.callback = function( success ) {
that.executeNextJob();
};
job.owner = this;
this.currentJob = job;
this.updateCurrentStatus( 'running' );
try {
job.execute();
} catch ( e ) {
this.handleException( e );
}
},
/** Performs move */
confirm: function( dialog ) {
var gadget = this;
this.moveDestination = jQuery( '#mtsg-destination' ).val().trim();
if ( this.moveDestination == '' ) {
alert( mw.msg( 'mtsg-error-empty-destination-name' ) );
return;
}
this.moveReason = jQuery( '#mtsg-reason' ).val().trim();
this.moveMessage = jQuery( '#mtsg-message' ).val().trim();
if ( this.moveMessage == jQuery.trim( mw.msg( 'mtsg-default-message' ) ) ) {
alert( mw.msg( 'mtsg-error-move-message-not-changed' ) );
return;
}
var buttons = jQuery( dialog ).dialog( 'option', 'buttons' );
delete buttons[mw.msg( 'mtsg-confirm-button' )];
jQuery( dialog ).dialog( 'option', 'buttons', buttons );
this.jobQueue = [];
this.jobQueue.push( {
name: 'move',
description: mw.msg( 'mtsg-move-page-job' ),
execute: function() {
var job = this;
var request = {
action: 'move',
fromid: mw.config.get( 'wgArticleId' ),
to: gadget.moveDestination,
token: gadget.moveToken,
reason: gadget.moveReason,
movetalk: 1
}
if ( gadget.canSuppressRedirect ) {
request['noredirect'] = 1;
}
gadget.callApi( request, function( data ) {
if ( data.error && data.error.code ) {
gadget.showError( data.error.code );
} else {
job.callback();
}
} );
}
} );
if ( !gadget.canSuppressRedirect ) {
this.jobQueue.push( {
name: 'speedy',
description: mw.msg( 'mtsg-insert-speedy-job' ),
execute: function() {
var job = this;
var request = {
action: 'edit',
title: gadget.moveSource,
prependtext: mw.message( 'mtsg-speedy-template', gadget.moveDestination ).plain(),
nocreate: 1,
summary: mw.msg( 'mtsg-speedy-summary' )
}
gadget.editPage( request, function( data ) {
if ( !data.edit || data.edit.result != 'Success' ) {
gadget.showError( mw.msg( 'mtsg-error-api-error' ) );
} else {
job.callback();
}
} );
}
} );
}
if ( this.moveMessage != '' ) {
this.jobQueue.push( {
name: 'message',
description: mw.msg( 'mtsg-send-message-job' ),
messageTitle: '[[:' + this.moveSource + '|' + this.moveSource + ']]',
messageText: this.moveMessage.replace( /\$link/g, this.moveDestination ),
execute: function() {
var job = this;
var request = {
action: 'edit',
title: 'User talk:' + gadget.author,
text: this.messageText,
section: 'new',
summary: this.messageTitle
}
gadget.editPage( request, function( data ) {
if ( !data.edit || data.edit.result != 'Success' ) {
gadget.showError( mw.msg( 'mtsg-error-api-error' ) );
} else {
job.callback();
}
} );
}
} );
}
this.jobQueue.push( {
name: 'redirect',
description: mw.msg( 'mtsg-redirect-job' ),
execute: function() {
setTimeout( function() {
window.location = mw.util.wikiGetlink( gadget.moveDestination );
}, 1000 );
}
} );
gadget.processQueue();
},
/**
* Performs MediaWiki call using post method.
* @param request
* Api request.
* @param callback
* Function to be called when request is completed.
*/
callApi: function( request, callback ) {
var gadget = this;
if ( gadget.debug ) {
console.log( 'Sending api request: ', request );
}
request.format = 'json';
jQuery.post( mw.util.wikiScript( 'api' ), request, function( data ) {
if ( gadget.debug ) {
console.log( 'Response: ', data );
}
try {
callback( data );
} catch ( e ) {
gadget.handleException( e );
}
}, 'json' );
},
/**
* Performs edit, fetches edit token if not provided.
* @param request
* Api request.
* @param callback
* Function to be called when request is completed.
*/
editPage: function( request, callback ) {
var gadget = this;
if ( request.title == null ) {
throw new Error( 'Page title is missing' );
}
if ( callback == null ) {
throw new Error( 'Callback is missing' );
}
if ( request.token == null ) {
var tokenRequest = {
action: 'query',
prop: 'info',
format: 'json',
titles: request.title,
intoken: 'edit'
}
gadget.callApi( tokenRequest, function( data ) {
if ( data.error ) {
callback( data );
return;
}
var page;
for ( var pageId in data.query.pages ) {
page = data.query.pages[pageId];
}
if ( !page || page.edittoken == null ) {
callback( data );
return;
}
request.title = page.title;
request.token = page.edittoken;
gadget.editPage( request, callback );
} );
} else {
gadget.callApi( request, callback );
}
}
};
moveToSandboxGadget.init();
0e98fd2e2dba7910e4df685ed0d56ba96b71c8ea
247
2013-12-21T16:49:55Z
Ciacho5
0
ładniej po polskiemu
javascript
text/javascript
/* Translatable strings */
mw.messages.set( {
'mtsg-move-link': 'Przenieś do brudnopisu',
'mtsg-user-talk-link': 'dyskusja',
'mtsg-user-contribs-link': 'wkład',
'mtsg-dialog-title': 'Przenieś do brudnopisu',
'mtsg-author-label': 'Autor artykułu:',
'mtsg-author-pending': 'sprawdzanie',
'mtsg-destination-label': 'Docelowa nazwa artykułu:',
'mtsg-reason-label': 'Uzasadnienie:',
'mtsg-default-reason': 'artykuł należy dopracować',
'mtsg-message-label': 'Wiadomość dla użytkownika:',
'mtsg-error-label': 'Błąd:',
'mtsg-jobs-label': 'Wykonywane zadania:',
'mtsg-link-placeholder': '$link',
'mtsg-default-message': 'Witaj. Twój artykuł nie nadaje się jeszcze do publikacji w Wikipedii, dlatego został przeniesiony do twojego brudnopisu [[$link]], gdzie możesz nad nim popracować. Należy w nim poprawić:\n* ...\n* ...\n* ...\nPo skończeniu użyj [[Pomoc:Zmiana nazwy strony|zakładki przenieś]], aby opublikować go ponownie. Jeżeli nie możesz przenieść samodzielnie (należy mieć konto zarejestrowane od co najmniej 4 dni oraz 10 edycji), zwróć się do dowolnego bardziej zaawansowanego wikipedysty lub do [[WP:PdA|administratorów]]. Pozdrawiam, ~~' + '~~',
'mtsg-confirm-button': 'Przenieś',
'mtsg-cancel-button': 'Anuluj',
'mtsg-move-page-job': 'Przenoszenie strony',
'mtsg-insert-speedy-job': 'Wstawianie szablonu ek do przekierowania',
'mtsg-send-message-job': 'Wysyłanie wiadomości autorowi',
'mtsg-redirect-job': 'Przejście na stronę po przenosinach',
'mtsg-speedy-template': '{' + '{ek|1=strona została przeniesiona do [[$1|brudnopisu autora]]}}\n',
'mtsg-speedy-summary': 'Oznaczenie przekierowania po przenosinach do skasowania',
'mtsg-error-nonexistent-page': 'Artykuł nie istnieje.',
'mtsg-error-unknown-author': 'Nie można określić autora artykułu.',
'mtsg-error-anonymous-author': 'Anonimowy użytkownik nie posiada brudnopisu.',
'mtsg-error-no-move-permission': 'Nie masz uprawnień do przenoszenia stron.',
'mtsg-error-empty-destination-name': 'Nazwa strony docelowej nie może być pusta.',
'mtsg-error-move-message-not-changed': 'Uzupełnij wiadomość do użytkownika.',
'mtsg-error-caught-exception': 'Wystąpił błąd podczas działania gadżetu. Przekaż następujące informacje autorowi:',
'mtsg-error-api-error': 'Operacja się nie powiodła' // FIXME
} );
window.moveToSandboxGadget = { /** Version of the gadget */
version: 7,
/* Gadget variables */
canSuppressRedirect: false,
moveToken: null,
moveSource: mw.config.get( 'wgPageName' ).replace( /_/g, ' ' ),
moveDestination: null,
moveReason: null,
author: null,
jobQueue: [],
currentJob: null,
debug: false,
/** Gadget entry point */
init: function() {
if ( mw.config.get( 'wgNamespaceNumber' ) != 0 || mw.config.get( 'wgArticleId' ) == 0 ) {
return;
}
var that = this;
jQuery( document ).ready( function() {
that.addMenu();
} );
},
/** Adds menu for triggering dialog box */
addMenu: function() {
var that = this;
mw.util.addPortletLink( 'p-tb', '', mw.msg( 'mtsg-move-link' ), 'move-to-sandbox' );
jQuery( '#move-to-sandbox a' ).click( function( event ) {
that.open();
event.preventDefault();
} ).attr( 'href', '#' );
},
/** Shows dialog box */
open: function() {
var dialog = jQuery('<div></div>').append(
'<form>' +
'<fieldset id="mtsg-fieldset">' +
'<label for="mtsg-author">' + mw.msg( 'mtsg-author-label' ) + '</label>' +
'<span id="mtsg-author" class="text ui-widget-content ui-corner-all">' + mw.msg( 'mtsg-author-pending' ) + '</span>' +
'<label for="mtsg-destination">' + mw.msg( 'mtsg-destination-label' ) + '</label>' +
'<input type="text" name="mtsg-destination" id="mtsg-destination" class="text ui-widget-content ui-corner-all" disabled="disabled"/>' +
'<label for="mtsg-reason">' + mw.msg( 'mtsg-reason-label' ) + '</label>' +
'<input type="text" name="mtsg-reason" id="mtsg-reason" class="text ui-widget-content ui-corner-all" value="' + mw.msg( 'mtsg-default-reason' ) + '"/>' +
'<label for="mtsg-message">' + mw.msg( 'mtsg-message-label' ) + '</label>' +
'<textarea rows="3" name="mtsg-message" id="mtsg-message" class="text ui-widget-content ui-corner-all mtsg-message-full">' + mw.message( 'mtsg-default-message' ).plain() + '</textarea>' +
'</fieldset>' +
'</form>'
);
var buttons = {};
buttons[mw.msg( 'mtsg-cancel-button' )] = function() {
jQuery( this ).dialog( 'close' );
};
jQuery( dialog ).dialog( {
width: 600,
height: 600,
modal: true,
resizable: false,
draggable: true,
closeOnEscape: true,
dialogClass: 'moveToSandboxDialog',
title: mw.msg( 'mtsg-dialog-title' ),
close: function() {
jQuery( this ).dialog( 'destroy' );
jQuery( this ).remove();
},
buttons: buttons
} );
var that = this;
var request = {
action: 'query',
prop: 'revisions|info',
rvprop: 'user|userid',
rvdir: 'newer',
meta: 'userinfo',
uiprop: 'rights',
titles: mw.config.get( 'wgPageName' ),
rvlimit: 1,
intoken: 'move'
};
this.callApi( request, function( data ) {
var page = data.query.pages[mw.config.get( 'wgArticleId' )];
if ( !page ) {
that.showError( mw.msg( 'mtsg-error-nonexistent-page' ) );
return;
}
var revision = page.revisions[0];
if ( !revision || !revision.user ) {
that.showError( mw.msg( 'mtsg-error-unknown-author' ) );
return;
}
jQuery('#mtsg-author').empty().append(
jQuery('<a></a>').attr('href', mw.util.wikiGetlink('User:' + revision.user)).append(document.createTextNode(revision.user)),
' (',
jQuery('<a>' + mw.msg( 'mtsg-user-talk-link' ) + '</a>').attr('href', mw.util.wikiGetlink('User_talk:' + revision.user)),
', ',
jQuery('<a>' + mw.msg( 'mtsg-user-contribs-link' ) + '</a>').attr('href', mw.util.wikiGetlink('Special:Contributions/' + revision.user)),
')'
);
if ( !revision.userid ) {
that.showError( mw.msg( 'mtsg-error-anonymous-author' ) );
return;
}
jQuery( '#mtsg-destination' ).attr( 'disabled', false ).val( mw.config.get( 'wgFormattedNamespaces' )[2] + ':' + revision.user + '/' + that.moveSource );
var userRights = data.query.userinfo.rights;
if ( jQuery.inArray( 'move', userRights ) == -1 ) {
that.showError( mw.msg( 'mtsg-error-no-move-permission' ) );
return;
}
that.canSuppressRedirect = jQuery.inArray( 'suppressredirect', userRights ) > -1;
that.moveToken = page.movetoken;
that.author = revision.user;
// Add confirm button
buttons[mw.msg( 'mtsg-confirm-button' )] = function() {
that.confirm( dialog )
};
jQuery( dialog ).dialog( "option", "buttons", buttons );
} );
},
/** Shows error on the dialog */
showError: function( message ) {
// Shrink the message field
jQuery( '#mtsg-message' ).removeClass( 'mtsg-message-full' );
jQuery( '#mtsg-fieldset' ).append( '<label for="mtsg-error">' + mw.msg( 'mtsg-error-label' ) + '</label>' );
jQuery( '#mtsg-fieldset' ).append( '<p id="mtsg-error">' + message + '</p>' );
this.updateCurrentStatus( 'error' );
},
updateCurrentStatus: function( status ) {
if ( !this.currentJob ) {
return;
}
if ( status == 'done' ) {
this.currentJob.image.src = '//upload.wikimedia.org/wikipedia/commons/thumb/3/34/Crystal_Clear_app_clean.png/16px-Crystal_Clear_app_clean.png';
} else if ( status == 'running' ) {
this.currentJob.image.src = '//upload.wikimedia.org/wikipedia/commons/3/32/Loader3.gif';
} else {
this.currentJob.image.src = '//upload.wikimedia.org/wikipedia/commons/thumb/9/99/Crystal_128_error.svg/16px-Crystal_128_error.svg.png';
}
},
/** Exception handler */
handleException: function( e ) {
var message = errorCaughtException + '\n' + e.name + ':' + e.message;
if ( e.stack ) {
message += '\n' + e.stack;
}
showError( message );
},
/** Creates list of jobs, and starts executing them */
processQueue: function() {
jQuery( '#mtsg-fieldset' ).append( '<label for="mtsg-jobs">' + mw.msg( 'mtsg-jobs-label' ) + '</label>' );
jQuery( '#mtsg-fieldset' ).append( '<div id="mtsg-jobs"></div>' );
// Shrink the message field
jQuery( '#mtsg-message' ).removeClass( 'mtsg-message-full' );
for ( var index in this.jobQueue ) {
var job = this.jobQueue[index];
var image = jQuery( '<img src="//upload.wikimedia.org/wikipedia/commons/1/11/Hourglass.png" width="16" height="16">' );
jQuery( '#mtsg-jobs' ).append( jQuery( '<div id="job-' + job.name + '"></div>' ).append( image, job.description ) );
job.image = image[0];
}
this.executeNextJob();
},
/** Executes next enqueued job */
executeNextJob: function() {
if ( this.currentJob ) {
this.updateCurrentStatus( 'done' );
}
if ( !this.jobQueue.length ) {
if ( this.debug ) {
console.log( 'There are no jobs left' );
}
return;
}
var that = this;
var job = this.jobQueue.shift();
if ( this.debug ) {
console.log( 'Executing job: ' + job.name );
console.log( job );
}
job.callback = function( success ) {
that.executeNextJob();
};
job.owner = this;
this.currentJob = job;
this.updateCurrentStatus( 'running' );
try {
job.execute();
} catch ( e ) {
this.handleException( e );
}
},
/** Performs move */
confirm: function( dialog ) {
var gadget = this;
this.moveDestination = jQuery( '#mtsg-destination' ).val().trim();
if ( this.moveDestination == '' ) {
alert( mw.msg( 'mtsg-error-empty-destination-name' ) );
return;
}
this.moveReason = jQuery( '#mtsg-reason' ).val().trim();
this.moveMessage = jQuery( '#mtsg-message' ).val().trim();
if ( this.moveMessage == jQuery.trim( mw.msg( 'mtsg-default-message' ) ) ) {
alert( mw.msg( 'mtsg-error-move-message-not-changed' ) );
return;
}
var buttons = jQuery( dialog ).dialog( 'option', 'buttons' );
delete buttons[mw.msg( 'mtsg-confirm-button' )];
jQuery( dialog ).dialog( 'option', 'buttons', buttons );
this.jobQueue = [];
this.jobQueue.push( {
name: 'move',
description: mw.msg( 'mtsg-move-page-job' ),
execute: function() {
var job = this;
var request = {
action: 'move',
fromid: mw.config.get( 'wgArticleId' ),
to: gadget.moveDestination,
token: gadget.moveToken,
reason: gadget.moveReason,
movetalk: 1
}
if ( gadget.canSuppressRedirect ) {
request['noredirect'] = 1;
}
gadget.callApi( request, function( data ) {
if ( data.error && data.error.code ) {
gadget.showError( data.error.code );
} else {
job.callback();
}
} );
}
} );
if ( !gadget.canSuppressRedirect ) {
this.jobQueue.push( {
name: 'speedy',
description: mw.msg( 'mtsg-insert-speedy-job' ),
execute: function() {
var job = this;
var request = {
action: 'edit',
title: gadget.moveSource,
prependtext: mw.message( 'mtsg-speedy-template', gadget.moveDestination ).plain(),
nocreate: 1,
summary: mw.msg( 'mtsg-speedy-summary' )
}
gadget.editPage( request, function( data ) {
if ( !data.edit || data.edit.result != 'Success' ) {
gadget.showError( mw.msg( 'mtsg-error-api-error' ) );
} else {
job.callback();
}
} );
}
} );
}
if ( this.moveMessage != '' ) {
this.jobQueue.push( {
name: 'message',
description: mw.msg( 'mtsg-send-message-job' ),
messageTitle: '[[:' + this.moveSource + '|' + this.moveSource + ']]',
messageText: this.moveMessage.replace( /\$link/g, this.moveDestination ),
execute: function() {
var job = this;
var request = {
action: 'edit',
title: 'User talk:' + gadget.author,
text: this.messageText,
section: 'new',
summary: this.messageTitle
}
gadget.editPage( request, function( data ) {
if ( !data.edit || data.edit.result != 'Success' ) {
gadget.showError( mw.msg( 'mtsg-error-api-error' ) );
} else {
job.callback();
}
} );
}
} );
}
this.jobQueue.push( {
name: 'redirect',
description: mw.msg( 'mtsg-redirect-job' ),
execute: function() {
setTimeout( function() {
window.location = mw.util.wikiGetlink( gadget.moveDestination );
}, 1000 );
}
} );
gadget.processQueue();
},
/**
* Performs MediaWiki call using post method.
* @param request
* Api request.
* @param callback
* Function to be called when request is completed.
*/
callApi: function( request, callback ) {
var gadget = this;
if ( gadget.debug ) {
console.log( 'Sending api request: ', request );
}
request.format = 'json';
jQuery.post( mw.util.wikiScript( 'api' ), request, function( data ) {
if ( gadget.debug ) {
console.log( 'Response: ', data );
}
try {
callback( data );
} catch ( e ) {
gadget.handleException( e );
}
}, 'json' );
},
/**
* Performs edit, fetches edit token if not provided.
* @param request
* Api request.
* @param callback
* Function to be called when request is completed.
*/
editPage: function( request, callback ) {
var gadget = this;
if ( request.title == null ) {
throw new Error( 'Page title is missing' );
}
if ( callback == null ) {
throw new Error( 'Callback is missing' );
}
if ( request.token == null ) {
var tokenRequest = {
action: 'query',
prop: 'info',
format: 'json',
titles: request.title,
intoken: 'edit'
}
gadget.callApi( tokenRequest, function( data ) {
if ( data.error ) {
callback( data );
return;
}
var page;
for ( var pageId in data.query.pages ) {
page = data.query.pages[pageId];
}
if ( !page || page.edittoken == null ) {
callback( data );
return;
}
request.title = page.title;
request.token = page.edittoken;
gadget.editPage( request, callback );
} );
} else {
gadget.callApi( request, callback );
}
}
};
moveToSandboxGadget.init();
0e98fd2e2dba7910e4df685ed0d56ba96b71c8ea
MediaWiki:Gadget-mySandbox
8
32
88
2014-01-16T11:49:49Z
Ffkapa
2
Utworzono nową stronę "Add a "Sandbox" link to the personal toolbar area."
wikitext
text/x-wiki
Add a "Sandbox" link to the personal toolbar area.
9e3d14cbbcb4f9f44aad8961a2148604029cfef8
MediaWiki:Gadget-mySandbox.js
8
33
92
89
2014-01-16T12:22:21Z
Ffkapa
2
javascript
text/javascript
/* _____________________________________________________________________________
* | |
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
* |_____________________________________________________________________________|
*/
/**
* Add a "My sandbox" link to the personal portlet menu.
* Dependencies: mediawiki.util, mediawiki.Title, mediawiki.Uri
*
* @source mediawiki.org/wiki/Snippets/MySandbox
* @version 2
*/
( function ( mw, $ ) {
$( document ).ready( function () {
var conf, title, url;
// Costomize/Translate this to your needs
conf = {
subpageName: 'brudnopis',
portletLabel: 'Brudnopis',
portletTooltip: 'Idź do swojego brudnopisu',
editintroPagename: 'Template:User_sandbox',
preloadPagename: 'Template:User_sandbox/preload'
};
// Don't alter the code below
// Use Special:MyPage (as opposed to mw.user.getName()) so that it
// works for logged-out users as well.
title = new mw.Title( 'Special:MyPage/' + conf.subpageName );
url = new mw.Uri( title.getUrl() );
url.extend({
action: 'edit',
redlink: 1,
editintro: new mw.Title( conf.editintroPagename ),
preload: new mw.Title( conf.preloadPagename )
});
mw.util.addPortletLink(
'p-personal',
url,
conf.portletLabel,
'pt-mysandbox',
conf.portletTooltip,
null,
'#pt-preferences'
);
});
}( mediaWiki, jQuery ) );
76b538218b4980c8a19ed93c6604e84f7b4c8d44
89
2014-01-16T11:52:04Z
Ffkapa
2
Utworzono nową stronę "/* _____________________________________________________________________________ * | | * |..."
javascript
text/javascript
/* _____________________________________________________________________________
* | |
* | === WARNING: GLOBAL GADGET FILE === |
* | Changes to this page affect many users. |
* | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
* |_____________________________________________________________________________|
*/
/**
* Add a "My sandbox" link to the personal portlet menu.
* Dependencies: mediawiki.util, mediawiki.Title, mediawiki.Uri
*
* @source mediawiki.org/wiki/Snippets/MySandbox
* @version 2
*/
( function ( mw, $ ) {
$( document ).ready( function () {
var conf, title, url;
// Costomize/Translate this to your needs
conf = {
subpageName: 'sandbox',
portletLabel: 'Sandbox',
portletTooltip: 'Go to your sandbox',
editintroPagename: 'Template:User_sandbox',
preloadPagename: 'Template:User_sandbox/preload'
};
// Don't alter the code below
// Use Special:MyPage (as opposed to mw.user.getName()) so that it
// works for logged-out users as well.
title = new mw.Title( 'Special:MyPage/' + conf.subpageName );
url = new mw.Uri( title.getUrl() );
url.extend({
action: 'edit',
redlink: 1,
editintro: new mw.Title( conf.editintroPagename ),
preload: new mw.Title( conf.preloadPagename )
});
mw.util.addPortletLink(
'p-personal',
url,
conf.portletLabel,
'pt-mysandbox',
conf.portletTooltip,
null,
'#pt-preferences'
);
});
}( mediaWiki, jQuery ) );
f748ed8aeca9c6256c0322b5a00014d5fc92ded8
MediaWiki:Gadget-purgetab
8
61
156
155
2014-01-16T15:59:24Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Add a "Purge" tab to the top of the page, which purges the page's cache when followed.
5efada8789a4e09c70a71e2d5e10f9f746431ea2
155
2010-10-13T15:47:02Z
Edokter
0
Default Vector skin shows "Purge"
wikitext
text/x-wiki
Add a "Purge" tab to the top of the page, which purges the page's cache when followed.
5efada8789a4e09c70a71e2d5e10f9f746431ea2
MediaWiki:Gadget-purgetab.js
8
62
158
157
2014-01-16T15:59:24Z
Ffkapa
2
1 wersja
javascript
text/javascript
/**
* Action link: Purge (Action menu)
*
* @source: http://www.mediawiki.org/wiki/Snippets/Purge_action
* @rev: 5
*/
$( function() {
if ( !$( '#ca-purge' ).length && mw.config.get( 'wgIsArticle' ) ) {
mw.util.addPortletLink(
'p-cactions',
mw.util.getUrl( mw.config.get( 'wgPageName' ), { action: 'purge' } ),
mw.config.get( 'skin' ) == 'vector' ? 'Purge' : '*',
'ca-purge',
'Purge the server cache of this page',
'*'
);
}
});
663ea8981a9859d24a9a93bea393e565395d9129
157
2013-11-18T16:41:31Z
Waldir
0
update deprecated function [[mw:ResourceLoader/Default modules#wikiGetlink|wikiGetLink]]
javascript
text/javascript
/**
* Action link: Purge (Action menu)
*
* @source: http://www.mediawiki.org/wiki/Snippets/Purge_action
* @rev: 5
*/
$( function() {
if ( !$( '#ca-purge' ).length && mw.config.get( 'wgIsArticle' ) ) {
mw.util.addPortletLink(
'p-cactions',
mw.util.getUrl( mw.config.get( 'wgPageName' ), { action: 'purge' } ),
mw.config.get( 'skin' ) == 'vector' ? 'Purge' : '*',
'ca-purge',
'Purge the server cache of this page',
'*'
);
}
});
663ea8981a9859d24a9a93bea393e565395d9129
MediaWiki:Gadget-quickeditcounter
8
76
188
187
2014-01-16T16:33:14Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
[[Wikipedia:Narzędzia/QuickEditCounter|QuickEditCounter]] – skrypt wyświetlający pod tytułem na stronie dowolnego użytkownika lub jego dyskusji (oraz stron podrzędnych) informację o liczbie edycji tegoż użytkownika.
563cec487b75036ed93c21e290668d0d0637e9c6
187
2009-06-20T18:52:08Z
Karol007
0
typografia (kosmetyka)
wikitext
text/x-wiki
[[Wikipedia:Narzędzia/QuickEditCounter|QuickEditCounter]] – skrypt wyświetlający pod tytułem na stronie dowolnego użytkownika lub jego dyskusji (oraz stron podrzędnych) informację o liczbie edycji tegoż użytkownika.
563cec487b75036ed93c21e290668d0d0637e9c6
MediaWiki:Gadget-quickeditcounter.js
8
77
190
189
2014-01-16T16:33:14Z
Ffkapa
2
1 wersja
javascript
text/javascript
// UWAGA! Z tego gadżetu korzystają także inne projekty
// Original version:
// - QuickEditCounter script by [[:pl:User:ChP94]]
// - Released under the [http://www.gnu.org/licenses/gpl.txt GNU Public License (GPL)]
// Modified by [[:pl:User:Beau]]
window.qecGadget = {
version: 9,
init: function() {
if ( mw.config.get( 'wgNamespaceNumber' ) != 2 && mw.config.get( 'wgNamespaceNumber' ) != 3 ) {
return;
}
if ( mw.util.getParamValue('printable') == 'yes' ) {
return;
}
this.username = mw.config.get( 'wgTitle' ).replace(/\/.*$/, '');
var that = this;
var request = {
action: 'query',
list: 'users',
usprop: 'editcount|gender',
format: 'json',
ususers: this.username,
requestid: new Date().getTime()
};
jQuery.getJSON( mw.util.wikiScript( 'api' ), request, function(result) {
jQuery(document).ready(function() {
if (result) {
that.showResults(result);
}
});
});
},
showResults: function(data) {
data = data.query.users[0];
if (!data || data.name != this.username || data.invalid != null || data.editcount === undefined)
return;
var firstHeading;
var headers = document.getElementsByTagName( 'h1' );
for ( var i = 0; i < headers.length; i++ ) {
var header = headers[i];
if(header.className == "firstHeading" || header.id == "firstHeading" || header.className == "pagetitle") {
firstHeading = header; break;
}
}
if( !firstHeading ) {
firstHeading = document.getElementById("section-0");
}
if( !firstHeading ) {
return;
}
var html = data.gender == "female" ? 'Ta użytkowniczka wykonała' : 'Ten użytkownik wykonał';
var lang = 'pl';
var wiki = 'wikipedia';
var m;
if (m = mw.config.get( 'wgServer' ).match(/^(?:http:)?\/\/(.+?).([^.]+).org$/)) {
lang = m[1];
wiki = m[2];
}
else if (m = mw.config.get( 'wgScriptPath' ).match(/\/(.+?)\/(.+?)\//)) {
lang = m[2];
wiki = m[1];
}
html += ' łącznie <a href="//tools.wmflabs.org/xtools/pcount/index.php?name=' + encodeURIComponent(this.username) + '&wiki=' + encodeURIComponent(wiki) + '&lang=' + encodeURIComponent(lang) + '">' + data.editcount + '</a> edycji.';
var div = document.createElement("div");
div.style.cssText = "font-size:0.5em;line-height:1em";
div.className = 'plainlinks';
div.innerHTML = html;
if ( mw.config.get( 'skin' ) == 'modern' ) {
div.style.marginLeft = "10px";
div.style.display = "inline-block";
}
firstHeading.appendChild(div);
}
};
qecGadget.init();
1c44b050081d8e2de15de99b76fba3b561b64bc5
189
2014-01-10T08:27:42Z
Awersowy
0
zmiana lokalizacji licznika
javascript
text/javascript
// UWAGA! Z tego gadżetu korzystają także inne projekty
// Original version:
// - QuickEditCounter script by [[:pl:User:ChP94]]
// - Released under the [http://www.gnu.org/licenses/gpl.txt GNU Public License (GPL)]
// Modified by [[:pl:User:Beau]]
window.qecGadget = {
version: 9,
init: function() {
if ( mw.config.get( 'wgNamespaceNumber' ) != 2 && mw.config.get( 'wgNamespaceNumber' ) != 3 ) {
return;
}
if ( mw.util.getParamValue('printable') == 'yes' ) {
return;
}
this.username = mw.config.get( 'wgTitle' ).replace(/\/.*$/, '');
var that = this;
var request = {
action: 'query',
list: 'users',
usprop: 'editcount|gender',
format: 'json',
ususers: this.username,
requestid: new Date().getTime()
};
jQuery.getJSON( mw.util.wikiScript( 'api' ), request, function(result) {
jQuery(document).ready(function() {
if (result) {
that.showResults(result);
}
});
});
},
showResults: function(data) {
data = data.query.users[0];
if (!data || data.name != this.username || data.invalid != null || data.editcount === undefined)
return;
var firstHeading;
var headers = document.getElementsByTagName( 'h1' );
for ( var i = 0; i < headers.length; i++ ) {
var header = headers[i];
if(header.className == "firstHeading" || header.id == "firstHeading" || header.className == "pagetitle") {
firstHeading = header; break;
}
}
if( !firstHeading ) {
firstHeading = document.getElementById("section-0");
}
if( !firstHeading ) {
return;
}
var html = data.gender == "female" ? 'Ta użytkowniczka wykonała' : 'Ten użytkownik wykonał';
var lang = 'pl';
var wiki = 'wikipedia';
var m;
if (m = mw.config.get( 'wgServer' ).match(/^(?:http:)?\/\/(.+?).([^.]+).org$/)) {
lang = m[1];
wiki = m[2];
}
else if (m = mw.config.get( 'wgScriptPath' ).match(/\/(.+?)\/(.+?)\//)) {
lang = m[2];
wiki = m[1];
}
html += ' łącznie <a href="//tools.wmflabs.org/xtools/pcount/index.php?name=' + encodeURIComponent(this.username) + '&wiki=' + encodeURIComponent(wiki) + '&lang=' + encodeURIComponent(lang) + '">' + data.editcount + '</a> edycji.';
var div = document.createElement("div");
div.style.cssText = "font-size:0.5em;line-height:1em";
div.className = 'plainlinks';
div.innerHTML = html;
if ( mw.config.get( 'skin' ) == 'modern' ) {
div.style.marginLeft = "10px";
div.style.display = "inline-block";
}
firstHeading.appendChild(div);
}
};
qecGadget.init();
1c44b050081d8e2de15de99b76fba3b561b64bc5
MediaWiki:Gadget-small-bibliography
8
84
217
216
2014-01-16T23:35:29Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Pomniejszaj sekcję ''Bibliografia''.
cf912754d5798676a7f7d9fe74f48ad3ad050354
216
2012-04-22T13:35:00Z
Beau
0
drobne merytoryczne
wikitext
text/x-wiki
Pomniejszaj sekcję ''Bibliografia''.
cf912754d5798676a7f7d9fe74f48ad3ad050354
MediaWiki:Gadget-small-bibliography.css
8
85
219
218
2014-01-16T23:35:29Z
Ffkapa
2
1 wersja
css
text/css
.section-bibliography { font-size: 85%; }
36ef7d3fd3542ed50cedfe7c4ae4b56fa0e8a941
218
2012-04-22T13:35:45Z
Beau
0
nowy styl
css
text/css
.section-bibliography { font-size: 85%; }
36ef7d3fd3542ed50cedfe7c4ae4b56fa0e8a941
MediaWiki:Gadget-small-external-links
8
86
222
221
2014-01-16T23:39:11Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Pomniejszaj sekcję ''Linki zewnętrzne''.
a402147f659cc60024663d464fb1b31e059b9344
221
2012-04-20T15:15:13Z
Beau
0
start
wikitext
text/x-wiki
Pomniejszaj sekcję ''Linki zewnętrzne''.
a402147f659cc60024663d464fb1b31e059b9344
MediaWiki:Gadget-small-external-links.css
8
87
224
223
2014-01-16T23:39:11Z
Ffkapa
2
1 wersja
css
text/css
.section-external-links { font-size: 85%; }
6a16340ee50bf8f2f263b856ae7b151f15928942
223
2012-04-20T15:14:52Z
Beau
0
start
css
text/css
.section-external-links { font-size: 85%; }
6a16340ee50bf8f2f263b856ae7b151f15928942
MediaWiki:Gadget-small-references
8
82
212
211
2014-01-16T23:32:05Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Pomniejszaj sekcję ''Przypisy''.
a0577e278e3e92f7cd6525b3035b9e794c75b612
211
2012-04-22T13:17:41Z
Beau
0
start
wikitext
text/x-wiki
Pomniejszaj sekcję ''Przypisy''.
a0577e278e3e92f7cd6525b3035b9e794c75b612
MediaWiki:Gadget-small-references.css
8
83
214
213
2014-01-16T23:32:05Z
Ffkapa
2
1 wersja
css
text/css
/* .section-references { font-size: 85%; } */
ol.references { font-size: 85%; }
dd4950173e9f107721cf580915dc5bd5b19e6263
213
2012-04-22T13:20:34Z
Beau
0
drobne techniczne
css
text/css
/* .section-references { font-size: 85%; } */
ol.references { font-size: 85%; }
dd4950173e9f107721cf580915dc5bd5b19e6263
MediaWiki:Gadget-small-sections
8
80
207
206
2014-01-16T23:27:54Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
'''ext.gadget.small-sections''' – gadżet zmniejszający wybrane sekcje.
0c85189e1edf80460226a69fd20fc8b909a2c624
206
2012-04-20T15:19:34Z
Beau
0
drobne techniczne, drobne redakcyjne
wikitext
text/x-wiki
'''ext.gadget.small-sections''' – gadżet zmniejszający wybrane sekcje.
0c85189e1edf80460226a69fd20fc8b909a2c624
MediaWiki:Gadget-small-sections.js
8
81
209
208
2014-01-16T23:27:54Z
Ffkapa
2
1 wersja
javascript
text/javascript
// <pre>
// Author: [[pl:User:Beau]]
var sectionCripplingGadget = {
version: 9,
crippledSections: {},
/**
* Inicjacja gadżetu
*/
init: function() {
// Tylko przestrzeń główna i użytkowników
if ( mw.config.get( 'wgNamespaceNumber' ) !== 0 && mw.config.get( 'wgNamespaceNumber' ) !== 2 ) {
return;
}
//if ( mw.user.options.get( 'gadget-small-references', 0 ) == 1 ) {
// this.crippledSections['Przypisy'] = 'section-references';
//}
if ( mw.user.options.get( 'gadget-small-notes', 0 ) == 1 ) {
this.crippledSections['Uwagi'] = 'section-notes';
}
if ( mw.user.options.get( 'gadget-small-bibliography', 0 ) == 1 ) {
this.crippledSections['Bibliografia'] = 'section-bibliography';
}
if ( mw.user.options.get( 'gadget-small-external-links', 0 ) == 1 ) {
this.crippledSections['Linki zewnętrzne'] = 'section-external-links';
}
if ( mw.user.options.get( 'gadget-small-see-also', 0 ) == 1 ) {
this.crippledSections['Zobacz też'] = 'section-see-also';
}
var contentText = null;
if ( mw.config.get( 'wgAction' ) === 'view' ) {
// Czytanie
contentText = document.getElementById( 'mw-content-text' );
} else if ( mw.config.get( 'wgAction' ) === 'submit' ) {
// Podgląd edycji
contentText = jQuery( '#wikiPreview' ).children().eq( 1 )[0];
}
if ( !contentText ) {
return;
}
var stylize = null;
var currentNode = contentText.firstChild;
var numberHeadings = ( mw.user.options.get( 'numberheadings', 0 ) == 1 );
while ( currentNode ) {
if ( currentNode.tagName && currentNode.tagName.match( /^H[1-6]$/ ) ) {
stylize = null;
var text = jQuery.trim( jQuery( currentNode ).children( '.mw-headline' ).text() );
if ( numberHeadings ) {
// Usuń numerację
text = text.replace( /^\d+\s*/g, '' );
}
stylize = this.crippledSections[text];
} else if ( stylize !== null ) {
$currentNode = jQuery( currentNode );
if ( !$currentNode.hasClass( 'do-not-make-smaller' ) ) {
$currentNode.addClass( "section-small " + stylize );
}
}
currentNode = currentNode.nextSibling;
}
}
};
jQuery( document ).ready( function() {
sectionCripplingGadget.init()
} );
// </pre>
ba0fe7db5be1d3544b3cfc37978d98a5f4129d9f
208
2012-04-22T13:40:25Z
Beau
0
bibliografia
javascript
text/javascript
// <pre>
// Author: [[pl:User:Beau]]
var sectionCripplingGadget = {
version: 9,
crippledSections: {},
/**
* Inicjacja gadżetu
*/
init: function() {
// Tylko przestrzeń główna i użytkowników
if ( mw.config.get( 'wgNamespaceNumber' ) !== 0 && mw.config.get( 'wgNamespaceNumber' ) !== 2 ) {
return;
}
//if ( mw.user.options.get( 'gadget-small-references', 0 ) == 1 ) {
// this.crippledSections['Przypisy'] = 'section-references';
//}
if ( mw.user.options.get( 'gadget-small-notes', 0 ) == 1 ) {
this.crippledSections['Uwagi'] = 'section-notes';
}
if ( mw.user.options.get( 'gadget-small-bibliography', 0 ) == 1 ) {
this.crippledSections['Bibliografia'] = 'section-bibliography';
}
if ( mw.user.options.get( 'gadget-small-external-links', 0 ) == 1 ) {
this.crippledSections['Linki zewnętrzne'] = 'section-external-links';
}
if ( mw.user.options.get( 'gadget-small-see-also', 0 ) == 1 ) {
this.crippledSections['Zobacz też'] = 'section-see-also';
}
var contentText = null;
if ( mw.config.get( 'wgAction' ) === 'view' ) {
// Czytanie
contentText = document.getElementById( 'mw-content-text' );
} else if ( mw.config.get( 'wgAction' ) === 'submit' ) {
// Podgląd edycji
contentText = jQuery( '#wikiPreview' ).children().eq( 1 )[0];
}
if ( !contentText ) {
return;
}
var stylize = null;
var currentNode = contentText.firstChild;
var numberHeadings = ( mw.user.options.get( 'numberheadings', 0 ) == 1 );
while ( currentNode ) {
if ( currentNode.tagName && currentNode.tagName.match( /^H[1-6]$/ ) ) {
stylize = null;
var text = jQuery.trim( jQuery( currentNode ).children( '.mw-headline' ).text() );
if ( numberHeadings ) {
// Usuń numerację
text = text.replace( /^\d+\s*/g, '' );
}
stylize = this.crippledSections[text];
} else if ( stylize !== null ) {
$currentNode = jQuery( currentNode );
if ( !$currentNode.hasClass( 'do-not-make-smaller' ) ) {
$currentNode.addClass( "section-small " + stylize );
}
}
currentNode = currentNode.nextSibling;
}
}
};
jQuery( document ).ready( function() {
sectionCripplingGadget.init()
} );
// </pre>
ba0fe7db5be1d3544b3cfc37978d98a5f4129d9f
MediaWiki:Gadget-style-summary-buttons
8
109
286
285
2014-01-17T00:31:46Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
'''ext.gadget.style-summary-buttons''' – style dla przycisków wstawiających opis zmian.
70853b8e53a75e27b6579692d8142880a4e1bc85
285
2011-11-20T14:14:23Z
Beau
0
start
wikitext
text/x-wiki
'''ext.gadget.style-summary-buttons''' – style dla przycisków wstawiających opis zmian.
70853b8e53a75e27b6579692d8142880a4e1bc85
MediaWiki:Gadget-summary-buttons.css
8
110
288
287
2014-01-17T00:31:46Z
Ffkapa
2
1 wersja
css
text/css
.userSummaryButtons a, #userSummaryButtons a {
background: #cfc;
border: 1px dotted #090;
padding: 0 2px;
margin: 2px;
cursor: pointer;
font-size: 80%;
line-height: 17px;
color: black;
white-space: nowrap;
}
.userSummaryButtons a:hover, #userSummaryButtons a:hover {
background: #bfb;
border: 1px solid #9c9;
text-decoration:none;
}
ed2528b8264726f7e25eb81e33a1ff4947a4a717
287
2011-11-20T14:14:42Z
Beau
0
Przeniesione z [[MediaWiki:Common.css]]
css
text/css
.userSummaryButtons a, #userSummaryButtons a {
background: #cfc;
border: 1px dotted #090;
padding: 0 2px;
margin: 2px;
cursor: pointer;
font-size: 80%;
line-height: 17px;
color: black;
white-space: nowrap;
}
.userSummaryButtons a:hover, #userSummaryButtons a:hover {
background: #bfb;
border: 1px solid #9c9;
text-decoration:none;
}
ed2528b8264726f7e25eb81e33a1ff4947a4a717
MediaWiki:Gadget-topalert
8
66
235
166
2014-01-16T23:46:01Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Display a floating alert when I have new talk page messages
b61445425ac438797e871130647be287e73420d3
166
165
2014-01-16T16:11:28Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
Display a floating alert when I have new talk page messages
b61445425ac438797e871130647be287e73420d3
234
166
2013-08-24T15:39:29Z
Matma Rex
0
opis
wikitext
text/x-wiki
Większe powiadomienie, gdy mam nowe wiadomości w dyskusji, podobne do starego paska.
1acc7eac4a30bde0b41fd7dd1086bb2b8d9ae6d9
165
2013-05-14T19:58:59Z
Kaldari
0
new description
wikitext
text/x-wiki
Display a floating alert when I have new talk page messages
b61445425ac438797e871130647be287e73420d3
MediaWiki:Gadget-topalert.css
8
68
239
170
2014-01-16T23:46:01Z
Ffkapa
2
1 wersja
css
text/css
#mw-echo-close-box {
float: right;
height: 17px;
width: 17px;
margin: 10px 13px 0 2px;
cursor: pointer;
}
#mw-echo-sliding-alert {
position: fixed;
top: 0.5em;
z-index: 100;
margin: 0 auto;
width: 320px;
left: 0;
right: 0;
padding: 0;
background-color: #FFD86E;
-moz-border-radius: 5px;
border-radius: 5px;
}
#mw-echo-alert-text {
margin: 0px 3em 0px 1.4em;
font-size: 13px;
font-weight: bold;
font-family: sans-serif;
line-height: 38px;
white-space: nowrap;
}
8fbb62f34e506845787a928abd081f72eaef2cf5
170
169
2014-01-16T16:11:28Z
Ffkapa
2
1 wersja
css
text/css
#mw-echo-close-box {
float: right;
height: 17px;
width: 17px;
margin: 10px 13px 0 2px;
cursor: pointer;
}
#mw-echo-sliding-alert {
position: fixed;
top: 0.5em;
z-index: 100;
margin: 0 auto;
width: 320px;
left: 0;
right: 0;
padding: 0;
background-color: #FFD86E;
-moz-border-radius: 5px;
border-radius: 5px;
}
#mw-echo-alert-text {
margin: 0px 3em 0px 1.4em;
font-size: 13px;
font-weight: bold;
font-family: sans-serif;
line-height: 38px;
white-space: nowrap;
}
8fbb62f34e506845787a928abd081f72eaef2cf5
238
170
2013-08-24T17:12:53Z
Matma Rex
0
fuuuuj, tekst się nie mieści…
css
text/css
#mw-echo-close-box {
float: right;
height: 17px;
width: 17px;
margin: 10px 13px 0 2px;
cursor: pointer;
}
#mw-echo-sliding-alert {
position: fixed;
top: 0.5em;
z-index: 100;
margin: 0 auto;
width: 450px;
left: 0;
right: 0;
padding: 0;
background-color: #FFD86E;
-moz-border-radius: 5px;
border-radius: 5px;
}
#mw-echo-alert-text {
margin: 0px 3em 0px 1.4em;
font-size: 13px;
font-weight: bold;
font-family: sans-serif;
line-height: 38px;
white-space: nowrap;
}
6f835509c3504f8c2122ed4149e8a0ff116b4128
169
2013-05-29T21:47:18Z
Kaldari
0
z-index
css
text/css
#mw-echo-close-box {
float: right;
height: 17px;
width: 17px;
margin: 10px 13px 0 2px;
cursor: pointer;
}
#mw-echo-sliding-alert {
position: fixed;
top: 0.5em;
z-index: 100;
margin: 0 auto;
width: 320px;
left: 0;
right: 0;
padding: 0;
background-color: #FFD86E;
-moz-border-radius: 5px;
border-radius: 5px;
}
#mw-echo-alert-text {
margin: 0px 3em 0px 1.4em;
font-size: 13px;
font-weight: bold;
font-family: sans-serif;
line-height: 38px;
white-space: nowrap;
}
8fbb62f34e506845787a928abd081f72eaef2cf5
MediaWiki:Gadget-topalert.js
8
67
237
168
2014-01-16T23:46:01Z
Ffkapa
2
1 wersja
javascript
text/javascript
( function( $, mw ) {
$alert = '<div id="mw-echo-sliding-alert">';
$alert += '<div id="mw-echo-close-box"><img style="display: block;" src="//upload.wikimedia.org/wikipedia/meta/a/ab/Medium_close_button.png"/></div>';
$alert += '<div id="mw-echo-alert-text">You have <a href="#" id="mw-echo-talk-link">new messages</a>. (<a href="#" id="mw-echo-talk-diff-link">view changes</a>)</div>';
$alert += '</div>';
$(document).ready(function() {
$( '.usermessage' ).hide(); // just in case
var newMsgRevisionId = mw.config.get( 'wgUserNewMsgRevisionId' );
if ( newMsgRevisionId ) {
var userName = mw.config.get( 'wgUserName' );
var talkLink = '/wiki/User_talk:' + userName + '?redirect=no';
var diffLink = '/w/index.php?title=User_talk:' + userName + '&oldid=' + newMsgRevisionId + '&diff=cur';
$( 'body' ).append( $alert );
$( '#mw-echo-close-box' ).click( function( e ) {
$( '#mw-echo-sliding-alert' ).hide();
e.preventDefault();
} );
$( 'a#mw-echo-talk-link' ).attr( 'href', talkLink );
$( 'a#mw-echo-talk-diff-link' ).attr( 'href', diffLink );
mw.config.set( 'echoNewMsgAlertDisplayed', true );
}
} );
} )( jQuery, mediaWiki );
67aac2b2df4217f5a28a9ab8dc68f062cc30295f
168
167
2014-01-16T16:11:28Z
Ffkapa
2
1 wersja
javascript
text/javascript
( function( $, mw ) {
$alert = '<div id="mw-echo-sliding-alert">';
$alert += '<div id="mw-echo-close-box"><img style="display: block;" src="//upload.wikimedia.org/wikipedia/meta/a/ab/Medium_close_button.png"/></div>';
$alert += '<div id="mw-echo-alert-text">You have <a href="#" id="mw-echo-talk-link">new messages</a>. (<a href="#" id="mw-echo-talk-diff-link">view changes</a>)</div>';
$alert += '</div>';
$(document).ready(function() {
$( '.usermessage' ).hide(); // just in case
var newMsgRevisionId = mw.config.get( 'wgUserNewMsgRevisionId' );
if ( newMsgRevisionId ) {
var userName = mw.config.get( 'wgUserName' );
var talkLink = '/wiki/User_talk:' + userName + '?redirect=no';
var diffLink = '/w/index.php?title=User_talk:' + userName + '&oldid=' + newMsgRevisionId + '&diff=cur';
$( 'body' ).append( $alert );
$( '#mw-echo-close-box' ).click( function( e ) {
$( '#mw-echo-sliding-alert' ).hide();
e.preventDefault();
} );
$( 'a#mw-echo-talk-link' ).attr( 'href', talkLink );
$( 'a#mw-echo-talk-diff-link' ).attr( 'href', diffLink );
mw.config.set( 'echoNewMsgAlertDisplayed', true );
}
} );
} )( jQuery, mediaWiki );
67aac2b2df4217f5a28a9ab8dc68f062cc30295f
236
168
2013-08-24T16:11:07Z
Ptjackyll
0
zjadłem spację :)
javascript
text/javascript
( function( $, mw ) {
$alert = '<div id="mw-echo-sliding-alert">';
$alert += '<div id="mw-echo-close-box"><img style="display: block;" src="//upload.wikimedia.org/wikipedia/meta/a/ab/Medium_close_button.png"/></div>';
$alert += '<div id="mw-echo-alert-text">Masz <a href="#" id="mw-echo-talk-link">nowe wiadomości</a>. (<a href="#" id="mw-echo-talk-diff-link">różnica z poprzednią wersją</a>)</div>';
$alert += '</div>';
$(document).ready(function() {
$( '.usermessage' ).hide(); // just in case
var newMsgRevisionId = mw.config.get( 'wgUserNewMsgRevisionId' );
if ( newMsgRevisionId ) {
var userName = mw.config.get( 'wgUserName' );
var talkLink = '/wiki/User_talk:' + userName + '?redirect=no';
var diffLink = '/w/index.php?title=User_talk:' + userName + '&oldid=' + newMsgRevisionId + '&diff=cur';
$( 'body' ).append( $alert );
$( '#mw-echo-close-box' ).click( function( e ) {
$( '#mw-echo-sliding-alert' ).hide();
e.preventDefault();
} );
$( 'a#mw-echo-talk-link' ).attr( 'href', talkLink );
$( 'a#mw-echo-talk-diff-link' ).attr( 'href', diffLink );
mw.config.set( 'echoNewMsgAlertDisplayed', true );
}
} );
} )( jQuery, mediaWiki );
9cd982f0d3dd0bb91d0a0d87bf3f902ee0715e5a
167
2013-05-14T17:43:19Z
Kaldari
0
javascript
text/javascript
( function( $, mw ) {
$alert = '<div id="mw-echo-sliding-alert">';
$alert += '<div id="mw-echo-close-box"><img style="display: block;" src="//upload.wikimedia.org/wikipedia/meta/a/ab/Medium_close_button.png"/></div>';
$alert += '<div id="mw-echo-alert-text">You have <a href="#" id="mw-echo-talk-link">new messages</a>. (<a href="#" id="mw-echo-talk-diff-link">view changes</a>)</div>';
$alert += '</div>';
$(document).ready(function() {
$( '.usermessage' ).hide(); // just in case
var newMsgRevisionId = mw.config.get( 'wgUserNewMsgRevisionId' );
if ( newMsgRevisionId ) {
var userName = mw.config.get( 'wgUserName' );
var talkLink = '/wiki/User_talk:' + userName + '?redirect=no';
var diffLink = '/w/index.php?title=User_talk:' + userName + '&oldid=' + newMsgRevisionId + '&diff=cur';
$( 'body' ).append( $alert );
$( '#mw-echo-close-box' ).click( function( e ) {
$( '#mw-echo-sliding-alert' ).hide();
e.preventDefault();
} );
$( 'a#mw-echo-talk-link' ).attr( 'href', talkLink );
$( 'a#mw-echo-talk-diff-link' ).attr( 'href', diffLink );
mw.config.set( 'echoNewMsgAlertDisplayed', true );
}
} );
} )( jQuery, mediaWiki );
67aac2b2df4217f5a28a9ab8dc68f062cc30295f
MediaWiki:Gadget-twinklearv.js
8
136
342
341
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklearv.js: ARV module
****************************************
* Mode of invocation: Tab ("ARV")
* Active on: Existing and non-existing user pages, user talk pages, contributions pages
* Config directives in: TwinkleConfig
*/
Twinkle.arv = function twinklearv() {
var username = Morebits.getPageAssociatedUser();
if ( username === false ) {
return;
}
var title = Morebits.isIPAddress( username ) ? 'Report IP to administrators' : 'Report user to administrators';
Twinkle.addPortletLink( function(){ Twinkle.arv.callback(username); }, "ARV", "tw-arv", title );
};
Twinkle.arv.callback = function ( uid ) {
if ( uid === mw.config.get('wgUserName') ) {
alert( 'You don\'t want to report yourself, do you?' );
return;
}
var Window = new Morebits.simpleWindow( 600, 500 );
Window.setTitle( "Advance Reporting and Vetting" ); //Backronym
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Guide to AIV", "WP:GAIV" );
Window.addFooterLink( "UAA instructions", "WP:UAAI" );
Window.addFooterLink( "About SPI", "WP:SPI" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#arv" );
var form = new Morebits.quickForm( Twinkle.arv.callback.evaluate );
var categories = form.append( {
type: 'select',
name: 'category',
label: 'Select report type: ',
event: Twinkle.arv.callback.changeCategory
} );
categories.append( {
type: 'option',
label: 'Vandalism (WP:AIV)',
value: 'aiv'
} );
categories.append( {
type: 'option',
label: 'Username (WP:UAA)',
value: 'username'
} );
categories.append( {
type: 'option',
label: 'Sockpuppeteer (WP:SPI)',
value: 'sock'
} );
categories.append( {
type: 'option',
label: 'Sockpuppet (WP:SPI)',
value: 'puppet'
} );
categories.append( {
type: 'option',
label: 'Edit warring (WP:AN3)',
value: 'an3'
} );
form.append( {
type: 'field',
label: 'Work area',
name: 'work_area'
} );
form.append( { type: 'submit' } );
form.append( {
type: 'hidden',
name: 'uid',
value: uid
} );
var result = form.render();
Window.setContent( result );
Window.display();
// We must init the
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.category.dispatchEvent( evt );
};
Twinkle.arv.callback.changeCategory = function (e) {
var value = e.target.value;
var root = e.target.form;
var old_area = Morebits.quickForm.getElements(root, "work_area")[0];
var work_area = null;
switch( value ) {
case 'aiv':
/* falls through */
default:
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Report user for vandalism',
name: 'work_area'
} );
work_area.append( {
type: 'input',
name: 'page',
label: 'Primary linked page: ',
tooltip: 'Leave blank to not link to the page in the report',
value: Morebits.queryString.exists( 'vanarticle' ) ? Morebits.queryString.get( 'vanarticle' ) : '',
event: function(e) {
var value = e.target.value;
var root = e.target.form;
if( value === '' ) {
root.badid.disabled = root.goodid.disabled = true;
} else {
root.badid.disabled = false;
root.goodid.disabled = root.badid.value === '';
}
}
} );
work_area.append( {
type: 'input',
name: 'badid',
label: 'Revision ID for target page when vandalised: ',
tooltip: 'Leave blank for no diff link',
value: Morebits.queryString.exists( 'vanarticlerevid' ) ? Morebits.queryString.get( 'vanarticlerevid' ) : '',
disabled: !Morebits.queryString.exists( 'vanarticle' ),
event: function(e) {
var value = e.target.value;
var root = e.target.form;
root.goodid.disabled = value === '';
}
} );
work_area.append( {
type: 'input',
name: 'goodid',
label: 'Last good revision ID before vandalism of target page: ',
tooltip: 'Leave blank for diff link to previous revision',
value: Morebits.queryString.exists( 'vanarticlegoodrevid' ) ? Morebits.queryString.get( 'vanarticlegoodrevid' ) : '',
disabled: !Morebits.queryString.exists( 'vanarticle' ) || Morebits.queryString.exists( 'vanarticlerevid' )
} );
work_area.append( {
type: 'checkbox',
name: 'arvtype',
list: [
{
label: 'Vandalism after final (level 4 or 4im) warning given',
value: 'final'
},
{
label: 'Vandalism after recent (within 1 day) release of block',
value: 'postblock'
},
{
label: 'Evidently a vandalism-only account',
value: 'vandalonly',
disabled: Morebits.isIPAddress( root.uid.value )
},
{
label: 'Account is evidently a spambot or a compromised account',
value: 'spambot'
},
{
label: 'Account is a promotion-only account',
value: 'promoonly'
}
]
} );
work_area.append( {
type: 'textarea',
name: 'reason',
label: 'Comment: '
} );
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'username':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Report username violation',
name: 'work_area'
} );
work_area.append ( {
type: 'header',
label: 'Type(s) of inappropriate username',
tooltip: 'Wikipedia does not allow usernames that are misleading, promotional, offensive or disruptive. Domain names and email addresses are likewise prohibited. These criteria apply to both usernames and signatures. Usernames that are inappropriate in another language, or that represent an inappropriate name with misspellings and substitutions, or do so indirectly or by implication, are still considered inappropriate.'
} );
work_area.append( {
type: 'checkbox',
name: 'arvtype',
list: [
{
label: 'Misleading username',
value: 'misleading',
tooltip: 'Misleading usernames imply relevant, misleading things about the contributor. For example, misleading points of fact, an impression of undue authority, or the suggestion that the account is operated by a group, project or collective rather than one individual.'
},
{
label: 'Promotional username',
value: 'promotional',
tooltip: 'Promotional usernames are advertisements for a company, website or group. Please do not report these names to UAA unless the user has also made promotional edits related to the name.'
},
{
label: 'Offensive username',
value: 'offensive',
tooltip: 'Offensive usernames make harmonious editing difficult or impossible.'
},
{
label: 'Disruptive username',
value: 'disruptive',
tooltip: 'Disruptive usernames include outright trolling or personal attacks, or otherwise show a clear intent to disrupt Wikipedia.'
}
]
} );
work_area.append( {
type: 'textarea',
name: 'reason',
label: 'Comment:'
} );
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'puppet':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Report suspected sockpuppet',
name: 'work_area'
} );
work_area.append(
{
type: 'input',
name: 'sockmaster',
label: 'Sockpuppeteer',
tooltip: 'The username of the sockpuppeteer (sockmaster) without the User:-prefix'
}
);
work_area.append( {
type: 'textarea',
label: 'Evidence:',
name: 'evidence',
tooltip: 'Enter your evidence. It should make clear that each of these users is likely to be abusing multiple accounts. Usually this means diffs, page histories or other information that justifies why the users are a) the same and b) disruptive. This should purely be evidence and information needed to judge the matter. Avoid all other discussion that is not evidence of sockpuppetry or other multiple account abuse.'
} );
work_area.append( {
type: 'checkbox',
list: [
{
label: 'Request CheckUser evidence',
name: 'checkuser',
tooltip: 'CheckUser is a tool used to obtain technical evidence related to a sock-puppetry allegation. It will not be used without good cause, which you must clearly demonstrate. Make sure your evidence explains why CheckUser is appropriate.'
},
{
label: 'Notify reported users',
name: 'notify',
tooltip: 'Notification is not mandatory. In many cases, especially of chronic sockpuppeteers, notification may be counterproductive. However, especially in less egregious cases involving users who has not been reported before, notification may make the cases fairer and also appear to be fairer in the eyes of the accused. Use your judgment.'
}
]
} );
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'sock':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Report suspected sockpuppeteer',
name: 'work_area'
} );
work_area.append(
{
type: 'dyninput',
name: 'sockpuppet',
label: 'Sockpuppets',
sublabel: 'Sock: ',
tooltip: 'The username of the sockpuppet without the User:-prefix',
min: 2
} );
work_area.append( {
type: 'textarea',
label: 'Evidence:',
name: 'evidence',
tooltip: 'Enter your evidence. It should make clear that each of these users is likely to be abusing multiple accounts. Usually this means diffs, page histories or other information that justifies why the users are a) the same and b) disruptive. This should purely be evidence and information needed to judge the matter. Avoid all other discussion that is not evidence of sockpuppetry or other multiple account abuse.'
} );
work_area.append( {
type: 'checkbox',
list: [ {
label: 'Request CheckUser evidence',
name: 'checkuser',
tooltip: 'CheckUser is a tool used to obtain technical evidence related to a sock-puppetry allegation. It will not be used without good cause, which you must clearly demonstrate. Make sure your evidence explains why CheckUser is appropriate.'
}, {
label: 'Notify reported users',
name: 'notify',
tooltip: 'Notification is not mandatory. In many cases, especially of chronic sockpuppeteers, notification may be counterproductive. However, especially in less egregious cases involving users who has not been reported before, notification may make the cases fairer and also appear to be fairer in the eyes of the accused. Use your judgment.'
} ]
} );
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'an3':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Report edit warring',
name: 'work_area'
} );
work_area.append( {
type: 'input',
name: 'page',
label: 'Page',
tooltip: 'The page being reported'
} );
work_area.append( {
type: 'button',
name: 'load',
label: 'Load',
event: function(e) {
var root = e.target.form;
var value = root.page.value;
var uid = root.uid.value;
var $diffs = $(root).find('[name=diffs]');
$diffs.find('.entry').remove();
var date = new Date();
date.setHours(-36); // all since 36 hours
var api = new mw.Api();
api.get({
action: 'query',
prop: 'revisions',
format: 'json',
rvprop: 'sha1|ids|timestamp|parsedcomment|comment',
rvlimit: 500,
rvend: date.toISOString(),
rvuser: uid,
indexpageids: true,
redirects: true,
titles: value
}).done(function(data){
var pageid = data.query.pageids[0];
var page = data.query.pages[pageid];
if(!page.revisions) {
return;
}
for(var i = 0; i < page.revisions.length; ++i) {
var rev = page.revisions[i];
var $entry = $('<div/>', {
'class': 'entry'
});
var $input = $('<input/>', {
'type': 'checkbox',
'name': 's_diffs',
'value': rev.revid
});
$input.data('revinfo',rev);
$input.appendTo($entry);
$entry.append('<span>"'+rev.parsedcomment+'" at <a href="'+mw.config.get('wgScript')+'?diff='+rev.revid+'">'+moment(rev.timestamp).calendar()+'</a></span>').appendTo($diffs);
}
}).fail(function(data){
console.log( 'API failed :(', data );
});
var $warnings = $(root).find('[name=warnings]');
$warnings.find('.entry').remove();
api.get({
action: 'query',
prop: 'revisions',
format: 'json',
rvprop: 'sha1|ids|timestamp|parsedcomment|comment',
rvlimit: 500,
rvend: date.toISOString(),
rvuser: mw.config.get('wgUserName'),
indexpageids: true,
redirects: true,
titles: 'User talk:' + uid
}).done(function(data){
var pageid = data.query.pageids[0];
var page = data.query.pages[pageid];
if(!page.revisions) {
return;
}
for(var i = 0; i < page.revisions.length; ++i) {
var rev = page.revisions[i];
var $entry = $('<div/>', {
'class': 'entry'
});
var $input = $('<input/>', {
'type': 'checkbox',
'name': 's_warnings',
'value': rev.revid
});
$input.data('revinfo',rev);
$input.appendTo($entry);
$entry.append('<span>"'+rev.parsedcomment+'" at <a href="'+mw.config.get('wgScript')+'?diff='+rev.revid+'">'+moment(rev.timestamp).calendar()+'</a></span>').appendTo($warnings);
}
}).fail(function(data){
console.log( 'API failed :(', data );
});
var $resolves = $(root).find('[name=resolves]');
$resolves.find('.entry').remove();
var t = new mw.Title(value);
var ns = t.getNamespaceId();
var talk_page = (new mw.Title(t.getMain(), ns%2? ns : ns+1)).getPrefixedText();
api.get({
action: 'query',
prop: 'revisions',
format: 'json',
rvprop: 'sha1|ids|timestamp|parsedcomment|comment',
rvlimit: 500,
rvend: date.toISOString(),
rvuser: mw.config.get('wgUserName'),
indexpageids: true,
redirects: true,
titles: talk_page
}).done(function(data){
var pageid = data.query.pageids[0];
var page = data.query.pages[pageid];
if(!page.revisions) {
return;
}
for(var i = 0; i < page.revisions.length; ++i) {
var rev = page.revisions[i];
var $entry = $('<div/>', {
'class': 'entry'
});
var $input = $('<input/>', {
'type': 'checkbox',
'name': 's_resolves',
'value': rev.revid
});
$input.data('revinfo',rev);
$input.appendTo($entry);
$entry.append('<span>"'+rev.parsedcomment+'" at <a href="'+mw.config.get('wgScript')+'?diff='+rev.revid+'">'+moment(rev.timestamp).calendar()+'</a></span>').appendTo($resolves);
}
// add free form input
var $free_entry = $('<div/>', {
'class': 'entry'
});
var $free_input = $('<input/>', {
'type': 'text',
'name': 's_resolves_free'
});
var $free_label = $('<label/>', {
'for': 's_resolves_free',
'html': 'Diff to additional discussions: '
});
$free_entry.append($free_label).append($free_input).appendTo($resolves);
}).fail(function(data){
console.log( 'API failed :(', data );
});
}
} );
work_area.append( {
type: 'field',
name: 'diffs',
label: 'User\'s reverts',
tooltip: 'Select the edits you believe are reverts'
} );
work_area.append( {
type: 'field',
name: 'warnings',
label: 'Warnings given to subject',
tooltip: 'You must have warned the subject before reporting'
} );
work_area.append( {
type: 'field',
name: 'resolves',
label: 'Resolution initiatives',
tooltip: 'You should have tried to resolve the issue on the talk page first'
} );
work_area.append( {
type: 'textarea',
label: 'Comment:',
name: 'comment'
} );
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
}
};
Twinkle.arv.callback.evaluate = function(e) {
var form = e.target;
var reason = "";
var comment = "";
if ( form.reason ) {
comment = form.reason.value;
}
var uid = form.uid.value;
var types;
switch( form.category.value ) {
// Report user for vandalism
case 'aiv':
/* falls through */
default:
types = form.getChecked( 'arvtype' );
if( !types.length && comment === '' ) {
alert( 'You must specify some reason' );
return;
}
types = types.map( function(v) {
switch(v) {
case 'final':
return 'vandalism after final warning';
case 'postblock':
return 'vandalism after recent release of block';
case 'spambot':
return 'account is evidently a spambot or a compromised account';
case 'vandalonly':
return 'actions evidently indicate a vandalism-only account';
case 'promoonly':
return 'account is being used only for promotional purposes';
default:
return 'unknown reason';
}
} ).join( '; ' );
if ( form.page.value !== '' ) {
// add a leading : on linked page namespace to prevent transclusion
reason = 'On [[' + form.page.value.replace( /^(Image|Category|File):/i, ':$1:' ) + ']]';
if ( form.badid.value !== '' ) {
reason += ' ({{diff|' + form.page.value + '|' + form.badid.value + '|' + form.goodid.value + '|diff}})';
}
reason += ':';
}
if ( types ) {
reason += " " + types;
}
if (comment !== "" ) {
reason += (reason === "" ? "" : ". ") + comment;
}
reason = reason.trim();
if (reason.search(/[.?!;]$/) === -1) {
reason += ".";
}
reason += " ~~~~";
reason = reason.replace(/\r?\n/g, "\n*:"); // indent newlines
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Morebits.wiki.actionCompleted.redirect = "Wikipedia:Administrator intervention against vandalism";
Morebits.wiki.actionCompleted.notice = "Reporting complete";
var aivPage = new Morebits.wiki.page( 'Wikipedia:Administrator intervention against vandalism', 'Processing AIV request' );
aivPage.setPageSection( 1 );
aivPage.setFollowRedirect( true );
aivPage.load( function() {
var text = aivPage.getPageText();
// check if user has already been reported
if (new RegExp( "\\{\\{\\s*(?:(?:[Ii][Pp])?[Vv]andal|[Uu]serlinks)\\s*\\|\\s*(?:1=)?\\s*" + RegExp.escape( uid, true ) + "\\s*\\}\\}" ).test(text)) {
aivPage.getStatusElement().info( 'Report already present, will not add a new one' );
return;
}
aivPage.getStatusElement().status( 'Adding new report...' );
aivPage.setEditSummary( 'Reporting [[Special:Contributions/' + uid + '|' + uid + ']].' + Twinkle.getPref('summaryAd') );
aivPage.setAppendText( '\n*{{' + ( Morebits.isIPAddress( uid ) ? 'IPvandal' : 'vandal' ) + '|' + (/\=/.test( uid ) ? '1=' : '' ) + uid + '}} – ' + reason );
aivPage.append();
} );
break;
// Report inappropriate username
case 'username':
types = form.getChecked( 'arvtype' );
if( !types.length ) {
alert( 'You must specify at least one breached violation' );
return;
}
types = types.map( Morebits.string.toLowerCaseFirstChar );
if ( types.length <= 2 ) {
types = types.join( ' and ' );
} else {
types = [ types.slice( 0, -1 ).join( ', ' ), types.slice( -1 ) ].join( ' and ' );
}
var article = 'a';
if ( /[aeiouwyh]/.test( types[0] ) ) { // non 100% correct, but whatever, inlcuding 'h' for Cockney
article = 'an';
}
reason = "*{{user-uaa|1=" + uid + "}} – Violation of the username policy as " + article + " " + types + " username. ";
if (comment !== '' ) {
reason += Morebits.string.toUpperCaseFirstChar(comment) + ". ";
}
reason += "~~~~";
reason = reason.replace(/\r?\n/g, "\n*:"); // indent newlines
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Morebits.wiki.actionCompleted.redirect = "Wikipedia:Usernames for administrator attention";
Morebits.wiki.actionCompleted.notice = "Reporting complete";
var uaaPage = new Morebits.wiki.page( 'Wikipedia:Usernames for administrator attention', 'Processing UAA request' );
uaaPage.setFollowRedirect( true );
uaaPage.load( function() {
var text = uaaPage.getPageText();
// check if user has already been reported
if (new RegExp( "\\{\\{\\s*user-uaa\\s*\\|\\s*(1\\s*=\\s*)?" + RegExp.escape(uid, true) + "\\s*(\\||\\})" ).test(text)) {
uaaPage.getStatusElement().error( 'User is already listed.' );
return;
}
uaaPage.getStatusElement().status( 'Adding new report...' );
uaaPage.setEditSummary( 'Reporting [[Special:Contributions/' + uid + '|' + uid + ']].'+ Twinkle.getPref('summaryAd') );
uaaPage.setPageText( text.replace( /List begins below this line.\s*-->\s*/, "List begins below this line.\n-->\n" + reason + "\n\n" ) ); // add at top
uaaPage.save();
} );
break;
// WP:SPI
case "sock":
/* falls through */
case "puppet":
var sockParameters = {
evidence: form.evidence.value.trim(),
checkuser: form.checkuser.checked,
notify: form.notify.checked
};
var puppetReport = form.category.value === "puppet";
if (puppetReport && !(form.sockmaster.value.trim())) {
if (!confirm("You have not entered a sockmaster account for this puppet. Do you want to report this account as a sockpuppeteer instead?")) {
return;
}
puppetReport = false;
}
sockParameters.uid = puppetReport ? form.sockmaster.value.trim() : uid;
sockParameters.sockpuppets = puppetReport ? [uid] : $.map( $('input:text[name=sockpuppet]',form), function(o){ return $(o).val() || null; });
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Twinkle.arv.processSock( sockParameters );
break;
case 'an3':
var diffs = $.map( $('input:checkbox[name=s_diffs]:checked',form), function(o){ return $(o).data('revinfo'); });
if (diffs.length < 3 && !confirm("You have selected fewer than three offending edits. Do you wish to make the report anyway?")) {
return;
}
var warnings = $.map( $('input:checkbox[name=s_warnings]:checked',form), function(o){ return $(o).data('revinfo'); });
if(!warnings.length && !confirm("You have not selected any edits where you warned the offender. Do you wish to make the report anyway?")) {
return;
}
var resolves = $.map( $('input:checkbox[name=s_resolves]:checked',form), function(o){ return $(o).data('revinfo'); });
var free_resolves = $('input[name=s_resolves_free]').val();
var an3_next = function(free_resolves) {
if(!resolves.length && !free_resolves && !confirm("You have not selected any edits where you tried to resolve the issue. Do you wish to make the report anyway?")) {
return;
}
var an3Parameters = {
'uid': uid,
'page': form.page.value.trim(),
'comment': form.comment.value.trim(),
'diffs': diffs,
'warnings': warnings,
'resolves': resolves,
'free_resolves': free_resolves
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Twinkle.arv.processAN3( an3Parameters );
};
if(free_resolves) {
var oldid=mw.util.getParamValue('oldid',free_resolves);
var api = new mw.Api();
api.get({
action: 'query',
prop: 'revisions',
format: 'json',
rvprop: 'ids|timestamp|comment',
indexpageids: true,
revids: oldid
}).done(function(data){
var pageid = data.query.pageids[0];
var page = data.query.pages[pageid];
an3_next(page);
}).fail(function(data){
console.log( 'API failed :(', data );
});
} else {
an3_next();
}
break;
}
};
Twinkle.arv.processSock = function( params ) {
Morebits.wiki.addCheckpoint(); // prevent notification events from causing an erronous "action completed"
// notify all user accounts if requested
if (params.notify && params.sockpuppets.length>0) {
var notifyEditSummary = "Notifying about suspicion of sockpuppeteering." + Twinkle.getPref('summaryAd');
var notifyText = "\n\n{{subst:socksuspectnotice|1=" + params.uid + "}} ~~~~";
// notify user's master account
var masterTalkPage = new Morebits.wiki.page( 'User talk:' + params.uid, 'Notifying suspected sockpuppeteer' );
masterTalkPage.setFollowRedirect( true );
masterTalkPage.setEditSummary( notifyEditSummary );
masterTalkPage.setAppendText( notifyText );
masterTalkPage.append();
var statusIndicator = new Morebits.status( 'Notifying suspected sockpuppets', '0%' );
var total = params.sockpuppets.length;
var current = 0;
// display status of notifications as they progress
var onSuccess = function( sockTalkPage ) {
var now = parseInt( 100 * ++(current)/total, 10 ) + '%';
statusIndicator.update( now );
sockTalkPage.getStatusElement().unlink();
if ( current >= total ) {
statusIndicator.info( now + ' (completed)' );
}
};
var socks = params.sockpuppets;
// notify each puppet account
for( var i = 0; i < socks.length; ++i ) {
var sockTalkPage = new Morebits.wiki.page( 'User talk:' + socks[i], "Notification for " + socks[i] );
sockTalkPage.setFollowRedirect( true );
sockTalkPage.setEditSummary( notifyEditSummary );
sockTalkPage.setAppendText( notifyText );
sockTalkPage.append( onSuccess );
}
}
// prepare the SPI report
var text = "\n\n{{subst:SPI report|socksraw=" +
params.sockpuppets.map( function(v) {
return "* {{" + ( Morebits.isIPAddress( v ) ? "checkip" : "checkuser" ) + "|1=" + v + "}}";
} ).join( "\n" ) + "\n|evidence=" + params.evidence + " \n";
if ( params.checkuser ) {
text += "|checkuser=yes";
}
text += "}}";
var reportpage = 'Wikipedia:Sockpuppet investigations/' + params.uid;
Morebits.wiki.actionCompleted.redirect = reportpage;
Morebits.wiki.actionCompleted.notice = "Reporting complete";
var spiPage = new Morebits.wiki.page( reportpage, 'Retrieving discussion page' );
spiPage.setFollowRedirect( true );
spiPage.setEditSummary( 'Adding new report for [[Special:Contributions/' + params.uid + '|' + params.uid + ']].'+ Twinkle.getPref('summaryAd') );
spiPage.setAppendText( text );
switch( Twinkle.getPref( 'spiWatchReport' ) ) {
case 'yes':
spiPage.setWatchlist( true );
break;
case 'no':
spiPage.setWatchlistFromPreferences( false );
break;
default:
spiPage.setWatchlistFromPreferences( true );
break;
}
spiPage.append();
Morebits.wiki.removeCheckpoint(); // all page updates have been started
};
Twinkle.arv.processAN3 = function( params ) {
// prepare the AN3 report
var minid;
for(var i = 0; i < params.diffs.length; ++i) {
if( params.diffs[i].parentid && (!minid || params.diffs[i].parentid < minid)) {
minid = params.diffs[i].parentid;
}
}
var api = new mw.Api();
api.get({
action: 'query',
prop: 'revisions',
format: 'json',
rvprop: 'sha1|ids|timestamp|comment',
rvlimit: 100,
rvstartid: minid,
rvexcludeuser: params.uid,
indexpageids: true,
redirects: true,
titles: params.page
}).done(function(data){
Morebits.wiki.addCheckpoint(); // prevent notification events from causing an erronous "action completed"
var orig;
if(data.length) {
var sha1 = data[0].sha1;
for(var i = 1; i < data.length; ++i) {
if(data[i].sha1 == sha1) {
orig = data[i];
break;
}
}
if(!orig) {
orig = data[0];
}
}
var origtext = "";
if(orig) {
origtext = '{{diff2|' + orig.revid + '|' + orig.timestamp + '}} "' + orig.comment + '"';
}
var grouped_diffs = {};
var parentid, lastid;
for(var j = 0; j < params.diffs.length; ++j) {
var cur = params.diffs[j];
if( cur.revid && cur.revid != parentid || lastid === null ) {
lastid = cur.revid;
grouped_diffs[lastid] = [];
}
parentid = cur.parentid;
grouped_diffs[lastid].push(cur);
}
var difftext = $.map(grouped_diffs, function(sub, index){
var ret = "";
if(sub.length >= 2) {
var last = sub[0];
var first = sub.slice(-1)[0];
var label = "Consecutive edits made from " + moment(first.timestamp).utc().format('HH:mm, D MMMM YYYY [(UTC)]') + " to " + moment(last.timestamp).utc().format('HH:mm, D MMMM YYYY [(UTC)]');
ret = "# {{diff|oldid="+first.parentid+"|diff="+last.revid+"|label="+label+"}}\n";
}
ret += sub.reverse().map(function(v){
return (sub.length >= 2 ? '#' : '') + '# {{diff2|' + v.revid + '|' + moment(v.timestamp).utc().format('HH:mm, D MMMM YYYY [(UTC)]') + '}} "' + v.comment + '"';
}).join("\n");
return ret;
}).reverse().join("\n");
var warningtext = params.warnings.reverse().map(function(v){
return '# ' + ' {{diff2|' + v.revid + '|' + moment(v.timestamp).utc().format('HH:mm, D MMMM YYYY [(UTC)]') + '}} "' + v.comment + '"';
}).join("\n");
var resolvetext = params.resolves.reverse().map(function(v){
return '# ' + ' {{diff2|' + v.revid + '|' + moment(v.timestamp).utc().format('HH:mm, D MMMM YYYY [(UTC)]') + '}} "' + v.comment + '"';
}).join("\n");
if(params.free_resolves) {
var page = params.free_resolves;
var rev = page.revisions[0];
resolvetext += "\n# " + ' {{diff2|' + rev.revid + '|' + moment(rev.timestamp).utc().format('HH:mm, D MMMM YYYY [(UTC)]') + ' on ' + page.title + '}} "' + rev.comment + '"';
}
var comment = params.comment.replace(/~*$/g, '').trim();
if(comment) {
comment += " ~~~~";
}
var text = "\n\n"+'{{subst:AN3 report|diffs='+difftext+'|warnings='+warningtext+'|resolves='+resolvetext+'|pagename='+params.page+'|orig='+origtext+'|comment='+comment+'|uid='+params.uid+'}}';
var reportpage = 'Wikipedia:Administrators\' noticeboard/Edit warring';
Morebits.wiki.actionCompleted.redirect = reportpage;
Morebits.wiki.actionCompleted.notice = "Reporting complete";
var an3Page = new Morebits.wiki.page( reportpage, 'Retrieving discussion page' );
an3Page.setFollowRedirect( true );
an3Page.setEditSummary( 'Adding new report for [[Special:Contributions/' + params.uid + '|' + params.uid + ']].'+ Twinkle.getPref('summaryAd') );
an3Page.setAppendText( text );
an3Page.append();
// notify user
var notifyEditSummary = "Notifying about edit warring noticeboard discussion." + Twinkle.getPref('summaryAd');
var notifyText = "\n\n{{subst:an3-notice|1=" + mw.util.wikiUrlencode(params.uid) + "|auto=1}} ~~~~";
var talkPage = new Morebits.wiki.page( 'User talk:' + params.uid, 'Notifying edit warrior' );
talkPage.setFollowRedirect( true );
talkPage.setEditSummary( notifyEditSummary );
talkPage.setAppendText( notifyText );
talkPage.append();
Morebits.wiki.removeCheckpoint(); // all page updates have been started
}).fail(function(data){
console.log( 'API failed :(', data );
});
};
})(jQuery);
//</nowiki>
a089ea3503c1cc441cb00353d5e05b23347ee53d
341
2014-01-07T11:39:02Z
Amalthea
0
v2.0-682-ge4735d6: Linting
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklearv.js: ARV module
****************************************
* Mode of invocation: Tab ("ARV")
* Active on: Existing and non-existing user pages, user talk pages, contributions pages
* Config directives in: TwinkleConfig
*/
Twinkle.arv = function twinklearv() {
var username = Morebits.getPageAssociatedUser();
if ( username === false ) {
return;
}
var title = Morebits.isIPAddress( username ) ? 'Report IP to administrators' : 'Report user to administrators';
Twinkle.addPortletLink( function(){ Twinkle.arv.callback(username); }, "ARV", "tw-arv", title );
};
Twinkle.arv.callback = function ( uid ) {
if ( uid === mw.config.get('wgUserName') ) {
alert( 'You don\'t want to report yourself, do you?' );
return;
}
var Window = new Morebits.simpleWindow( 600, 500 );
Window.setTitle( "Advance Reporting and Vetting" ); //Backronym
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Guide to AIV", "WP:GAIV" );
Window.addFooterLink( "UAA instructions", "WP:UAAI" );
Window.addFooterLink( "About SPI", "WP:SPI" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#arv" );
var form = new Morebits.quickForm( Twinkle.arv.callback.evaluate );
var categories = form.append( {
type: 'select',
name: 'category',
label: 'Select report type: ',
event: Twinkle.arv.callback.changeCategory
} );
categories.append( {
type: 'option',
label: 'Vandalism (WP:AIV)',
value: 'aiv'
} );
categories.append( {
type: 'option',
label: 'Username (WP:UAA)',
value: 'username'
} );
categories.append( {
type: 'option',
label: 'Sockpuppeteer (WP:SPI)',
value: 'sock'
} );
categories.append( {
type: 'option',
label: 'Sockpuppet (WP:SPI)',
value: 'puppet'
} );
categories.append( {
type: 'option',
label: 'Edit warring (WP:AN3)',
value: 'an3'
} );
form.append( {
type: 'field',
label: 'Work area',
name: 'work_area'
} );
form.append( { type: 'submit' } );
form.append( {
type: 'hidden',
name: 'uid',
value: uid
} );
var result = form.render();
Window.setContent( result );
Window.display();
// We must init the
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.category.dispatchEvent( evt );
};
Twinkle.arv.callback.changeCategory = function (e) {
var value = e.target.value;
var root = e.target.form;
var old_area = Morebits.quickForm.getElements(root, "work_area")[0];
var work_area = null;
switch( value ) {
case 'aiv':
/* falls through */
default:
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Report user for vandalism',
name: 'work_area'
} );
work_area.append( {
type: 'input',
name: 'page',
label: 'Primary linked page: ',
tooltip: 'Leave blank to not link to the page in the report',
value: Morebits.queryString.exists( 'vanarticle' ) ? Morebits.queryString.get( 'vanarticle' ) : '',
event: function(e) {
var value = e.target.value;
var root = e.target.form;
if( value === '' ) {
root.badid.disabled = root.goodid.disabled = true;
} else {
root.badid.disabled = false;
root.goodid.disabled = root.badid.value === '';
}
}
} );
work_area.append( {
type: 'input',
name: 'badid',
label: 'Revision ID for target page when vandalised: ',
tooltip: 'Leave blank for no diff link',
value: Morebits.queryString.exists( 'vanarticlerevid' ) ? Morebits.queryString.get( 'vanarticlerevid' ) : '',
disabled: !Morebits.queryString.exists( 'vanarticle' ),
event: function(e) {
var value = e.target.value;
var root = e.target.form;
root.goodid.disabled = value === '';
}
} );
work_area.append( {
type: 'input',
name: 'goodid',
label: 'Last good revision ID before vandalism of target page: ',
tooltip: 'Leave blank for diff link to previous revision',
value: Morebits.queryString.exists( 'vanarticlegoodrevid' ) ? Morebits.queryString.get( 'vanarticlegoodrevid' ) : '',
disabled: !Morebits.queryString.exists( 'vanarticle' ) || Morebits.queryString.exists( 'vanarticlerevid' )
} );
work_area.append( {
type: 'checkbox',
name: 'arvtype',
list: [
{
label: 'Vandalism after final (level 4 or 4im) warning given',
value: 'final'
},
{
label: 'Vandalism after recent (within 1 day) release of block',
value: 'postblock'
},
{
label: 'Evidently a vandalism-only account',
value: 'vandalonly',
disabled: Morebits.isIPAddress( root.uid.value )
},
{
label: 'Account is evidently a spambot or a compromised account',
value: 'spambot'
},
{
label: 'Account is a promotion-only account',
value: 'promoonly'
}
]
} );
work_area.append( {
type: 'textarea',
name: 'reason',
label: 'Comment: '
} );
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'username':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Report username violation',
name: 'work_area'
} );
work_area.append ( {
type: 'header',
label: 'Type(s) of inappropriate username',
tooltip: 'Wikipedia does not allow usernames that are misleading, promotional, offensive or disruptive. Domain names and email addresses are likewise prohibited. These criteria apply to both usernames and signatures. Usernames that are inappropriate in another language, or that represent an inappropriate name with misspellings and substitutions, or do so indirectly or by implication, are still considered inappropriate.'
} );
work_area.append( {
type: 'checkbox',
name: 'arvtype',
list: [
{
label: 'Misleading username',
value: 'misleading',
tooltip: 'Misleading usernames imply relevant, misleading things about the contributor. For example, misleading points of fact, an impression of undue authority, or the suggestion that the account is operated by a group, project or collective rather than one individual.'
},
{
label: 'Promotional username',
value: 'promotional',
tooltip: 'Promotional usernames are advertisements for a company, website or group. Please do not report these names to UAA unless the user has also made promotional edits related to the name.'
},
{
label: 'Offensive username',
value: 'offensive',
tooltip: 'Offensive usernames make harmonious editing difficult or impossible.'
},
{
label: 'Disruptive username',
value: 'disruptive',
tooltip: 'Disruptive usernames include outright trolling or personal attacks, or otherwise show a clear intent to disrupt Wikipedia.'
}
]
} );
work_area.append( {
type: 'textarea',
name: 'reason',
label: 'Comment:'
} );
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'puppet':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Report suspected sockpuppet',
name: 'work_area'
} );
work_area.append(
{
type: 'input',
name: 'sockmaster',
label: 'Sockpuppeteer',
tooltip: 'The username of the sockpuppeteer (sockmaster) without the User:-prefix'
}
);
work_area.append( {
type: 'textarea',
label: 'Evidence:',
name: 'evidence',
tooltip: 'Enter your evidence. It should make clear that each of these users is likely to be abusing multiple accounts. Usually this means diffs, page histories or other information that justifies why the users are a) the same and b) disruptive. This should purely be evidence and information needed to judge the matter. Avoid all other discussion that is not evidence of sockpuppetry or other multiple account abuse.'
} );
work_area.append( {
type: 'checkbox',
list: [
{
label: 'Request CheckUser evidence',
name: 'checkuser',
tooltip: 'CheckUser is a tool used to obtain technical evidence related to a sock-puppetry allegation. It will not be used without good cause, which you must clearly demonstrate. Make sure your evidence explains why CheckUser is appropriate.'
},
{
label: 'Notify reported users',
name: 'notify',
tooltip: 'Notification is not mandatory. In many cases, especially of chronic sockpuppeteers, notification may be counterproductive. However, especially in less egregious cases involving users who has not been reported before, notification may make the cases fairer and also appear to be fairer in the eyes of the accused. Use your judgment.'
}
]
} );
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'sock':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Report suspected sockpuppeteer',
name: 'work_area'
} );
work_area.append(
{
type: 'dyninput',
name: 'sockpuppet',
label: 'Sockpuppets',
sublabel: 'Sock: ',
tooltip: 'The username of the sockpuppet without the User:-prefix',
min: 2
} );
work_area.append( {
type: 'textarea',
label: 'Evidence:',
name: 'evidence',
tooltip: 'Enter your evidence. It should make clear that each of these users is likely to be abusing multiple accounts. Usually this means diffs, page histories or other information that justifies why the users are a) the same and b) disruptive. This should purely be evidence and information needed to judge the matter. Avoid all other discussion that is not evidence of sockpuppetry or other multiple account abuse.'
} );
work_area.append( {
type: 'checkbox',
list: [ {
label: 'Request CheckUser evidence',
name: 'checkuser',
tooltip: 'CheckUser is a tool used to obtain technical evidence related to a sock-puppetry allegation. It will not be used without good cause, which you must clearly demonstrate. Make sure your evidence explains why CheckUser is appropriate.'
}, {
label: 'Notify reported users',
name: 'notify',
tooltip: 'Notification is not mandatory. In many cases, especially of chronic sockpuppeteers, notification may be counterproductive. However, especially in less egregious cases involving users who has not been reported before, notification may make the cases fairer and also appear to be fairer in the eyes of the accused. Use your judgment.'
} ]
} );
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'an3':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Report edit warring',
name: 'work_area'
} );
work_area.append( {
type: 'input',
name: 'page',
label: 'Page',
tooltip: 'The page being reported'
} );
work_area.append( {
type: 'button',
name: 'load',
label: 'Load',
event: function(e) {
var root = e.target.form;
var value = root.page.value;
var uid = root.uid.value;
var $diffs = $(root).find('[name=diffs]');
$diffs.find('.entry').remove();
var date = new Date();
date.setHours(-36); // all since 36 hours
var api = new mw.Api();
api.get({
action: 'query',
prop: 'revisions',
format: 'json',
rvprop: 'sha1|ids|timestamp|parsedcomment|comment',
rvlimit: 500,
rvend: date.toISOString(),
rvuser: uid,
indexpageids: true,
redirects: true,
titles: value
}).done(function(data){
var pageid = data.query.pageids[0];
var page = data.query.pages[pageid];
if(!page.revisions) {
return;
}
for(var i = 0; i < page.revisions.length; ++i) {
var rev = page.revisions[i];
var $entry = $('<div/>', {
'class': 'entry'
});
var $input = $('<input/>', {
'type': 'checkbox',
'name': 's_diffs',
'value': rev.revid
});
$input.data('revinfo',rev);
$input.appendTo($entry);
$entry.append('<span>"'+rev.parsedcomment+'" at <a href="'+mw.config.get('wgScript')+'?diff='+rev.revid+'">'+moment(rev.timestamp).calendar()+'</a></span>').appendTo($diffs);
}
}).fail(function(data){
console.log( 'API failed :(', data );
});
var $warnings = $(root).find('[name=warnings]');
$warnings.find('.entry').remove();
api.get({
action: 'query',
prop: 'revisions',
format: 'json',
rvprop: 'sha1|ids|timestamp|parsedcomment|comment',
rvlimit: 500,
rvend: date.toISOString(),
rvuser: mw.config.get('wgUserName'),
indexpageids: true,
redirects: true,
titles: 'User talk:' + uid
}).done(function(data){
var pageid = data.query.pageids[0];
var page = data.query.pages[pageid];
if(!page.revisions) {
return;
}
for(var i = 0; i < page.revisions.length; ++i) {
var rev = page.revisions[i];
var $entry = $('<div/>', {
'class': 'entry'
});
var $input = $('<input/>', {
'type': 'checkbox',
'name': 's_warnings',
'value': rev.revid
});
$input.data('revinfo',rev);
$input.appendTo($entry);
$entry.append('<span>"'+rev.parsedcomment+'" at <a href="'+mw.config.get('wgScript')+'?diff='+rev.revid+'">'+moment(rev.timestamp).calendar()+'</a></span>').appendTo($warnings);
}
}).fail(function(data){
console.log( 'API failed :(', data );
});
var $resolves = $(root).find('[name=resolves]');
$resolves.find('.entry').remove();
var t = new mw.Title(value);
var ns = t.getNamespaceId();
var talk_page = (new mw.Title(t.getMain(), ns%2? ns : ns+1)).getPrefixedText();
api.get({
action: 'query',
prop: 'revisions',
format: 'json',
rvprop: 'sha1|ids|timestamp|parsedcomment|comment',
rvlimit: 500,
rvend: date.toISOString(),
rvuser: mw.config.get('wgUserName'),
indexpageids: true,
redirects: true,
titles: talk_page
}).done(function(data){
var pageid = data.query.pageids[0];
var page = data.query.pages[pageid];
if(!page.revisions) {
return;
}
for(var i = 0; i < page.revisions.length; ++i) {
var rev = page.revisions[i];
var $entry = $('<div/>', {
'class': 'entry'
});
var $input = $('<input/>', {
'type': 'checkbox',
'name': 's_resolves',
'value': rev.revid
});
$input.data('revinfo',rev);
$input.appendTo($entry);
$entry.append('<span>"'+rev.parsedcomment+'" at <a href="'+mw.config.get('wgScript')+'?diff='+rev.revid+'">'+moment(rev.timestamp).calendar()+'</a></span>').appendTo($resolves);
}
// add free form input
var $free_entry = $('<div/>', {
'class': 'entry'
});
var $free_input = $('<input/>', {
'type': 'text',
'name': 's_resolves_free'
});
var $free_label = $('<label/>', {
'for': 's_resolves_free',
'html': 'Diff to additional discussions: '
});
$free_entry.append($free_label).append($free_input).appendTo($resolves);
}).fail(function(data){
console.log( 'API failed :(', data );
});
}
} );
work_area.append( {
type: 'field',
name: 'diffs',
label: 'User\'s reverts',
tooltip: 'Select the edits you believe are reverts'
} );
work_area.append( {
type: 'field',
name: 'warnings',
label: 'Warnings given to subject',
tooltip: 'You must have warned the subject before reporting'
} );
work_area.append( {
type: 'field',
name: 'resolves',
label: 'Resolution initiatives',
tooltip: 'You should have tried to resolve the issue on the talk page first'
} );
work_area.append( {
type: 'textarea',
label: 'Comment:',
name: 'comment'
} );
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
}
};
Twinkle.arv.callback.evaluate = function(e) {
var form = e.target;
var reason = "";
var comment = "";
if ( form.reason ) {
comment = form.reason.value;
}
var uid = form.uid.value;
var types;
switch( form.category.value ) {
// Report user for vandalism
case 'aiv':
/* falls through */
default:
types = form.getChecked( 'arvtype' );
if( !types.length && comment === '' ) {
alert( 'You must specify some reason' );
return;
}
types = types.map( function(v) {
switch(v) {
case 'final':
return 'vandalism after final warning';
case 'postblock':
return 'vandalism after recent release of block';
case 'spambot':
return 'account is evidently a spambot or a compromised account';
case 'vandalonly':
return 'actions evidently indicate a vandalism-only account';
case 'promoonly':
return 'account is being used only for promotional purposes';
default:
return 'unknown reason';
}
} ).join( '; ' );
if ( form.page.value !== '' ) {
// add a leading : on linked page namespace to prevent transclusion
reason = 'On [[' + form.page.value.replace( /^(Image|Category|File):/i, ':$1:' ) + ']]';
if ( form.badid.value !== '' ) {
reason += ' ({{diff|' + form.page.value + '|' + form.badid.value + '|' + form.goodid.value + '|diff}})';
}
reason += ':';
}
if ( types ) {
reason += " " + types;
}
if (comment !== "" ) {
reason += (reason === "" ? "" : ". ") + comment;
}
reason = reason.trim();
if (reason.search(/[.?!;]$/) === -1) {
reason += ".";
}
reason += " ~~~~";
reason = reason.replace(/\r?\n/g, "\n*:"); // indent newlines
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Morebits.wiki.actionCompleted.redirect = "Wikipedia:Administrator intervention against vandalism";
Morebits.wiki.actionCompleted.notice = "Reporting complete";
var aivPage = new Morebits.wiki.page( 'Wikipedia:Administrator intervention against vandalism', 'Processing AIV request' );
aivPage.setPageSection( 1 );
aivPage.setFollowRedirect( true );
aivPage.load( function() {
var text = aivPage.getPageText();
// check if user has already been reported
if (new RegExp( "\\{\\{\\s*(?:(?:[Ii][Pp])?[Vv]andal|[Uu]serlinks)\\s*\\|\\s*(?:1=)?\\s*" + RegExp.escape( uid, true ) + "\\s*\\}\\}" ).test(text)) {
aivPage.getStatusElement().info( 'Report already present, will not add a new one' );
return;
}
aivPage.getStatusElement().status( 'Adding new report...' );
aivPage.setEditSummary( 'Reporting [[Special:Contributions/' + uid + '|' + uid + ']].' + Twinkle.getPref('summaryAd') );
aivPage.setAppendText( '\n*{{' + ( Morebits.isIPAddress( uid ) ? 'IPvandal' : 'vandal' ) + '|' + (/\=/.test( uid ) ? '1=' : '' ) + uid + '}} – ' + reason );
aivPage.append();
} );
break;
// Report inappropriate username
case 'username':
types = form.getChecked( 'arvtype' );
if( !types.length ) {
alert( 'You must specify at least one breached violation' );
return;
}
types = types.map( Morebits.string.toLowerCaseFirstChar );
if ( types.length <= 2 ) {
types = types.join( ' and ' );
} else {
types = [ types.slice( 0, -1 ).join( ', ' ), types.slice( -1 ) ].join( ' and ' );
}
var article = 'a';
if ( /[aeiouwyh]/.test( types[0] ) ) { // non 100% correct, but whatever, inlcuding 'h' for Cockney
article = 'an';
}
reason = "*{{user-uaa|1=" + uid + "}} – Violation of the username policy as " + article + " " + types + " username. ";
if (comment !== '' ) {
reason += Morebits.string.toUpperCaseFirstChar(comment) + ". ";
}
reason += "~~~~";
reason = reason.replace(/\r?\n/g, "\n*:"); // indent newlines
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Morebits.wiki.actionCompleted.redirect = "Wikipedia:Usernames for administrator attention";
Morebits.wiki.actionCompleted.notice = "Reporting complete";
var uaaPage = new Morebits.wiki.page( 'Wikipedia:Usernames for administrator attention', 'Processing UAA request' );
uaaPage.setFollowRedirect( true );
uaaPage.load( function() {
var text = uaaPage.getPageText();
// check if user has already been reported
if (new RegExp( "\\{\\{\\s*user-uaa\\s*\\|\\s*(1\\s*=\\s*)?" + RegExp.escape(uid, true) + "\\s*(\\||\\})" ).test(text)) {
uaaPage.getStatusElement().error( 'User is already listed.' );
return;
}
uaaPage.getStatusElement().status( 'Adding new report...' );
uaaPage.setEditSummary( 'Reporting [[Special:Contributions/' + uid + '|' + uid + ']].'+ Twinkle.getPref('summaryAd') );
uaaPage.setPageText( text.replace( /List begins below this line.\s*-->\s*/, "List begins below this line.\n-->\n" + reason + "\n\n" ) ); // add at top
uaaPage.save();
} );
break;
// WP:SPI
case "sock":
/* falls through */
case "puppet":
var sockParameters = {
evidence: form.evidence.value.trim(),
checkuser: form.checkuser.checked,
notify: form.notify.checked
};
var puppetReport = form.category.value === "puppet";
if (puppetReport && !(form.sockmaster.value.trim())) {
if (!confirm("You have not entered a sockmaster account for this puppet. Do you want to report this account as a sockpuppeteer instead?")) {
return;
}
puppetReport = false;
}
sockParameters.uid = puppetReport ? form.sockmaster.value.trim() : uid;
sockParameters.sockpuppets = puppetReport ? [uid] : $.map( $('input:text[name=sockpuppet]',form), function(o){ return $(o).val() || null; });
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Twinkle.arv.processSock( sockParameters );
break;
case 'an3':
var diffs = $.map( $('input:checkbox[name=s_diffs]:checked',form), function(o){ return $(o).data('revinfo'); });
if (diffs.length < 3 && !confirm("You have selected fewer than three offending edits. Do you wish to make the report anyway?")) {
return;
}
var warnings = $.map( $('input:checkbox[name=s_warnings]:checked',form), function(o){ return $(o).data('revinfo'); });
if(!warnings.length && !confirm("You have not selected any edits where you warned the offender. Do you wish to make the report anyway?")) {
return;
}
var resolves = $.map( $('input:checkbox[name=s_resolves]:checked',form), function(o){ return $(o).data('revinfo'); });
var free_resolves = $('input[name=s_resolves_free]').val();
var an3_next = function(free_resolves) {
if(!resolves.length && !free_resolves && !confirm("You have not selected any edits where you tried to resolve the issue. Do you wish to make the report anyway?")) {
return;
}
var an3Parameters = {
'uid': uid,
'page': form.page.value.trim(),
'comment': form.comment.value.trim(),
'diffs': diffs,
'warnings': warnings,
'resolves': resolves,
'free_resolves': free_resolves
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Twinkle.arv.processAN3( an3Parameters );
};
if(free_resolves) {
var oldid=mw.util.getParamValue('oldid',free_resolves);
var api = new mw.Api();
api.get({
action: 'query',
prop: 'revisions',
format: 'json',
rvprop: 'ids|timestamp|comment',
indexpageids: true,
revids: oldid
}).done(function(data){
var pageid = data.query.pageids[0];
var page = data.query.pages[pageid];
an3_next(page);
}).fail(function(data){
console.log( 'API failed :(', data );
});
} else {
an3_next();
}
break;
}
};
Twinkle.arv.processSock = function( params ) {
Morebits.wiki.addCheckpoint(); // prevent notification events from causing an erronous "action completed"
// notify all user accounts if requested
if (params.notify && params.sockpuppets.length>0) {
var notifyEditSummary = "Notifying about suspicion of sockpuppeteering." + Twinkle.getPref('summaryAd');
var notifyText = "\n\n{{subst:socksuspectnotice|1=" + params.uid + "}} ~~~~";
// notify user's master account
var masterTalkPage = new Morebits.wiki.page( 'User talk:' + params.uid, 'Notifying suspected sockpuppeteer' );
masterTalkPage.setFollowRedirect( true );
masterTalkPage.setEditSummary( notifyEditSummary );
masterTalkPage.setAppendText( notifyText );
masterTalkPage.append();
var statusIndicator = new Morebits.status( 'Notifying suspected sockpuppets', '0%' );
var total = params.sockpuppets.length;
var current = 0;
// display status of notifications as they progress
var onSuccess = function( sockTalkPage ) {
var now = parseInt( 100 * ++(current)/total, 10 ) + '%';
statusIndicator.update( now );
sockTalkPage.getStatusElement().unlink();
if ( current >= total ) {
statusIndicator.info( now + ' (completed)' );
}
};
var socks = params.sockpuppets;
// notify each puppet account
for( var i = 0; i < socks.length; ++i ) {
var sockTalkPage = new Morebits.wiki.page( 'User talk:' + socks[i], "Notification for " + socks[i] );
sockTalkPage.setFollowRedirect( true );
sockTalkPage.setEditSummary( notifyEditSummary );
sockTalkPage.setAppendText( notifyText );
sockTalkPage.append( onSuccess );
}
}
// prepare the SPI report
var text = "\n\n{{subst:SPI report|socksraw=" +
params.sockpuppets.map( function(v) {
return "* {{" + ( Morebits.isIPAddress( v ) ? "checkip" : "checkuser" ) + "|1=" + v + "}}";
} ).join( "\n" ) + "\n|evidence=" + params.evidence + " \n";
if ( params.checkuser ) {
text += "|checkuser=yes";
}
text += "}}";
var reportpage = 'Wikipedia:Sockpuppet investigations/' + params.uid;
Morebits.wiki.actionCompleted.redirect = reportpage;
Morebits.wiki.actionCompleted.notice = "Reporting complete";
var spiPage = new Morebits.wiki.page( reportpage, 'Retrieving discussion page' );
spiPage.setFollowRedirect( true );
spiPage.setEditSummary( 'Adding new report for [[Special:Contributions/' + params.uid + '|' + params.uid + ']].'+ Twinkle.getPref('summaryAd') );
spiPage.setAppendText( text );
switch( Twinkle.getPref( 'spiWatchReport' ) ) {
case 'yes':
spiPage.setWatchlist( true );
break;
case 'no':
spiPage.setWatchlistFromPreferences( false );
break;
default:
spiPage.setWatchlistFromPreferences( true );
break;
}
spiPage.append();
Morebits.wiki.removeCheckpoint(); // all page updates have been started
};
Twinkle.arv.processAN3 = function( params ) {
// prepare the AN3 report
var minid;
for(var i = 0; i < params.diffs.length; ++i) {
if( params.diffs[i].parentid && (!minid || params.diffs[i].parentid < minid)) {
minid = params.diffs[i].parentid;
}
}
var api = new mw.Api();
api.get({
action: 'query',
prop: 'revisions',
format: 'json',
rvprop: 'sha1|ids|timestamp|comment',
rvlimit: 100,
rvstartid: minid,
rvexcludeuser: params.uid,
indexpageids: true,
redirects: true,
titles: params.page
}).done(function(data){
Morebits.wiki.addCheckpoint(); // prevent notification events from causing an erronous "action completed"
var orig;
if(data.length) {
var sha1 = data[0].sha1;
for(var i = 1; i < data.length; ++i) {
if(data[i].sha1 == sha1) {
orig = data[i];
break;
}
}
if(!orig) {
orig = data[0];
}
}
var origtext = "";
if(orig) {
origtext = '{{diff2|' + orig.revid + '|' + orig.timestamp + '}} "' + orig.comment + '"';
}
var grouped_diffs = {};
var parentid, lastid;
for(var j = 0; j < params.diffs.length; ++j) {
var cur = params.diffs[j];
if( cur.revid && cur.revid != parentid || lastid === null ) {
lastid = cur.revid;
grouped_diffs[lastid] = [];
}
parentid = cur.parentid;
grouped_diffs[lastid].push(cur);
}
var difftext = $.map(grouped_diffs, function(sub, index){
var ret = "";
if(sub.length >= 2) {
var last = sub[0];
var first = sub.slice(-1)[0];
var label = "Consecutive edits made from " + moment(first.timestamp).utc().format('HH:mm, D MMMM YYYY [(UTC)]') + " to " + moment(last.timestamp).utc().format('HH:mm, D MMMM YYYY [(UTC)]');
ret = "# {{diff|oldid="+first.parentid+"|diff="+last.revid+"|label="+label+"}}\n";
}
ret += sub.reverse().map(function(v){
return (sub.length >= 2 ? '#' : '') + '# {{diff2|' + v.revid + '|' + moment(v.timestamp).utc().format('HH:mm, D MMMM YYYY [(UTC)]') + '}} "' + v.comment + '"';
}).join("\n");
return ret;
}).reverse().join("\n");
var warningtext = params.warnings.reverse().map(function(v){
return '# ' + ' {{diff2|' + v.revid + '|' + moment(v.timestamp).utc().format('HH:mm, D MMMM YYYY [(UTC)]') + '}} "' + v.comment + '"';
}).join("\n");
var resolvetext = params.resolves.reverse().map(function(v){
return '# ' + ' {{diff2|' + v.revid + '|' + moment(v.timestamp).utc().format('HH:mm, D MMMM YYYY [(UTC)]') + '}} "' + v.comment + '"';
}).join("\n");
if(params.free_resolves) {
var page = params.free_resolves;
var rev = page.revisions[0];
resolvetext += "\n# " + ' {{diff2|' + rev.revid + '|' + moment(rev.timestamp).utc().format('HH:mm, D MMMM YYYY [(UTC)]') + ' on ' + page.title + '}} "' + rev.comment + '"';
}
var comment = params.comment.replace(/~*$/g, '').trim();
if(comment) {
comment += " ~~~~";
}
var text = "\n\n"+'{{subst:AN3 report|diffs='+difftext+'|warnings='+warningtext+'|resolves='+resolvetext+'|pagename='+params.page+'|orig='+origtext+'|comment='+comment+'|uid='+params.uid+'}}';
var reportpage = 'Wikipedia:Administrators\' noticeboard/Edit warring';
Morebits.wiki.actionCompleted.redirect = reportpage;
Morebits.wiki.actionCompleted.notice = "Reporting complete";
var an3Page = new Morebits.wiki.page( reportpage, 'Retrieving discussion page' );
an3Page.setFollowRedirect( true );
an3Page.setEditSummary( 'Adding new report for [[Special:Contributions/' + params.uid + '|' + params.uid + ']].'+ Twinkle.getPref('summaryAd') );
an3Page.setAppendText( text );
an3Page.append();
// notify user
var notifyEditSummary = "Notifying about edit warring noticeboard discussion." + Twinkle.getPref('summaryAd');
var notifyText = "\n\n{{subst:an3-notice|1=" + mw.util.wikiUrlencode(params.uid) + "|auto=1}} ~~~~";
var talkPage = new Morebits.wiki.page( 'User talk:' + params.uid, 'Notifying edit warrior' );
talkPage.setFollowRedirect( true );
talkPage.setEditSummary( notifyEditSummary );
talkPage.setAppendText( notifyText );
talkPage.append();
Morebits.wiki.removeCheckpoint(); // all page updates have been started
}).fail(function(data){
console.log( 'API failed :(', data );
});
};
})(jQuery);
//</nowiki>
a089ea3503c1cc441cb00353d5e05b23347ee53d
MediaWiki:Gadget-twinklebatchdelete.js
8
131
332
331
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklebatchdelete.js: Batch delete module (sysops only)
****************************************
* Mode of invocation: Tab ("D-batch")
* Active on: Existing and non-existing non-articles, and Special:PrefixIndex
* Config directives in: TwinkleConfig
*/
Twinkle.batchdelete = function twinklebatchdelete() {
if( Morebits.userIsInGroup( 'sysop' ) && (mw.config.get( 'wgNamespaceNumber' ) > 0 || mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Prefixindex') ) {
Twinkle.addPortletLink( Twinkle.batchdelete.callback, "D-batch", "tw-batch", "Delete pages found in this category/on this page" );
}
};
Twinkle.batchdelete.unlinkCache = {};
Twinkle.batchdelete.callback = function twinklebatchdeleteCallback() {
var Window = new Morebits.simpleWindow( 800, 400 );
Window.setTitle( "Batch deletion" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#batchdelete" );
var form = new Morebits.quickForm( Twinkle.batchdelete.callback.evaluate );
form.append( {
type: 'checkbox',
list: [
{
label: 'Delete pages',
name: 'delete_page',
value: 'delete',
checked: true
},
{
label: 'Remove backlinks to the page',
name: 'unlink_page',
value: 'unlink',
checked: true
},
{
label: 'Delete redirects to deleted pages',
name: 'delete_redirects',
value: 'delete_redirects',
checked: true
}
]
} );
form.append( {
type: 'textarea',
name: 'reason',
label: 'Reason: '
} );
var query;
if( mw.config.get( 'wgNamespaceNumber' ) === 14 ) { // Category:
query = {
'action': 'query',
'generator': 'categorymembers',
'gcmtitle': mw.config.get( 'wgPageName' ),
'gcmlimit' : Twinkle.getPref('batchMax'), // the max for sysops
'prop': [ 'categories', 'revisions' ],
'rvprop': [ 'size' ]
};
} else if( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Prefixindex' ) {
var gapnamespace, gapprefix;
if(Morebits.queryString.exists( 'from' ) )
{
gapnamespace = Morebits.queryString.get( 'namespace' );
gapprefix = Morebits.string.toUpperCaseFirstChar( Morebits.queryString.get( 'from' ) );
}
else
{
var pathSplit = decodeURIComponent(location.pathname).split('/');
if (pathSplit.length < 3 || pathSplit[2] !== "Special:PrefixIndex") {
return;
}
var titleSplit = pathSplit[3].split(':');
gapnamespace = mw.config.get("wgNamespaceIds")[titleSplit[0].toLowerCase()];
if ( titleSplit.length < 2 || typeof gapnamespace === 'undefined' )
{
gapnamespace = 0; // article namespace
gapprefix = pathSplit.splice(3).join('/');
}
else
{
pathSplit = pathSplit.splice(4);
pathSplit.splice(0,0,titleSplit.splice(1).join(':'));
gapprefix = pathSplit.join('/');
}
}
query = {
'action': 'query',
'generator': 'allpages',
'gapnamespace': gapnamespace ,
'gapprefix': gapprefix,
'gaplimit' : Twinkle.getPref('batchMax'), // the max for sysops
'prop' : ['categories', 'revisions' ],
'rvprop': [ 'size' ]
};
} else {
query = {
'action': 'query',
'generator': 'links',
'titles': mw.config.get( 'wgPageName' ),
'gpllimit' : Twinkle.getPref('batchMax'), // the max for sysops
'prop': [ 'categories', 'revisions' ],
'rvprop': [ 'size' ]
};
}
var statusdiv = document.createElement( 'div' );
statusdiv.style.padding = '15px'; // just so it doesn't look broken
Window.setContent(statusdiv);
Morebits.status.init(statusdiv);
Window.display();
var statelem = new Morebits.status("Grabbing list of pages");
var wikipedia_api = new Morebits.wiki.api( 'loading...', query, function( self ) {
var xmlDoc = self.responseXML;
var snapshot = xmlDoc.evaluate('//page[@ns != "6" and not(@missing)]', xmlDoc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null ); // 6 = File: namespace
var list = [];
for ( var i = 0; i < snapshot.snapshotLength; ++i ) {
var object = snapshot.snapshotItem(i);
var page = xmlDoc.evaluate( '@title', object, null, XPathResult.STRING_TYPE, null ).stringValue;
var size = xmlDoc.evaluate( 'revisions/rev/@size', object, null, XPathResult.NUMBER_TYPE, null ).numberValue;
var disputed = xmlDoc.evaluate( 'boolean(categories/cl[@title="Category:Contested candidates for speedy deletion"])', object, null, XPathResult.BOOLEAN_TYPE, null ).booleanValue;
list.push( {label:page + ' (' + size + ' bytes)' + ( disputed ? ' (DISPUTED CSD)' : '' ), value:page, checked:!disputed });
}
self.params.form.append( {
type: 'checkbox',
name: 'pages',
list: list
} );
self.params.form.append( { type:'submit' } );
var result = self.params.form.render();
self.params.Window.setContent( result );
}, statelem );
wikipedia_api.params = { form:form, Window:Window };
wikipedia_api.post();
};
Twinkle.batchdelete.currentDeleteCounter = 0;
Twinkle.batchdelete.currentUnlinkCounter = 0;
Twinkle.batchdelete.currentdeletor = 0;
Twinkle.batchdelete.callback.evaluate = function twinklebatchdeleteCallbackEvaluate(event) {
Morebits.wiki.actionCompleted.notice = 'Status';
Morebits.wiki.actionCompleted.postfix = 'batch deletion is now complete';
var pages = event.target.getChecked( 'pages' );
var reason = event.target.reason.value;
var delete_page = event.target.delete_page.checked;
var unlink_page = event.target.unlink_page.checked;
var delete_redirects = event.target.delete_redirects.checked;
if( ! reason ) {
return;
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( event.target );
if( !pages ) {
Morebits.status.error( 'Error', 'nothing to delete, aborting' );
return;
}
function toCall( work ) {
if( work.length === 0 && Twinkle.batchdelete.currentDeleteCounter <= 0 && Twinkle.batchdelete.currentUnlinkCounter <= 0 ) {
window.clearInterval( Twinkle.batchdelete.currentdeletor );
Morebits.wiki.removeCheckpoint();
return;
} else if( work.length !== 0 && ( Twinkle.batchdelete.currentDeleteCounter <= Twinkle.getPref('batchDeleteMinCutOff') || Twinkle.batchdelete.currentUnlinkCounter <= Twinkle.getPref('batchDeleteMinCutOff') ) ) {
Twinkle.batchdelete.unlinkCache = []; // Clear the cache
var pages = work.shift();
Twinkle.batchdelete.currentDeleteCounter += pages.length;
Twinkle.batchdelete.currentUnlinkCounter += pages.length;
for( var i = 0; i < pages.length; ++i ) {
var page = pages[i];
var query = {
'action': 'query',
'titles': page
};
var wikipedia_api = new Morebits.wiki.api( 'Checking if page ' + page + ' exists', query, Twinkle.batchdelete.callbacks.main );
wikipedia_api.params = { page:page, reason:reason, unlink_page:unlink_page, delete_page:delete_page, delete_redirects:delete_redirects };
wikipedia_api.post();
}
}
}
var work = Morebits.array.chunk( pages, Twinkle.getPref('batchdeleteChunks') );
Morebits.wiki.addCheckpoint();
Twinkle.batchdelete.currentdeletor = window.setInterval( toCall, 1000, work );
};
Twinkle.batchdelete.callbacks = {
main: function( self ) {
var xmlDoc = self.responseXML;
var normal = xmlDoc.evaluate( '//normalized/n/@to', xmlDoc, null, XPathResult.STRING_TYPE, null ).stringValue;
if( normal ) {
self.params.page = normal;
}
var exists = xmlDoc.evaluate( 'boolean(//pages/page[not(@missing)])', xmlDoc, null, XPathResult.BOOLEAN_TYPE, null ).booleanValue;
if( ! exists ) {
self.statelem.error( "It seems that the page doesn't exist, perhaps it has already been deleted" );
return;
}
var query, wikipedia_api;
if( self.params.unlink_page ) {
query = {
'action': 'query',
'list': 'backlinks',
'blfilterredir': 'nonredirects',
'blnamespace': [0, 100], // main space and portal space only
'bltitle': self.params.page,
'bllimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500 // 500 is max for normal users, 5000 for bots and sysops
};
wikipedia_api = new Morebits.wiki.api( 'Grabbing backlinks', query, Twinkle.batchdelete.callbacks.unlinkBacklinksMain );
wikipedia_api.params = self.params;
wikipedia_api.post();
} else {
--Twinkle.batchdelete.currentUnlinkCounter;
}
if( self.params.delete_page ) {
if (self.params.delete_redirects)
{
query = {
'action': 'query',
'list': 'backlinks',
'blfilterredir': 'redirects',
'bltitle': self.params.page,
'bllimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500 // 500 is max for normal users, 5000 for bots and sysops
};
wikipedia_api = new Morebits.wiki.api( 'Grabbing redirects', query, Twinkle.batchdelete.callbacks.deleteRedirectsMain );
wikipedia_api.params = self.params;
wikipedia_api.post();
}
var wikipedia_page = new Morebits.wiki.page( self.params.page, 'Deleting page ' + self.params.page );
wikipedia_page.setEditSummary(self.params.reason + Twinkle.getPref('deletionSummaryAd'));
wikipedia_page.deletePage(function( apiobj ) {
--Twinkle.batchdelete.currentDeleteCounter;
var link = document.createElement( 'a' );
link.setAttribute( 'href', mw.util.getUrl(self.params.page) );
link.setAttribute( 'title', self.params.page );
link.appendChild( document.createTextNode( self.params.page ) );
apiobj.statelem.info( [ 'completed (' , link , ')' ] );
} );
} else {
--Twinkle.batchdelete.currentDeleteCounter;
}
},
deleteRedirectsMain: function( self ) {
var xmlDoc = self.responseXML;
var snapshot = xmlDoc.evaluate('//backlinks/bl/@title', xmlDoc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null );
var total = snapshot.snapshotLength;
if( snapshot.snapshotLength === 0 ) {
return;
}
var statusIndicator = new Morebits.status('Deleting redirects for ' + self.params.page, '0%');
var onsuccess = function( self ) {
var obj = self.params.obj;
var total = self.params.total;
var now = parseInt( 100 * ++(self.params.current)/total, 10 ) + '%';
obj.update( now );
self.statelem.unlink();
if( self.params.current >= total ) {
obj.info( now + ' (completed)' );
Morebits.wiki.removeCheckpoint();
}
};
Morebits.wiki.addCheckpoint();
if( snapshot.snapshotLength === 0 ) {
statusIndicator.info( '100% (completed)' );
Morebits.wiki.removeCheckpoint();
return;
}
var params = $.extend({}, self.params);
params.current = 0;
params.total = total;
params.obj = statusIndicator;
for ( var i = 0; i < snapshot.snapshotLength; ++i ) {
var title = snapshot.snapshotItem(i).value;
var wikipedia_page = new Morebits.wiki.page( title, "Deleting " + title );
wikipedia_page.setEditSummary('[[WP:CSD#G8|G8]]: Redirect to deleted page "' + self.params.page + '"' + Twinkle.getPref('deletionSummaryAd'));
wikipedia_page.setCallbackParameters(params);
wikipedia_page.deletePage(onsuccess);
}
},
unlinkBacklinksMain: function( self ) {
var xmlDoc = self.responseXML;
var snapshot = xmlDoc.evaluate('//backlinks/bl/@title', xmlDoc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null );
if( snapshot.snapshotLength === 0 ) {
--Twinkle.batchdelete.currentUnlinkCounter;
return;
}
var statusIndicator = new Morebits.status('Unlinking backlinks to ' + self.params.page, '0%');
var total = snapshot.snapshotLength * 2;
var onsuccess = function( self ) {
var obj = self.params.obj;
var total = self.params.total;
var now = parseInt( 100 * ++(self.params.current)/total, 10 ) + '%';
obj.update( now );
self.statelem.unlink();
if( self.params.current >= total ) {
obj.info( now + ' (completed)' );
--Twinkle.batchdelete.currentUnlinkCounter;
Morebits.wiki.removeCheckpoint();
}
};
Morebits.wiki.addCheckpoint();
if( snapshot.snapshotLength === 0 ) {
statusIndicator.info( '100% (completed)' );
--Twinkle.batchdelete.currentUnlinkCounter;
Morebits.wiki.removeCheckpoint();
return;
}
self.params.total = total;
self.params.obj = statusIndicator;
self.params.current = 0;
for ( var i = 0; i < snapshot.snapshotLength; ++i ) {
var title = snapshot.snapshotItem(i).value;
var wikipedia_page = new Morebits.wiki.page( title, "Unlinking on " + title );
var params = $.extend( {}, self.params );
params.title = title;
params.onsuccess = onsuccess;
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.batchdelete.callbacks.unlinkBacklinks);
}
},
unlinkBacklinks: function( pageobj ) {
var params = pageobj.getCallbackParameters();
if( ! pageobj.exists() ) {
// we probably just deleted it, as a recursive backlink
params.onsuccess( { params: params, statelem: pageobj.getStatusElement() } );
Morebits.wiki.actionCompleted();
return;
}
var text;
if( params.title in Twinkle.batchdelete.unlinkCache ) {
text = Twinkle.batchdelete.unlinkCache[ params.title ];
} else {
text = pageobj.getPageText();
}
var old_text = text;
var wikiPage = new Morebits.wikitext.page( text );
wikiPage.removeLink( params.page );
text = wikiPage.getText();
Twinkle.batchdelete.unlinkCache[ params.title ] = text;
if( text === old_text ) {
// Nothing to do, return
params.onsuccess( { params: params, statelem: pageobj.getStatusElement() } );
Morebits.wiki.actionCompleted();
return;
}
pageobj.setEditSummary('Removing link(s) to deleted page ' + self.params.page + Twinkle.getPref('deletionSummaryAd'));
pageobj.setPageText(text);
pageobj.setCreateOption('nocreate');
pageobj.save(params.onsuccess);
}
};
})(jQuery);
//</nowiki>
eca6545f77c1b9891d60d996b4f2016ccc2e0eef
331
2013-11-19T10:15:04Z
Amalthea
0
v2.0-646-g981a645: warn: Add {{Template:uw-inline-el|uw-inline-el}}; batchprotect: Add templateeditor protection level; Migrate from deprecated wikiGetlink to getUrl; arv: AIV reports can end in ? ! ;
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklebatchdelete.js: Batch delete module (sysops only)
****************************************
* Mode of invocation: Tab ("D-batch")
* Active on: Existing and non-existing non-articles, and Special:PrefixIndex
* Config directives in: TwinkleConfig
*/
Twinkle.batchdelete = function twinklebatchdelete() {
if( Morebits.userIsInGroup( 'sysop' ) && (mw.config.get( 'wgNamespaceNumber' ) > 0 || mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Prefixindex') ) {
Twinkle.addPortletLink( Twinkle.batchdelete.callback, "D-batch", "tw-batch", "Delete pages found in this category/on this page" );
}
};
Twinkle.batchdelete.unlinkCache = {};
Twinkle.batchdelete.callback = function twinklebatchdeleteCallback() {
var Window = new Morebits.simpleWindow( 800, 400 );
Window.setTitle( "Batch deletion" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#batchdelete" );
var form = new Morebits.quickForm( Twinkle.batchdelete.callback.evaluate );
form.append( {
type: 'checkbox',
list: [
{
label: 'Delete pages',
name: 'delete_page',
value: 'delete',
checked: true
},
{
label: 'Remove backlinks to the page',
name: 'unlink_page',
value: 'unlink',
checked: true
},
{
label: 'Delete redirects to deleted pages',
name: 'delete_redirects',
value: 'delete_redirects',
checked: true
}
]
} );
form.append( {
type: 'textarea',
name: 'reason',
label: 'Reason: '
} );
var query;
if( mw.config.get( 'wgNamespaceNumber' ) === 14 ) { // Category:
query = {
'action': 'query',
'generator': 'categorymembers',
'gcmtitle': mw.config.get( 'wgPageName' ),
'gcmlimit' : Twinkle.getPref('batchMax'), // the max for sysops
'prop': [ 'categories', 'revisions' ],
'rvprop': [ 'size' ]
};
} else if( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Prefixindex' ) {
var gapnamespace, gapprefix;
if(Morebits.queryString.exists( 'from' ) )
{
gapnamespace = Morebits.queryString.get( 'namespace' );
gapprefix = Morebits.string.toUpperCaseFirstChar( Morebits.queryString.get( 'from' ) );
}
else
{
var pathSplit = decodeURIComponent(location.pathname).split('/');
if (pathSplit.length < 3 || pathSplit[2] !== "Special:PrefixIndex") {
return;
}
var titleSplit = pathSplit[3].split(':');
gapnamespace = mw.config.get("wgNamespaceIds")[titleSplit[0].toLowerCase()];
if ( titleSplit.length < 2 || typeof gapnamespace === 'undefined' )
{
gapnamespace = 0; // article namespace
gapprefix = pathSplit.splice(3).join('/');
}
else
{
pathSplit = pathSplit.splice(4);
pathSplit.splice(0,0,titleSplit.splice(1).join(':'));
gapprefix = pathSplit.join('/');
}
}
query = {
'action': 'query',
'generator': 'allpages',
'gapnamespace': gapnamespace ,
'gapprefix': gapprefix,
'gaplimit' : Twinkle.getPref('batchMax'), // the max for sysops
'prop' : ['categories', 'revisions' ],
'rvprop': [ 'size' ]
};
} else {
query = {
'action': 'query',
'generator': 'links',
'titles': mw.config.get( 'wgPageName' ),
'gpllimit' : Twinkle.getPref('batchMax'), // the max for sysops
'prop': [ 'categories', 'revisions' ],
'rvprop': [ 'size' ]
};
}
var statusdiv = document.createElement( 'div' );
statusdiv.style.padding = '15px'; // just so it doesn't look broken
Window.setContent(statusdiv);
Morebits.status.init(statusdiv);
Window.display();
var statelem = new Morebits.status("Grabbing list of pages");
var wikipedia_api = new Morebits.wiki.api( 'loading...', query, function( self ) {
var xmlDoc = self.responseXML;
var snapshot = xmlDoc.evaluate('//page[@ns != "6" and not(@missing)]', xmlDoc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null ); // 6 = File: namespace
var list = [];
for ( var i = 0; i < snapshot.snapshotLength; ++i ) {
var object = snapshot.snapshotItem(i);
var page = xmlDoc.evaluate( '@title', object, null, XPathResult.STRING_TYPE, null ).stringValue;
var size = xmlDoc.evaluate( 'revisions/rev/@size', object, null, XPathResult.NUMBER_TYPE, null ).numberValue;
var disputed = xmlDoc.evaluate( 'boolean(categories/cl[@title="Category:Contested candidates for speedy deletion"])', object, null, XPathResult.BOOLEAN_TYPE, null ).booleanValue;
list.push( {label:page + ' (' + size + ' bytes)' + ( disputed ? ' (DISPUTED CSD)' : '' ), value:page, checked:!disputed });
}
self.params.form.append( {
type: 'checkbox',
name: 'pages',
list: list
} );
self.params.form.append( { type:'submit' } );
var result = self.params.form.render();
self.params.Window.setContent( result );
}, statelem );
wikipedia_api.params = { form:form, Window:Window };
wikipedia_api.post();
};
Twinkle.batchdelete.currentDeleteCounter = 0;
Twinkle.batchdelete.currentUnlinkCounter = 0;
Twinkle.batchdelete.currentdeletor = 0;
Twinkle.batchdelete.callback.evaluate = function twinklebatchdeleteCallbackEvaluate(event) {
Morebits.wiki.actionCompleted.notice = 'Status';
Morebits.wiki.actionCompleted.postfix = 'batch deletion is now complete';
var pages = event.target.getChecked( 'pages' );
var reason = event.target.reason.value;
var delete_page = event.target.delete_page.checked;
var unlink_page = event.target.unlink_page.checked;
var delete_redirects = event.target.delete_redirects.checked;
if( ! reason ) {
return;
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( event.target );
if( !pages ) {
Morebits.status.error( 'Error', 'nothing to delete, aborting' );
return;
}
function toCall( work ) {
if( work.length === 0 && Twinkle.batchdelete.currentDeleteCounter <= 0 && Twinkle.batchdelete.currentUnlinkCounter <= 0 ) {
window.clearInterval( Twinkle.batchdelete.currentdeletor );
Morebits.wiki.removeCheckpoint();
return;
} else if( work.length !== 0 && ( Twinkle.batchdelete.currentDeleteCounter <= Twinkle.getPref('batchDeleteMinCutOff') || Twinkle.batchdelete.currentUnlinkCounter <= Twinkle.getPref('batchDeleteMinCutOff') ) ) {
Twinkle.batchdelete.unlinkCache = []; // Clear the cache
var pages = work.shift();
Twinkle.batchdelete.currentDeleteCounter += pages.length;
Twinkle.batchdelete.currentUnlinkCounter += pages.length;
for( var i = 0; i < pages.length; ++i ) {
var page = pages[i];
var query = {
'action': 'query',
'titles': page
};
var wikipedia_api = new Morebits.wiki.api( 'Checking if page ' + page + ' exists', query, Twinkle.batchdelete.callbacks.main );
wikipedia_api.params = { page:page, reason:reason, unlink_page:unlink_page, delete_page:delete_page, delete_redirects:delete_redirects };
wikipedia_api.post();
}
}
}
var work = Morebits.array.chunk( pages, Twinkle.getPref('batchdeleteChunks') );
Morebits.wiki.addCheckpoint();
Twinkle.batchdelete.currentdeletor = window.setInterval( toCall, 1000, work );
};
Twinkle.batchdelete.callbacks = {
main: function( self ) {
var xmlDoc = self.responseXML;
var normal = xmlDoc.evaluate( '//normalized/n/@to', xmlDoc, null, XPathResult.STRING_TYPE, null ).stringValue;
if( normal ) {
self.params.page = normal;
}
var exists = xmlDoc.evaluate( 'boolean(//pages/page[not(@missing)])', xmlDoc, null, XPathResult.BOOLEAN_TYPE, null ).booleanValue;
if( ! exists ) {
self.statelem.error( "It seems that the page doesn't exist, perhaps it has already been deleted" );
return;
}
var query, wikipedia_api;
if( self.params.unlink_page ) {
query = {
'action': 'query',
'list': 'backlinks',
'blfilterredir': 'nonredirects',
'blnamespace': [0, 100], // main space and portal space only
'bltitle': self.params.page,
'bllimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500 // 500 is max for normal users, 5000 for bots and sysops
};
wikipedia_api = new Morebits.wiki.api( 'Grabbing backlinks', query, Twinkle.batchdelete.callbacks.unlinkBacklinksMain );
wikipedia_api.params = self.params;
wikipedia_api.post();
} else {
--Twinkle.batchdelete.currentUnlinkCounter;
}
if( self.params.delete_page ) {
if (self.params.delete_redirects)
{
query = {
'action': 'query',
'list': 'backlinks',
'blfilterredir': 'redirects',
'bltitle': self.params.page,
'bllimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500 // 500 is max for normal users, 5000 for bots and sysops
};
wikipedia_api = new Morebits.wiki.api( 'Grabbing redirects', query, Twinkle.batchdelete.callbacks.deleteRedirectsMain );
wikipedia_api.params = self.params;
wikipedia_api.post();
}
var wikipedia_page = new Morebits.wiki.page( self.params.page, 'Deleting page ' + self.params.page );
wikipedia_page.setEditSummary(self.params.reason + Twinkle.getPref('deletionSummaryAd'));
wikipedia_page.deletePage(function( apiobj ) {
--Twinkle.batchdelete.currentDeleteCounter;
var link = document.createElement( 'a' );
link.setAttribute( 'href', mw.util.getUrl(self.params.page) );
link.setAttribute( 'title', self.params.page );
link.appendChild( document.createTextNode( self.params.page ) );
apiobj.statelem.info( [ 'completed (' , link , ')' ] );
} );
} else {
--Twinkle.batchdelete.currentDeleteCounter;
}
},
deleteRedirectsMain: function( self ) {
var xmlDoc = self.responseXML;
var snapshot = xmlDoc.evaluate('//backlinks/bl/@title', xmlDoc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null );
var total = snapshot.snapshotLength;
if( snapshot.snapshotLength === 0 ) {
return;
}
var statusIndicator = new Morebits.status('Deleting redirects for ' + self.params.page, '0%');
var onsuccess = function( self ) {
var obj = self.params.obj;
var total = self.params.total;
var now = parseInt( 100 * ++(self.params.current)/total, 10 ) + '%';
obj.update( now );
self.statelem.unlink();
if( self.params.current >= total ) {
obj.info( now + ' (completed)' );
Morebits.wiki.removeCheckpoint();
}
};
Morebits.wiki.addCheckpoint();
if( snapshot.snapshotLength === 0 ) {
statusIndicator.info( '100% (completed)' );
Morebits.wiki.removeCheckpoint();
return;
}
var params = $.extend({}, self.params);
params.current = 0;
params.total = total;
params.obj = statusIndicator;
for ( var i = 0; i < snapshot.snapshotLength; ++i ) {
var title = snapshot.snapshotItem(i).value;
var wikipedia_page = new Morebits.wiki.page( title, "Deleting " + title );
wikipedia_page.setEditSummary('[[WP:CSD#G8|G8]]: Redirect to deleted page "' + self.params.page + '"' + Twinkle.getPref('deletionSummaryAd'));
wikipedia_page.setCallbackParameters(params);
wikipedia_page.deletePage(onsuccess);
}
},
unlinkBacklinksMain: function( self ) {
var xmlDoc = self.responseXML;
var snapshot = xmlDoc.evaluate('//backlinks/bl/@title', xmlDoc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null );
if( snapshot.snapshotLength === 0 ) {
--Twinkle.batchdelete.currentUnlinkCounter;
return;
}
var statusIndicator = new Morebits.status('Unlinking backlinks to ' + self.params.page, '0%');
var total = snapshot.snapshotLength * 2;
var onsuccess = function( self ) {
var obj = self.params.obj;
var total = self.params.total;
var now = parseInt( 100 * ++(self.params.current)/total, 10 ) + '%';
obj.update( now );
self.statelem.unlink();
if( self.params.current >= total ) {
obj.info( now + ' (completed)' );
--Twinkle.batchdelete.currentUnlinkCounter;
Morebits.wiki.removeCheckpoint();
}
};
Morebits.wiki.addCheckpoint();
if( snapshot.snapshotLength === 0 ) {
statusIndicator.info( '100% (completed)' );
--Twinkle.batchdelete.currentUnlinkCounter;
Morebits.wiki.removeCheckpoint();
return;
}
self.params.total = total;
self.params.obj = statusIndicator;
self.params.current = 0;
for ( var i = 0; i < snapshot.snapshotLength; ++i ) {
var title = snapshot.snapshotItem(i).value;
var wikipedia_page = new Morebits.wiki.page( title, "Unlinking on " + title );
var params = $.extend( {}, self.params );
params.title = title;
params.onsuccess = onsuccess;
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.batchdelete.callbacks.unlinkBacklinks);
}
},
unlinkBacklinks: function( pageobj ) {
var params = pageobj.getCallbackParameters();
if( ! pageobj.exists() ) {
// we probably just deleted it, as a recursive backlink
params.onsuccess( { params: params, statelem: pageobj.getStatusElement() } );
Morebits.wiki.actionCompleted();
return;
}
var text;
if( params.title in Twinkle.batchdelete.unlinkCache ) {
text = Twinkle.batchdelete.unlinkCache[ params.title ];
} else {
text = pageobj.getPageText();
}
var old_text = text;
var wikiPage = new Morebits.wikitext.page( text );
wikiPage.removeLink( params.page );
text = wikiPage.getText();
Twinkle.batchdelete.unlinkCache[ params.title ] = text;
if( text === old_text ) {
// Nothing to do, return
params.onsuccess( { params: params, statelem: pageobj.getStatusElement() } );
Morebits.wiki.actionCompleted();
return;
}
pageobj.setEditSummary('Removing link(s) to deleted page ' + self.params.page + Twinkle.getPref('deletionSummaryAd'));
pageobj.setPageText(text);
pageobj.setCreateOption('nocreate');
pageobj.save(params.onsuccess);
}
};
})(jQuery);
//</nowiki>
eca6545f77c1b9891d60d996b4f2016ccc2e0eef
MediaWiki:Gadget-twinklebatchprotect.js
8
132
334
333
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklebatchprotect.js: Batch protect module (sysops only)
****************************************
* Mode of invocation: Tab ("P-batch")
* Active on: Existing project pages and user pages; existing and
* non-existing categories; Special:PrefixIndex
* Config directives in: TwinkleConfig
*/
Twinkle.batchprotect = function twinklebatchprotect() {
if( Morebits.userIsInGroup( 'sysop' ) && ((mw.config.get( 'wgArticleId' ) > 0 && (mw.config.get( 'wgNamespaceNumber' ) === 2 ||
mw.config.get( 'wgNamespaceNumber' ) === 4)) || mw.config.get( 'wgNamespaceNumber' ) === 14 ||
mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Prefixindex') ) {
Twinkle.addPortletLink( Twinkle.batchprotect.callback, "P-batch", "tw-pbatch", "Protect pages linked from this page" );
}
};
Twinkle.batchprotect.unlinkCache = {};
Twinkle.batchprotect.callback = function twinklebatchprotectCallback() {
var Window = new Morebits.simpleWindow( 800, 400 );
Window.setTitle( "Batch protection" );
Window.setScriptName( "Twinkle" );
//Window.addFooterLink( "Protection templates", "Template:Protection templates" );
Window.addFooterLink( "Protection policy", "WP:PROT" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#protect" );
var form = new Morebits.quickForm( Twinkle.batchprotect.callback.evaluate );
form.append({
type: 'checkbox',
name: 'editmodify',
event: Twinkle.protect.formevents.editmodify,
list: [
{
label: 'Modify edit protection',
value: 'editmodify',
tooltip: 'Only for existing pages.',
checked: true
}
]
});
var editlevel = form.append({
type: 'select',
name: 'editlevel',
label: 'Edit protection:',
event: Twinkle.protect.formevents.editlevel
});
editlevel.append({
type: 'option',
label: 'All',
value: 'all'
});
editlevel.append({
type: 'option',
label: 'Autoconfirmed',
value: 'autoconfirmed'
});
editlevel.append({
type: 'option',
label: 'Template editor',
value: 'templateeditor'
});
editlevel.append({
type: 'option',
label: 'Sysop',
value: 'sysop',
selected: true
});
form.append({
type: 'select',
name: 'editexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', selected: true, value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', value:'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
form.append({
type: 'checkbox',
name: 'movemodify',
event: Twinkle.protect.formevents.movemodify,
list: [
{
label: 'Modify move protection',
value: 'movemodify',
tooltip: 'Only for existing pages.',
checked: true
}
]
});
var movelevel = form.append({
type: 'select',
name: 'movelevel',
label: 'Move protection:',
event: Twinkle.protect.formevents.movelevel
});
movelevel.append({
type: 'option',
label: 'All',
value: 'all'
});
movelevel.append({
type: 'option',
label: 'Autoconfirmed',
value: 'autoconfirmed'
});
movelevel.append({
type: 'option',
label: 'Template editor',
value: 'templateeditor'
});
movelevel.append({
type: 'option',
label: 'Sysop',
value: 'sysop',
selected: true
});
form.append({
type: 'select',
name: 'moveexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', selected: true, value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', value:'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
form.append({
type: 'checkbox',
name: 'createmodify',
event: function twinklebatchprotectFormCreatemodifyEvent(e) {
e.target.form.createlevel.disabled = !e.target.checked;
e.target.form.createexpiry.disabled = !e.target.checked || (e.target.form.createlevel.value === 'all');
e.target.form.createlevel.style.color = e.target.form.createexpiry.style.color = (e.target.checked ? "" : "transparent");
},
list: [
{
label: 'Modify create protection',
value: 'createmodify',
tooltip: 'Only for pages that do not exist.',
checked: true
}
]
});
var createlevel = form.append({
type: 'select',
name: 'createlevel',
label: 'Create protection:',
event: Twinkle.protect.formevents.createlevel
});
createlevel.append({
type: 'option',
label: 'All',
value: 'all'
});
createlevel.append({
type: 'option',
label: 'Autoconfirmed',
value: 'autoconfirmed'
});
createlevel.append({
type: 'option',
label: 'Template editor',
value: 'templateeditor'
});
createlevel.append({
type: 'option',
label: 'Sysop',
value: 'sysop',
selected: true
});
form.append({
type: 'select',
name: 'createexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', selected: true, value: 'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
form.append( {
type: 'textarea',
name: 'reason',
label: 'Reason (for protection log): '
} );
var query;
if( mw.config.get( 'wgNamespaceNumber' ) === 14 ) { // categories
query = {
'action': 'query',
'generator': 'categorymembers',
'gcmtitle': mw.config.get( 'wgPageName' ),
'gcmlimit' : Twinkle.getPref('batchMax'), // the max for sysops
'prop': 'revisions',
'rvprop': 'size'
};
} else if( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Prefixindex' ) {
query = {
'action': 'query',
'generator': 'allpages',
'gapnamespace': Morebits.queryString.exists('namespace') ? Morebits.queryString.get( 'namespace' ) : document.getElementById('namespace').value,
'gapprefix': Morebits.queryString.exists('from') ? Morebits.string.toUpperCaseFirstChar(Morebits.queryString.get( 'from' ).replace('+', ' ')) :
Morebits.string.toUpperCaseFirstChar(document.getElementById('nsfrom').value),
'gaplimit' : Twinkle.getPref('batchMax'), // the max for sysops
'prop': 'revisions',
'rvprop': 'size'
};
} else {
query = {
'action': 'query',
'gpllimit' : Twinkle.getPref('batchMax'), // the max for sysops
'generator': 'links',
'titles': mw.config.get( 'wgPageName' ),
'prop': 'revisions',
'rvprop': 'size'
};
}
var statusdiv = document.createElement("div");
statusdiv.style.padding = '15px'; // just so it doesn't look broken
Window.setContent(statusdiv);
Morebits.status.init(statusdiv);
Window.display();
var statelem = new Morebits.status("Grabbing list of pages");
var wikipedia_api = new Morebits.wiki.api( 'loading...', query, function(apiobj) {
var xml = apiobj.responseXML;
var $pages = $(xml).find('page');
var list = [];
$pages.each(function(index, page) {
var $page = $(page);
var title = $page.attr('title');
var isRedir = $page.attr('redirect') === ""; // XXX ??
var missing = $page.attr('missing') === ""; // XXX ??
var size = $page.find('rev').attr('size');
var metadata = [];
if (missing) {
metadata.push("page does not exist");
} else {
if (isRedir) {
metadata.push("redirect");
}
metadata.push(size + " bytes");
}
list.push( { label: title + (metadata.length ? (' (' + metadata.join('; ') + ')') : '' ), value: title, checked: true });
});
form.append({ type: 'header', label: 'Pages to protect' });
form.append( {
type: 'checkbox',
name: 'pages',
list: list
} );
form.append( { type:'submit' } );
var result = form.render();
Window.setContent( result );
}, statelem );
wikipedia_api.post();
};
Twinkle.batchprotect.currentProtectCounter = 0;
Twinkle.batchprotect.currentprotector = 0;
Twinkle.batchprotect.callback.evaluate = function twinklebatchprotectCallbackEvaluate(event) {
var pages = event.target.getChecked( 'pages' );
var reason = event.target.reason.value;
var editmodify = event.target.editmodify.checked;
var editlevel = event.target.editlevel.value;
var editexpiry = event.target.editexpiry.value;
var movemodify = event.target.movemodify.checked;
var movelevel = event.target.movelevel.value;
var moveexpiry = event.target.moveexpiry.value;
var createmodify = event.target.createmodify.checked;
var createlevel = event.target.createlevel.value;
var createexpiry = event.target.createexpiry.value;
if( ! reason ) {
alert("You've got to give a reason, you rouge admin!");
return;
}
Morebits.simpleWindow.setButtonsEnabled(false);
Morebits.status.init( event.target );
if( !pages ) {
Morebits.status.error( 'Error', 'Nothing to protect, aborting' );
return;
}
var toCall = function twinklebatchprotectToCall( work ) {
if( work.length === 0 && Twinkle.batchprotect.currentProtectCounter <= 0 ) {
Morebits.status.info( 'work done' );
window.clearInterval( Twinkle.batchprotect.currentprotector );
Twinkle.batchprotect.currentprotector = Twinkle.batchprotect.currentProtectCounter = 0;
Morebits.wiki.removeCheckpoint();
return;
} else if( work.length !== 0 && Twinkle.batchprotect.currentProtectCounter <= Twinkle.getPref('batchProtectMinCutOff') ) {
var pages = work.shift();
Twinkle.batchprotect.currentProtectCounter += pages.length;
for( var i = 0; i < pages.length; ++i ) {
var page = pages[i];
var query = {
'action': 'query',
'titles': page
};
var wikipedia_api = new Morebits.wiki.api( 'Checking if page ' + page + ' exists', query, Twinkle.batchprotect.callbacks.main );
wikipedia_api.params = {
page: page,
reason: reason,
editmodify: editmodify,
editlevel: editlevel,
editexpiry: editexpiry,
movemodify: movemodify,
movelevel: movelevel,
moveexpiry: moveexpiry,
createmodify: createmodify,
createlevel: createlevel,
createexpiry: createexpiry
};
wikipedia_api.post();
}
}
};
var work = Morebits.array.chunk( pages, Twinkle.getPref('batchProtectChunks') );
Morebits.wiki.addCheckpoint();
Twinkle.batchprotect.currentprotector = window.setInterval( toCall, 1000, work );
};
Twinkle.batchprotect.callbacks = {
main: function( apiobj ) {
var xml = apiobj.responseXML;
var normal = $(xml).find('normalized n').attr('to');
if( normal ) {
apiobj.params.page = normal;
}
var exists = ($(xml).find('page').attr('missing') !== "");
var page = new Morebits.wiki.page(apiobj.params.page, "Protecting " + apiobj.params.page);
var takenAction = false;
if (exists && apiobj.params.editmodify) {
page.setEditProtection(apiobj.params.editlevel, apiobj.params.editexpiry);
takenAction = true;
}
if (exists && apiobj.params.movemodify) {
page.setMoveProtection(apiobj.params.movelevel, apiobj.params.moveexpiry);
takenAction = true;
}
if (!exists && apiobj.params.createmodify) {
page.setCreateProtection(apiobj.params.createlevel, apiobj.params.createexpiry);
takenAction = true;
}
if (!takenAction) {
Morebits.status.warn("Protecting " + apiobj.params.page, "page " + (exists ? "exists" : "does not exist") + "; nothing to do, skipping");
return;
}
page.setEditSummary(apiobj.params.reason);
page.protect(function(pageobj) {
--Twinkle.batchprotect.currentProtectCounter;
var link = document.createElement( 'a' );
link.setAttribute( 'href', mw.util.getUrl( apiobj.params.page ) );
link.appendChild( document.createTextNode( apiobj.params.page ) );
pageobj.getStatusElement().info( [ 'completed (' , link , ')' ] );
} );
}
};
})(jQuery);
//</nowiki>
07dfc1cae460aae605e4a2057a64bb800454d40a
333
2013-11-19T10:15:06Z
Amalthea
0
v2.0-646-g981a645: warn: Add {{Template:uw-inline-el|uw-inline-el}}; batchprotect: Add templateeditor protection level; Migrate from deprecated wikiGetlink to getUrl; arv: AIV reports can end in ? ! ;
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklebatchprotect.js: Batch protect module (sysops only)
****************************************
* Mode of invocation: Tab ("P-batch")
* Active on: Existing project pages and user pages; existing and
* non-existing categories; Special:PrefixIndex
* Config directives in: TwinkleConfig
*/
Twinkle.batchprotect = function twinklebatchprotect() {
if( Morebits.userIsInGroup( 'sysop' ) && ((mw.config.get( 'wgArticleId' ) > 0 && (mw.config.get( 'wgNamespaceNumber' ) === 2 ||
mw.config.get( 'wgNamespaceNumber' ) === 4)) || mw.config.get( 'wgNamespaceNumber' ) === 14 ||
mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Prefixindex') ) {
Twinkle.addPortletLink( Twinkle.batchprotect.callback, "P-batch", "tw-pbatch", "Protect pages linked from this page" );
}
};
Twinkle.batchprotect.unlinkCache = {};
Twinkle.batchprotect.callback = function twinklebatchprotectCallback() {
var Window = new Morebits.simpleWindow( 800, 400 );
Window.setTitle( "Batch protection" );
Window.setScriptName( "Twinkle" );
//Window.addFooterLink( "Protection templates", "Template:Protection templates" );
Window.addFooterLink( "Protection policy", "WP:PROT" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#protect" );
var form = new Morebits.quickForm( Twinkle.batchprotect.callback.evaluate );
form.append({
type: 'checkbox',
name: 'editmodify',
event: Twinkle.protect.formevents.editmodify,
list: [
{
label: 'Modify edit protection',
value: 'editmodify',
tooltip: 'Only for existing pages.',
checked: true
}
]
});
var editlevel = form.append({
type: 'select',
name: 'editlevel',
label: 'Edit protection:',
event: Twinkle.protect.formevents.editlevel
});
editlevel.append({
type: 'option',
label: 'All',
value: 'all'
});
editlevel.append({
type: 'option',
label: 'Autoconfirmed',
value: 'autoconfirmed'
});
editlevel.append({
type: 'option',
label: 'Template editor',
value: 'templateeditor'
});
editlevel.append({
type: 'option',
label: 'Sysop',
value: 'sysop',
selected: true
});
form.append({
type: 'select',
name: 'editexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', selected: true, value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', value:'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
form.append({
type: 'checkbox',
name: 'movemodify',
event: Twinkle.protect.formevents.movemodify,
list: [
{
label: 'Modify move protection',
value: 'movemodify',
tooltip: 'Only for existing pages.',
checked: true
}
]
});
var movelevel = form.append({
type: 'select',
name: 'movelevel',
label: 'Move protection:',
event: Twinkle.protect.formevents.movelevel
});
movelevel.append({
type: 'option',
label: 'All',
value: 'all'
});
movelevel.append({
type: 'option',
label: 'Autoconfirmed',
value: 'autoconfirmed'
});
movelevel.append({
type: 'option',
label: 'Template editor',
value: 'templateeditor'
});
movelevel.append({
type: 'option',
label: 'Sysop',
value: 'sysop',
selected: true
});
form.append({
type: 'select',
name: 'moveexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', selected: true, value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', value:'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
form.append({
type: 'checkbox',
name: 'createmodify',
event: function twinklebatchprotectFormCreatemodifyEvent(e) {
e.target.form.createlevel.disabled = !e.target.checked;
e.target.form.createexpiry.disabled = !e.target.checked || (e.target.form.createlevel.value === 'all');
e.target.form.createlevel.style.color = e.target.form.createexpiry.style.color = (e.target.checked ? "" : "transparent");
},
list: [
{
label: 'Modify create protection',
value: 'createmodify',
tooltip: 'Only for pages that do not exist.',
checked: true
}
]
});
var createlevel = form.append({
type: 'select',
name: 'createlevel',
label: 'Create protection:',
event: Twinkle.protect.formevents.createlevel
});
createlevel.append({
type: 'option',
label: 'All',
value: 'all'
});
createlevel.append({
type: 'option',
label: 'Autoconfirmed',
value: 'autoconfirmed'
});
createlevel.append({
type: 'option',
label: 'Template editor',
value: 'templateeditor'
});
createlevel.append({
type: 'option',
label: 'Sysop',
value: 'sysop',
selected: true
});
form.append({
type: 'select',
name: 'createexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', selected: true, value: 'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
form.append( {
type: 'textarea',
name: 'reason',
label: 'Reason (for protection log): '
} );
var query;
if( mw.config.get( 'wgNamespaceNumber' ) === 14 ) { // categories
query = {
'action': 'query',
'generator': 'categorymembers',
'gcmtitle': mw.config.get( 'wgPageName' ),
'gcmlimit' : Twinkle.getPref('batchMax'), // the max for sysops
'prop': 'revisions',
'rvprop': 'size'
};
} else if( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Prefixindex' ) {
query = {
'action': 'query',
'generator': 'allpages',
'gapnamespace': Morebits.queryString.exists('namespace') ? Morebits.queryString.get( 'namespace' ) : document.getElementById('namespace').value,
'gapprefix': Morebits.queryString.exists('from') ? Morebits.string.toUpperCaseFirstChar(Morebits.queryString.get( 'from' ).replace('+', ' ')) :
Morebits.string.toUpperCaseFirstChar(document.getElementById('nsfrom').value),
'gaplimit' : Twinkle.getPref('batchMax'), // the max for sysops
'prop': 'revisions',
'rvprop': 'size'
};
} else {
query = {
'action': 'query',
'gpllimit' : Twinkle.getPref('batchMax'), // the max for sysops
'generator': 'links',
'titles': mw.config.get( 'wgPageName' ),
'prop': 'revisions',
'rvprop': 'size'
};
}
var statusdiv = document.createElement("div");
statusdiv.style.padding = '15px'; // just so it doesn't look broken
Window.setContent(statusdiv);
Morebits.status.init(statusdiv);
Window.display();
var statelem = new Morebits.status("Grabbing list of pages");
var wikipedia_api = new Morebits.wiki.api( 'loading...', query, function(apiobj) {
var xml = apiobj.responseXML;
var $pages = $(xml).find('page');
var list = [];
$pages.each(function(index, page) {
var $page = $(page);
var title = $page.attr('title');
var isRedir = $page.attr('redirect') === ""; // XXX ??
var missing = $page.attr('missing') === ""; // XXX ??
var size = $page.find('rev').attr('size');
var metadata = [];
if (missing) {
metadata.push("page does not exist");
} else {
if (isRedir) {
metadata.push("redirect");
}
metadata.push(size + " bytes");
}
list.push( { label: title + (metadata.length ? (' (' + metadata.join('; ') + ')') : '' ), value: title, checked: true });
});
form.append({ type: 'header', label: 'Pages to protect' });
form.append( {
type: 'checkbox',
name: 'pages',
list: list
} );
form.append( { type:'submit' } );
var result = form.render();
Window.setContent( result );
}, statelem );
wikipedia_api.post();
};
Twinkle.batchprotect.currentProtectCounter = 0;
Twinkle.batchprotect.currentprotector = 0;
Twinkle.batchprotect.callback.evaluate = function twinklebatchprotectCallbackEvaluate(event) {
var pages = event.target.getChecked( 'pages' );
var reason = event.target.reason.value;
var editmodify = event.target.editmodify.checked;
var editlevel = event.target.editlevel.value;
var editexpiry = event.target.editexpiry.value;
var movemodify = event.target.movemodify.checked;
var movelevel = event.target.movelevel.value;
var moveexpiry = event.target.moveexpiry.value;
var createmodify = event.target.createmodify.checked;
var createlevel = event.target.createlevel.value;
var createexpiry = event.target.createexpiry.value;
if( ! reason ) {
alert("You've got to give a reason, you rouge admin!");
return;
}
Morebits.simpleWindow.setButtonsEnabled(false);
Morebits.status.init( event.target );
if( !pages ) {
Morebits.status.error( 'Error', 'Nothing to protect, aborting' );
return;
}
var toCall = function twinklebatchprotectToCall( work ) {
if( work.length === 0 && Twinkle.batchprotect.currentProtectCounter <= 0 ) {
Morebits.status.info( 'work done' );
window.clearInterval( Twinkle.batchprotect.currentprotector );
Twinkle.batchprotect.currentprotector = Twinkle.batchprotect.currentProtectCounter = 0;
Morebits.wiki.removeCheckpoint();
return;
} else if( work.length !== 0 && Twinkle.batchprotect.currentProtectCounter <= Twinkle.getPref('batchProtectMinCutOff') ) {
var pages = work.shift();
Twinkle.batchprotect.currentProtectCounter += pages.length;
for( var i = 0; i < pages.length; ++i ) {
var page = pages[i];
var query = {
'action': 'query',
'titles': page
};
var wikipedia_api = new Morebits.wiki.api( 'Checking if page ' + page + ' exists', query, Twinkle.batchprotect.callbacks.main );
wikipedia_api.params = {
page: page,
reason: reason,
editmodify: editmodify,
editlevel: editlevel,
editexpiry: editexpiry,
movemodify: movemodify,
movelevel: movelevel,
moveexpiry: moveexpiry,
createmodify: createmodify,
createlevel: createlevel,
createexpiry: createexpiry
};
wikipedia_api.post();
}
}
};
var work = Morebits.array.chunk( pages, Twinkle.getPref('batchProtectChunks') );
Morebits.wiki.addCheckpoint();
Twinkle.batchprotect.currentprotector = window.setInterval( toCall, 1000, work );
};
Twinkle.batchprotect.callbacks = {
main: function( apiobj ) {
var xml = apiobj.responseXML;
var normal = $(xml).find('normalized n').attr('to');
if( normal ) {
apiobj.params.page = normal;
}
var exists = ($(xml).find('page').attr('missing') !== "");
var page = new Morebits.wiki.page(apiobj.params.page, "Protecting " + apiobj.params.page);
var takenAction = false;
if (exists && apiobj.params.editmodify) {
page.setEditProtection(apiobj.params.editlevel, apiobj.params.editexpiry);
takenAction = true;
}
if (exists && apiobj.params.movemodify) {
page.setMoveProtection(apiobj.params.movelevel, apiobj.params.moveexpiry);
takenAction = true;
}
if (!exists && apiobj.params.createmodify) {
page.setCreateProtection(apiobj.params.createlevel, apiobj.params.createexpiry);
takenAction = true;
}
if (!takenAction) {
Morebits.status.warn("Protecting " + apiobj.params.page, "page " + (exists ? "exists" : "does not exist") + "; nothing to do, skipping");
return;
}
page.setEditSummary(apiobj.params.reason);
page.protect(function(pageobj) {
--Twinkle.batchprotect.currentProtectCounter;
var link = document.createElement( 'a' );
link.setAttribute( 'href', mw.util.getUrl( apiobj.params.page ) );
link.appendChild( document.createTextNode( apiobj.params.page ) );
pageobj.getStatusElement().info( [ 'completed (' , link , ')' ] );
} );
}
};
})(jQuery);
//</nowiki>
07dfc1cae460aae605e4a2057a64bb800454d40a
MediaWiki:Gadget-twinklebatchundelete.js
8
120
310
309
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklebatchundelete.js: Batch undelete module
****************************************
* Mode of invocation: Tab ("Und-batch")
* Active on: Existing user pages
* Config directives in: TwinkleConfig
*/
Twinkle.batchundelete = function twinklebatchundelete() {
if( mw.config.get("wgNamespaceNumber") !== mw.config.get("wgNamespaceIds").user ||
!mw.config.get("wgArticleId") ) {
return;
}
if( Morebits.userIsInGroup( 'sysop' ) ) {
Twinkle.addPortletLink( Twinkle.batchundelete.callback, "Und-batch", "tw-batch-undel", "Undelete 'em all" );
}
};
Twinkle.batchundelete.callback = function twinklebatchundeleteCallback() {
var Window = new Morebits.simpleWindow( 800, 400 );
Window.setScriptName("Twinkle");
Window.setTitle("Batch undelete");
var form = new Morebits.quickForm( Twinkle.batchundelete.callback.evaluate );
form.append( {
type: 'textarea',
name: 'reason',
label: 'Reason: '
} );
var query = {
'action': 'query',
'generator': 'links',
'titles': mw.config.get("wgPageName"),
'gpllimit' : Twinkle.getPref('batchMax') // the max for sysops
};
var wikipedia_api = new Morebits.wiki.api( 'Grabbing pages', query, function( self ) {
var xmlDoc = self.responseXML;
var snapshot = xmlDoc.evaluate('//page[@missing]', xmlDoc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null );
var list = [];
for ( var i = 0; i < snapshot.snapshotLength; ++i ) {
var object = snapshot.snapshotItem(i);
var page = xmlDoc.evaluate( '@title', object, null, XPathResult.STRING_TYPE, null ).stringValue;
list.push( {label:page, value:page, checked: true });
}
self.params.form.append( {
type: 'checkbox',
name: 'pages',
list: list
}
);
self.params.form.append( { type:'submit' } );
var result = self.params.form.render();
self.params.Window.setContent( result );
} );
wikipedia_api.params = { form:form, Window:Window };
wikipedia_api.post();
var root = document.createElement( 'div' );
Morebits.status.init( root );
Window.setContent( root );
Window.display();
};
Twinkle.batchundelete.currentUndeleteCounter = 0;
Twinkle.batchundelete.currentundeletor = 0;
Twinkle.batchundelete.callback.evaluate = function( event ) {
Morebits.wiki.actionCompleted.notice = 'Status';
Morebits.wiki.actionCompleted.postfix = 'batch undeletion is now completed';
var pages = event.target.getChecked( 'pages' );
var reason = event.target.reason.value;
if( ! reason ) {
alert("You need to give a reason, you cabal crony!");
return;
}
Morebits.simpleWindow.setButtonsEnabled(false);
Morebits.status.init( event.target );
if( !pages ) {
Morebits.status.error( 'Error', 'nothing to undelete, aborting' );
return;
}
var work = Morebits.array.chunk( pages, Twinkle.getPref('batchUndeleteChunks') );
Morebits.wiki.addCheckpoint();
Twinkle.batchundelete.currentundeletor = window.setInterval( Twinkle.batchundelete.callbacks.main, 1000, work, reason );
};
Twinkle.batchundelete.callbacks = {
main: function( work, reason ) {
if( work.length === 0 && Twinkle.batchundelete.currentUndeleteCounter <= 0 ) {
Morebits.status.info( 'work done' );
window.clearInterval( Twinkle.batchundelete.currentundeletor );
Morebits.wiki.removeCheckpoint();
return;
} else if( work.length !== 0 && Twinkle.batchundelete.currentUndeleteCounter <= Twinkle.getPref('batchUndeleteMinCutOff') ) {
var pages = work.shift();
Twinkle.batchundelete.currentUndeleteCounter += pages.length;
for( var i = 0; i < pages.length; ++i ) {
var title = pages[i];
var query = {
'token': mw.user.tokens.get().editToken,
'title': title,
'action': 'undelete',
'reason': reason + Twinkle.getPref('deletionSummaryAd')
};
var wikipedia_api = new Morebits.wiki.api( "Undeleting " + title, query, function( self ) {
--Twinkle.batchundelete.currentUndeleteCounter;
var link = document.createElement( 'a' );
link.setAttribute( 'href', mw.util.getUrl(self.itsTitle) );
link.setAttribute( 'title', self.itsTitle );
link.appendChild( document.createTextNode(self.itsTitle) );
self.statelem.info( ['completed (',link,')'] );
});
wikipedia_api.itsTitle = title;
wikipedia_api.post();
}
}
}
};
})(jQuery);
//</nowiki>
340003a55f66b3dd56285c2f94ce2a01679fead5
309
2014-01-07T11:38:40Z
Amalthea
0
v2.0-682-ge4735d6: Linting
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklebatchundelete.js: Batch undelete module
****************************************
* Mode of invocation: Tab ("Und-batch")
* Active on: Existing user pages
* Config directives in: TwinkleConfig
*/
Twinkle.batchundelete = function twinklebatchundelete() {
if( mw.config.get("wgNamespaceNumber") !== mw.config.get("wgNamespaceIds").user ||
!mw.config.get("wgArticleId") ) {
return;
}
if( Morebits.userIsInGroup( 'sysop' ) ) {
Twinkle.addPortletLink( Twinkle.batchundelete.callback, "Und-batch", "tw-batch-undel", "Undelete 'em all" );
}
};
Twinkle.batchundelete.callback = function twinklebatchundeleteCallback() {
var Window = new Morebits.simpleWindow( 800, 400 );
Window.setScriptName("Twinkle");
Window.setTitle("Batch undelete");
var form = new Morebits.quickForm( Twinkle.batchundelete.callback.evaluate );
form.append( {
type: 'textarea',
name: 'reason',
label: 'Reason: '
} );
var query = {
'action': 'query',
'generator': 'links',
'titles': mw.config.get("wgPageName"),
'gpllimit' : Twinkle.getPref('batchMax') // the max for sysops
};
var wikipedia_api = new Morebits.wiki.api( 'Grabbing pages', query, function( self ) {
var xmlDoc = self.responseXML;
var snapshot = xmlDoc.evaluate('//page[@missing]', xmlDoc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null );
var list = [];
for ( var i = 0; i < snapshot.snapshotLength; ++i ) {
var object = snapshot.snapshotItem(i);
var page = xmlDoc.evaluate( '@title', object, null, XPathResult.STRING_TYPE, null ).stringValue;
list.push( {label:page, value:page, checked: true });
}
self.params.form.append( {
type: 'checkbox',
name: 'pages',
list: list
}
);
self.params.form.append( { type:'submit' } );
var result = self.params.form.render();
self.params.Window.setContent( result );
} );
wikipedia_api.params = { form:form, Window:Window };
wikipedia_api.post();
var root = document.createElement( 'div' );
Morebits.status.init( root );
Window.setContent( root );
Window.display();
};
Twinkle.batchundelete.currentUndeleteCounter = 0;
Twinkle.batchundelete.currentundeletor = 0;
Twinkle.batchundelete.callback.evaluate = function( event ) {
Morebits.wiki.actionCompleted.notice = 'Status';
Morebits.wiki.actionCompleted.postfix = 'batch undeletion is now completed';
var pages = event.target.getChecked( 'pages' );
var reason = event.target.reason.value;
if( ! reason ) {
alert("You need to give a reason, you cabal crony!");
return;
}
Morebits.simpleWindow.setButtonsEnabled(false);
Morebits.status.init( event.target );
if( !pages ) {
Morebits.status.error( 'Error', 'nothing to undelete, aborting' );
return;
}
var work = Morebits.array.chunk( pages, Twinkle.getPref('batchUndeleteChunks') );
Morebits.wiki.addCheckpoint();
Twinkle.batchundelete.currentundeletor = window.setInterval( Twinkle.batchundelete.callbacks.main, 1000, work, reason );
};
Twinkle.batchundelete.callbacks = {
main: function( work, reason ) {
if( work.length === 0 && Twinkle.batchundelete.currentUndeleteCounter <= 0 ) {
Morebits.status.info( 'work done' );
window.clearInterval( Twinkle.batchundelete.currentundeletor );
Morebits.wiki.removeCheckpoint();
return;
} else if( work.length !== 0 && Twinkle.batchundelete.currentUndeleteCounter <= Twinkle.getPref('batchUndeleteMinCutOff') ) {
var pages = work.shift();
Twinkle.batchundelete.currentUndeleteCounter += pages.length;
for( var i = 0; i < pages.length; ++i ) {
var title = pages[i];
var query = {
'token': mw.user.tokens.get().editToken,
'title': title,
'action': 'undelete',
'reason': reason + Twinkle.getPref('deletionSummaryAd')
};
var wikipedia_api = new Morebits.wiki.api( "Undeleting " + title, query, function( self ) {
--Twinkle.batchundelete.currentUndeleteCounter;
var link = document.createElement( 'a' );
link.setAttribute( 'href', mw.util.getUrl(self.itsTitle) );
link.setAttribute( 'title', self.itsTitle );
link.appendChild( document.createTextNode(self.itsTitle) );
self.statelem.info( ['completed (',link,')'] );
});
wikipedia_api.itsTitle = title;
wikipedia_api.post();
}
}
}
};
})(jQuery);
//</nowiki>
340003a55f66b3dd56285c2f94ce2a01679fead5
MediaWiki:Gadget-twinkleconfig.js
8
133
336
335
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkleconfig.js: Preferences module
****************************************
* Mode of invocation: Adds configuration form to Wikipedia:Twinkle/Preferences and user
subpages named "/Twinkle preferences", and adds ad box to the top of user
subpages belonging to the currently logged-in user which end in '.js'
* Active on: What I just said. Yeah.
* Config directives in: TwinkleConfig
I, [[User:This, that and the other]], originally wrote this. If the code is misbehaving, or you have any
questions, don't hesitate to ask me. (This doesn't at all imply [[WP:OWN]]ership - it's just meant to
point you in the right direction.) -- TTO
*/
Twinkle.config = {};
Twinkle.config.commonEnums = {
watchlist: { yes: "Add to watchlist", no: "Don't add to watchlist", "default": "Follow your site preferences" },
talkPageMode: { window: "In a window, replacing other user talks", tab: "In a new tab", blank: "In a totally new window" }
};
Twinkle.config.commonSets = {
csdCriteria: {
db: "Custom rationale ({{db}})",
g1: "G1", g2: "G2", g3: "G3", g4: "G4", g5: "G5", g6: "G6", g7: "G7", g8: "G8", g10: "G10", g11: "G11", g12: "G12", g13: "G13",
a1: "A1", a2: "A2", a3: "A3", a5: "A5", a7: "A7", a9: "A9", a10: "A10", a11: "A11",
u1: "U1", u2: "U2", u3: "U3",
f1: "F1", f2: "F2", f3: "F3", f7: "F7", f8: "F8", f9: "F9", f10: "F10",
c1: "C1",
t2: "T2", t3: "T3",
r2: "R2", r3: "R3",
p1: "P1", p2: "P2"
},
csdCriteriaDisplayOrder: [
"db",
"g1", "g2", "g3", "g4", "g5", "g6", "g7", "g8", "g10", "g11", "g12", "g13",
"a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11",
"u1", "u2", "u3",
"f1", "f2", "f3", "f7", "f8", "f9", "f10",
"c1",
"t2", "t3",
"r2", "r3",
"p1", "p2"
],
csdCriteriaNotification: {
db: "Custom rationale ({{db}})",
g1: "G1", g2: "G2", g3: "G3", g4: "G4", g6: 'G6 ("unnecessary disambig." and "copy-paste move" only)',
g10: "G10", g11: "G11", g12: "G12", g13: "G13",
a1: "A1", a2: "A2", a3: "A3", a5: "A5", a7: "A7", a9: "A9", a10: "A10", a11: "A11",
u3: "U3",
f1: "F1", f2: "F2", f3: "F3", f7: "F7", f8: "F8", f9: "F9", f10: "F10",
c1: "C1",
t2: "T2", t3: "T3",
r2: "R2", r3: "R3",
p1: "P1", p2: "P2"
},
csdCriteriaNotificationDisplayOrder: [
"db",
"g1", "g2", "g3", "g4", "g6", "g10", "g11", "g12", "g13",
"a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11",
"u3",
"f1", "f2", "f3", "f7", "f9", "f10",
"c1",
"t2", "t3",
"r2", "r3",
"p1", "p2"
],
csdAndDICriteria: {
db: "Custom rationale ({{db}})",
g1: "G1", g2: "G2", g3: "G3", g4: "G4", g5: "G5", g6: "G6", g7: "G7", g8: "G8", g10: "G10", g11: "G11", g12: "G12", g13: "G13",
a1: "A1", a2: "A2", a3: "A3", a5: "A5", a7: "A7", a9: "A9", a10: "A10", a11: "A11",
u1: "U1", u2: "U2", u3: "U3",
f1: "F1", f2: "F2", f3: "F3", f4: "F4", f5: "F5", f6: "F6", f7: "F7", f8: "F8", f9: "F9", f10: "F10", f11: "F11",
c1: "C1",
t2: "T2", t3: "T3",
r2: "R2", r3: "R3",
p1: "P1", p2: "P2"
},
csdAndDICriteriaDisplayOrder: [
"db",
"g1", "g2", "g3", "g4", "g5", "g6", "g7", "g8", "g10", "g11", "g12", "g13",
"a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11",
"u1", "u2", "u3",
"f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "f10", "f11",
"c1",
"t2", "t3",
"r2", "r3",
"p1", "p2"
],
namespacesNoSpecial: {
"0": "Article",
"1": "Talk (article)",
"2": "User",
"3": "User talk",
"4": "Wikipedia",
"5": "Wikipedia talk",
"6": "File",
"7": "File talk",
"8": "MediaWiki",
"9": "MediaWiki talk",
"10": "Template",
"11": "Template talk",
"12": "Help",
"13": "Help talk",
"14": "Category",
"15": "Category talk",
"100": "Portal",
"101": "Portal talk",
"108": "Book",
"109": "Book talk",
"118": "Draft",
"119": "Draft talk",
"710": "TimedText",
"711": "TimedText talk",
"828": "Module",
"829": "Module talk"
}
};
/**
* Section entry format:
*
* {
* title: <human-readable section title>,
* adminOnly: <true for admin-only sections>,
* hidden: <true for advanced preferences that rarely need to be changed - they can still be modified by manually editing twinkleoptions.js>,
* inFriendlyConfig: <true for preferences located under FriendlyConfig rather than TwinkleConfig>,
* preferences: [
* {
* name: <TwinkleConfig property name>,
* label: <human-readable short description - used as a form label>,
* helptip: <(optional) human-readable text (using valid HTML) that complements the description, like limits, warnings, etc.>
* adminOnly: <true for admin-only preferences>,
* type: <string|boolean|integer|enum|set|customList> (customList stores an array of JSON objects { value, label }),
* enumValues: <for type = "enum": a JSON object where the keys are the internal names and the values are human-readable strings>,
* setValues: <for type = "set": a JSON object where the keys are the internal names and the values are human-readable strings>,
* setDisplayOrder: <(optional) for type = "set": an array containing the keys of setValues (as strings) in the order that they are displayed>,
* customListValueTitle: <for type = "customList": the heading for the left "value" column in the custom list editor>,
* customListLabelTitle: <for type = "customList": the heading for the right "label" column in the custom list editor>
* },
* . . .
* ]
* },
* . . .
*
*/
Twinkle.config.sections = [
{
title: "General",
preferences: [
// TwinkleConfig.summaryAd (string)
// Text to be appended to the edit summary of edits made using Twinkle
{
name: "summaryAd",
label: "\"Ad\" to be appended to Twinkle's edit summaries",
helptip: "The summary ad should start with a space, and be kept short.",
type: "string"
},
// TwinkleConfig.deletionSummaryAd (string)
// Text to be appended to the edit summary of deletions made using Twinkle
{
name: "deletionSummaryAd",
label: "Summary ad to use for deletion summaries",
helptip: "Normally the same as the edit summary ad above.",
adminOnly: true,
type: "string"
},
// TwinkleConfig.protectionSummaryAd (string)
// Text to be appended to the edit summary of page protections made using Twinkle
{
name: "protectionSummaryAd",
label: "Summary ad to use for page protections",
helptip: "Normally the same as the edit summary ad above.",
adminOnly: true,
type: "string"
},
// TwinkleConfig.userTalkPageMode may take arguments:
// 'window': open a new window, remember the opened window
// 'tab': opens in a new tab, if possible.
// 'blank': force open in a new window, even if such a window exists
{
name: "userTalkPageMode",
label: "When opening a user talk page, open it",
type: "enum",
enumValues: Twinkle.config.commonEnums.talkPageMode
},
// TwinkleConfig.dialogLargeFont (boolean)
{
name: "dialogLargeFont",
label: "Use larger text in Twinkle dialogs",
type: "boolean"
}
]
},
{
title: "ARV",
preferences: [
{
name: "spiWatchReport",
label: "Add sockpuppet report pages to watchlist",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
}
]
},
{
title: "Image deletion (DI)",
preferences: [
// TwinkleConfig.notifyUserOnDeli (boolean)
// If the user should be notified after placing a file deletion tag
{
name: "notifyUserOnDeli",
label: "Check the \"notify initial uploader\" box by default",
type: "boolean"
},
// TwinkleConfig.deliWatchPage (string)
// The watchlist setting of the page tagged for deletion. Either "yes", "no", or "default". Default is "default" (Duh).
{
name: "deliWatchPage",
label: "Add image page to watchlist when tagging",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
},
// TwinkleConfig.deliWatchUser (string)
// The watchlist setting of the user talk page if a notification is placed. Either "yes", "no", or "default". Default is "default" (Duh).
{
name: "deliWatchUser",
label: "Add user talk page of initial uploader to watchlist when notifying",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
}
]
},
{
title: "Proposed deletion (PROD)",
preferences: [
// TwinkleConfig.watchProdPages (boolean)
// If, when applying prod template to page, to watch the page
{
name: "watchProdPages",
label: "Add article to watchlist when tagging",
type: "boolean"
},
// TwinkleConfig.prodReasonDefault (string)
// The prefilled PROD reason.
{
name: "prodReasonDefault",
label: "Prefilled PROD reason",
type: "string"
},
{
name: "logProdPages",
label: "Keep a log in userspace of all pages you tag for PROD",
helptip: "Since non-admins do not have access to their deleted contributions, the userspace log offers a good way to keep track of all pages you tag for PROD using Twinkle.",
type: "boolean"
},
{
name: "prodLogPageName",
label: "Keep the PROD userspace log at this user subpage",
helptip: "Enter a subpage name in this box. You will find your PROD log at User:<i>username</i>/<i>subpage name</i>. Only works if you turn on the PROD userspace log.",
type: "string"
}
]
},
{
title: "Revert and rollback", // twinklefluff module
preferences: [
// TwinkleConfig.openTalkPage (array)
// What types of actions that should result in opening of talk page
{
name: "openTalkPage",
label: "Open user talk page after these types of reversions",
type: "set",
setValues: { agf: "AGF rollback", norm: "Normal rollback", vand: "Vandalism rollback", torev: "\"Restore this version\"" }
},
// TwinkleConfig.openTalkPageOnAutoRevert (bool)
// Defines if talk page should be opened when calling revert from contrib page, because from there, actions may be multiple, and opening talk page not suitable. If set to true, openTalkPage defines then if talk page will be opened.
{
name: "openTalkPageOnAutoRevert",
label: "Open user talk page when invoking rollback from user contributions",
helptip: "Often, you may be rolling back many pages at a time from a vandal's contributions page, so it would be unsuitable to open the user talk page. Hence, this option is off by default. When this is on, the desired options must be enabled in the previous setting for this to work.",
type: "boolean"
},
// TwinkleConfig.markRevertedPagesAsMinor (array)
// What types of actions that should result in marking edit as minor
{
name: "markRevertedPagesAsMinor",
label: "Mark as minor edit for these types of reversions",
type: "set",
setValues: { agf: "AGF rollback", norm: "Normal rollback", vand: "Vandalism rollback", torev: "\"Restore this version\"" }
},
// TwinkleConfig.watchRevertedPages (array)
// What types of actions that should result in forced addition to watchlist
{
name: "watchRevertedPages",
label: "Add pages to watchlist for these types of reversions",
type: "set",
setValues: { agf: "AGF rollback", norm: "Normal rollback", vand: "Vandalism rollback", torev: "\"Restore this version\"" }
},
// TwinkleConfig.offerReasonOnNormalRevert (boolean)
// If to offer a prompt for extra summary reason for normal reverts, default to true
{
name: "offerReasonOnNormalRevert",
label: "Prompt for reason for normal rollbacks",
helptip: "\"Normal\" rollbacks are the ones that are invoked from the middle [rollback] link.",
type: "boolean"
},
{
name: "confirmOnFluff",
label: "Provide a confirmation message before reverting",
helptip: "For users of pen or touch devices, and chronically indecisive people.",
type: "boolean"
},
// TwinkleConfig.showRollbackLinks (array)
// Where Twinkle should show rollback links (diff, others, mine, contribs)
// Note from TTO: |contribs| seems to be equal to |others| + |mine|, i.e. redundant, so I left it out heres
{
name: "showRollbackLinks",
label: "Show rollback links on these pages",
type: "set",
setValues: { diff: "Diff pages", others: "Contributions pages of other users", mine: "My contributions page" }
}
]
},
{
title: "Shared IP tagging",
inFriendlyConfig: true,
preferences: [
{
name: "markSharedIPAsMinor",
label: "Mark shared IP tagging as a minor edit",
type: "boolean"
}
]
},
{
title: "Speedy deletion (CSD)",
preferences: [
{
name: "speedySelectionStyle",
label: "When to go ahead and tag/delete the page",
type: "enum",
enumValues: { "buttonClick": 'When I click "Submit"', "radioClick": "As soon as I click an option" }
},
// TwinkleConfig.watchSpeedyPages (array)
// Whether to add speedy tagged pages to watchlist
{
name: "watchSpeedyPages",
label: "Add page to watchlist when tagging with these criteria",
type: "set",
setValues: Twinkle.config.commonSets.csdCriteria,
setDisplayOrder: Twinkle.config.commonSets.csdCriteriaDisplayOrder
},
// TwinkleConfig.markSpeedyPagesAsPatrolled (boolean)
// If, when applying speedy template to page, to mark the page as patrolled (if the page was reached from NewPages)
{
name: "markSpeedyPagesAsPatrolled",
label: "Mark page as patrolled when tagging (if possible)",
helptip: "Due to technical limitations, pages are only marked as patrolled when they are reached via Special:NewPages.",
type: "boolean"
},
// TwinkleConfig.notifyUserOnSpeedyDeletionNomination (array)
// What types of actions should result that the author of the page being notified of nomination
{
name: "notifyUserOnSpeedyDeletionNomination",
label: "Notify page creator only when tagging with these criteria",
helptip: "Even if you choose to notify from the CSD screen, the notification will only take place for those criteria selected here.",
type: "set",
setValues: Twinkle.config.commonSets.csdCriteriaNotification,
setDisplayOrder: Twinkle.config.commonSets.csdCriteriaNotificationDisplayOrder
},
// TwinkleConfig.welcomeUserOnSpeedyDeletionNotification (array of strings)
// On what types of speedy deletion notifications shall the user be welcomed
// with a "firstarticle" notice if his talk page has not yet been created.
{
name: "welcomeUserOnSpeedyDeletionNotification",
label: "Welcome page creator alongside notification when tagging with these criteria",
helptip: "The welcome is issued only if the user is notified about the deletion, and only if their talk page does not already exist. The template used is {{firstarticle}}.",
type: "set",
setValues: Twinkle.config.commonSets.csdCriteriaNotification,
setDisplayOrder: Twinkle.config.commonSets.csdCriteriaNotificationDisplayOrder
},
// TwinkleConfig.promptForSpeedyDeletionSummary (array of strings)
{
name: "promptForSpeedyDeletionSummary",
label: "Allow editing of deletion summary when deleting under these criteria",
adminOnly: true,
type: "set",
setValues: Twinkle.config.commonSets.csdAndDICriteria,
setDisplayOrder: Twinkle.config.commonSets.csdAndDICriteriaDisplayOrder
},
// TwinkleConfig.openUserTalkPageOnSpeedyDelete (array of strings)
// What types of actions that should result user talk page to be opened when speedily deleting (admin only)
{
name: "openUserTalkPageOnSpeedyDelete",
label: "Open user talk page when deleting under these criteria",
adminOnly: true,
type: "set",
setValues: Twinkle.config.commonSets.csdAndDICriteria,
setDisplayOrder: Twinkle.config.commonSets.csdAndDICriteriaDisplayOrder
},
// TwinkleConfig.deleteTalkPageOnDelete (boolean)
// If talk page if exists should also be deleted (CSD G8) when spedying a page (admin only)
{
name: "deleteTalkPageOnDelete",
label: "Check the \"also delete talk page\" box by default",
adminOnly: true,
type: "boolean"
},
{
name: "deleteRedirectsOnDelete",
label: "Check the \"also delete redirects\" box by default",
adminOnly: true,
type: "boolean"
},
// TwinkleConfig.deleteSysopDefaultToTag (boolean)
// Make the CSD screen default to "tag" instead of "delete" (admin only)
{
name: "deleteSysopDefaultToTag",
label: "Default to speedy tagging instead of outright deletion",
adminOnly: true,
type: "boolean"
},
// TwinkleConfig.speedyWindowWidth (integer)
// Defines the width of the Twinkle SD window in pixels
{
name: "speedyWindowWidth",
label: "Width of speedy deletion window (pixels)",
type: "integer"
},
// TwinkleConfig.speedyWindowWidth (integer)
// Defines the width of the Twinkle SD window in pixels
{
name: "speedyWindowHeight",
label: "Height of speedy deletion window (pixels)",
helptip: "If you have a big monitor, you might like to increase this.",
type: "integer"
},
{
name: "logSpeedyNominations",
label: "Keep a log in userspace of all CSD nominations",
helptip: "Since non-admins do not have access to their deleted contributions, the userspace log offers a good way to keep track of all pages you nominate for CSD using Twinkle. Files tagged using DI are also added to this log.",
type: "boolean"
},
{
name: "speedyLogPageName",
label: "Keep the CSD userspace log at this user subpage",
helptip: "Enter a subpage name in this box. You will find your CSD log at User:<i>username</i>/<i>subpage name</i>. Only works if you turn on the CSD userspace log.",
type: "string"
},
{
name: "noLogOnSpeedyNomination",
label: "Do not create a userspace log entry when tagging with these criteria",
type: "set",
setValues: Twinkle.config.commonSets.csdAndDICriteria,
setDisplayOrder: Twinkle.config.commonSets.csdAndDICriteriaDisplayOrder
}
]
},
{
title: "Tag",
inFriendlyConfig: true,
preferences: [
{
name: "watchTaggedPages",
label: "Add page to watchlist when tagging",
type: "boolean"
},
{
name: "watchMergeDiscussions",
label: "Add talk pages to watchlist when starting merge discussions",
type: "boolean"
},
{
name: "markTaggedPagesAsMinor",
label: "Mark addition of tags as a minor edit",
type: "boolean"
},
{
name: "markTaggedPagesAsPatrolled",
label: "Check the \"mark page as patrolled\" box by default",
type: "boolean"
},
{
name: "groupByDefault",
label: "Check the \"group into {{multiple issues}}\" box by default",
type: "boolean"
},
{
name: "tagArticleSortOrder",
label: "Default view order for article tags",
type: "enum",
enumValues: { "cat": "By categories", "alpha": "In alphabetical order" }
},
{
name: "customTagList",
label: "Custom article maintenance tags to display",
helptip: "These appear as additional options at the bottom of the list of tags. For example, you could add new maintenance tags which have not yet been added to Twinkle's defaults.",
type: "customList",
customListValueTitle: "Template name (no curly brackets)",
customListLabelTitle: "Text to show in Tag dialog"
}
]
},
{
title: "Talkback",
inFriendlyConfig: true,
preferences: [
{
name: "markTalkbackAsMinor",
label: "Mark talkbacks as minor edits",
type: "boolean"
},
{
name: "insertTalkbackSignature",
label: "Insert signature within talkbacks",
type: "boolean"
},
{
name: "talkbackHeading",
label: "Section heading to use for talkbacks",
type: "string"
},
{
name: "adminNoticeHeading",
label: "Section heading to use for administrators' noticeboard notices",
helptip: "Only relevant for AN and ANI.",
type: "string"
},
{
name: "mailHeading",
label: "Section heading to use for \"you've got mail\" notices",
type: "string"
}
]
},
{
title: "Unlink",
preferences: [
// TwinkleConfig.unlinkNamespaces (array)
// In what namespaces unlink should happen, default in 0 (article) and 100 (portal)
{
name: "unlinkNamespaces",
label: "Remove links from pages in these namespaces",
helptip: "Avoid selecting any talk namespaces, as Twinkle might end up unlinking on talk archives (a big no-no).",
type: "set",
setValues: Twinkle.config.commonSets.namespacesNoSpecial
}
]
},
{
title: "Warn user",
preferences: [
// TwinkleConfig.defaultWarningGroup (int)
// if true, watch the page which has been dispatched an warning or notice, if false, default applies
{
name: "defaultWarningGroup",
label: "Default warning level",
type: "enum",
enumValues: {
"1": "Level 1",
"2": "Level 2",
"3": "Level 3",
"4": "Level 4",
"5": "Level 4im",
"6": "Single-issue notices",
"7": "Single-issue warnings",
"9": "Custom warnings",
"8": "Block (admin only)"
}
},
// TwinkleConfig.showSharedIPNotice may take arguments:
// true: to show shared ip notice if an IP address
// false: to not print the notice
{
name: "showSharedIPNotice",
label: "Add extra notice on shared IP talk pages",
helptip: "Notice used is {{SharedIPAdvice}}",
type: "boolean"
},
// TwinkleConfig.watchWarnings (boolean)
// if true, watch the page which has been dispatched an warning or notice, if false, default applies
{
name: "watchWarnings",
label: "Add user talk page to watchlist when notifying",
type: "boolean"
},
// TwinkleConfig.blankTalkpageOnIndefBlock (boolean)
// if true, blank the talk page when issuing an indef block notice (per [[WP:UW#Indefinitely blocked users]])
{
name: "blankTalkpageOnIndefBlock",
label: "Blank the talk page when indefinitely blocking users",
helptip: "See <a href=\"" + mw.util.getUrl("WP:UW#Indefinitely blocked users") + "\">WP:UW</a> for more information.",
adminOnly: true,
type: "boolean"
},
{
name: "customWarningList",
label: "Custom warning templates to display",
helptip: "You can add individual templates or user subpages. Custom warnings appear in the \"Custom warnings\" category within the warning dialog box.",
type: "customList",
customListValueTitle: "Template name (no curly brackets)",
customListLabelTitle: "Text to show in warning list (also used as edit summary)"
}
]
},
{
title: "Welcome user",
inFriendlyConfig: true,
preferences: [
{
name: "topWelcomes",
label: "Place welcomes above existing content on user talk pages",
type: "boolean"
},
{
name: "watchWelcomes",
label: "Add user talk pages to watchlist when welcoming",
helptip: "Doing so adds to the personal element of welcoming a user - you will be able to see how they are coping as a newbie, and possibly help them.",
type: "boolean"
},
{
name: "insertUsername",
label: "Add your username to the template (where applicable)",
helptip: "Some welcome templates have an opening sentence like \"Hi, I'm <username>. Welcome\" etc. If you turn off this option, these templates will not display your username in that way.",
type: "boolean"
},
{
name: "quickWelcomeMode",
label: "Clicking the \"welcome\" link on a diff page will",
helptip: "If you choose to welcome automatically, the template you specify below will be used.",
type: "enum",
enumValues: { auto: "welcome automatically", norm: "prompt you to select a template" }
},
{
name: "quickWelcomeTemplate",
label: "Template to use when welcoming automatically",
helptip: "Enter the name of a welcome template, without the curly brackets. A link to the given article will be added.",
type: "string"
},
{
name: "customWelcomeList",
label: "Custom welcome templates to display",
helptip: "You can add other welcome templates, or user subpages that are welcome templates (prefixed with \"User:\"). Don't forget that these templates are substituted onto user talk pages.",
type: "customList",
customListValueTitle: "Template name (no curly brackets)",
customListLabelTitle: "Text to show in Welcome dialog"
},
{
name: "customWelcomeSignature",
label: "Automatically sign custom welcome templates",
helptip: "If your custom welcome templates contain a built-in signature within the template, turn off this option.",
type: "boolean"
}
]
},
{
title: "XFD (deletion discussions)",
preferences: [
// TwinkleConfig.xfdWatchPage (string)
// The watchlist setting of the page being nominated for XfD. Either "yes" (add to watchlist), "no" (don't
// add to watchlist), or "default" (use setting from preferences). Default is "default" (duh).
{
name: "xfdWatchPage",
label: "Add the nominated page to watchlist",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
},
// TwinkleConfig.xfdWatchDiscussion (string)
// The watchlist setting of the newly created XfD page (for those processes that create discussion pages for each nomination),
// or the list page for the other processes.
// Either "yes" (add to watchlist), "no" (don't add to watchlist), or "default" (use setting from preferences). Default is "default" (duh).
{
name: "xfdWatchDiscussion",
label: "Add the deletion discussion page to watchlist",
helptip: "This refers to the discussion subpage (for AfD and MfD) or the daily log page (for TfD, CfD, RfD and FfD)",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
},
// TwinkleConfig.xfdWatchList (string)
// The watchlist setting of the XfD list page, *if* the discussion is on a separate page. Either "yes" (add to watchlist), "no" (don't
// add to watchlist), or "default" (use setting from preferences). Default is "no" (Hehe. Seriously though, who wants to watch it?
// Sorry in advance for any false positives.).
{
name: "xfdWatchList",
label: "Add the daily log/list page to the watchlist (where applicable)",
helptip: "This only applies for AfD and MfD, where the discussions are transcluded onto a daily log page (for AfD) or the main MfD page (for MfD).",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
},
// TwinkleConfig.xfdWatchUser (string)
// The watchlist setting of the user if he receives a notification. Either "yes" (add to watchlist), "no" (don't
// add to watchlist), or "default" (use setting from preferences). Default is "default" (duh).
{
name: "xfdWatchUser",
label: "Add the user talk page to watchlist (when notifying)",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
}
]
},
{
title: "Hidden",
hidden: true,
preferences: [
// twinkle.header.js: portlet setup
{
name: "portletArea",
type: "string"
},
{
name: "portletId",
type: "string"
},
{
name: "portletName",
type: "string"
},
{
name: "portletType",
type: "string"
},
{
name: "portletNext",
type: "string"
},
// twinklefluff.js: defines how many revision to query maximum, maximum possible is 50, default is 50
{
name: "revertMaxRevisions",
type: "integer"
},
// twinklebatchdelete.js: How many pages should be processed at a time
{
name: "batchdeleteChunks",
type: "integer"
},
// twinklebatchdelete.js: How many pages left in the process of being completed should allow a new batch to be initialized
{
name: "batchDeleteMinCutOff",
type: "integer"
},
// twinklebatchdelete.js: How many pages should be processed maximum
{
name: "batchMax",
type: "integer"
},
// twinklebatchprotect.js: How many pages should be processed at a time
{
name: "batchProtectChunks",
type: "integer"
},
// twinklebatchprotect.js: How many pages left in the process of being completed should allow a new batch to be initialized
{
name: "batchProtectMinCutOff",
type: "integer"
},
// twinklebatchundelete.js: How many pages should be processed at a time
{
name: "batchundeleteChunks",
type: "integer"
},
// twinklebatchundelete.js: How many pages left in the process of being completed should allow a new batch to be initialized
{
name: "batchUndeleteMinCutOff",
type: "integer"
},
// twinkledelimages.js: How many files should be processed at a time
{
name: "deliChunks",
type: "integer"
},
// twinkledelimages.js: How many files should be processed maximum
{
name: "deliMax",
type: "integer"
},
// twinkledeprod.js: How many pages should be processed at a time
{
name: "proddeleteChunks",
type: "integer"
}
]
}
]; // end of Twinkle.config.sections
//{
// name: "",
// label: "",
// type: ""
// },
Twinkle.config.init = function twinkleconfigInit() {
if ((mw.config.get("wgNamespaceNumber") === mw.config.get("wgNamespaceIds").project && mw.config.get("wgTitle") === "Twinkle/Preferences" ||
(mw.config.get("wgNamespaceNumber") === mw.config.get("wgNamespaceIds").user && mw.config.get("wgTitle").lastIndexOf("/Twinkle preferences") === (mw.config.get("wgTitle").length - 20))) &&
mw.config.get("wgAction") === "view") {
// create the config page at Wikipedia:Twinkle/Preferences, and at user subpages (for testing purposes)
if (!document.getElementById("twinkle-config")) {
return; // maybe the page is misconfigured, or something - but any attempt to modify it will be pointless
}
// set style (the url() CSS function doesn't seem to work from wikicode - ?!)
document.getElementById("twinkle-config-titlebar").style.backgroundImage = "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB%2FqqA%2BAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEhQTFRFr73ZobTPusjdsMHZp7nVwtDhzNbnwM3fu8jdq7vUt8nbxtDkw9DhpbfSvMrfssPZqLvVztbno7bRrr7W1d%2Fs1N7qydXk0NjpkW7Q%2BgAAADVJREFUeNoMwgESQCAAAMGLkEIi%2FP%2BnbnbpdB59app5Vdg0sXAoMZCpGoFbK6ciuy6FX4ABAEyoAef0BXOXAAAAAElFTkSuQmCC)";
var contentdiv = document.getElementById("twinkle-config-content");
contentdiv.textContent = ""; // clear children
// let user know about possible conflict with monobook.js/vector.js file
// (settings in that file will still work, but they will be overwritten by twinkleoptions.js settings)
var contentnotice = document.createElement("p");
// I hate innerHTML, but this is one thing it *is* good for...
contentnotice.innerHTML = "<b>Before modifying your preferences here,</b> make sure you have removed any old <code>TwinkleConfig</code> and <code>FriendlyConfig</code> settings from your <a href=\"" + mw.util.getUrl("Special:MyPage/skin.js") + "\" title=\"Special:MyPage/skin.js\">user JavaScript file</a>.";
contentdiv.appendChild(contentnotice);
// look and see if the user does in fact have any old settings in their skin JS file
var skinjs = new Morebits.wiki.page("User:" + mw.config.get("wgUserName") + "/" + mw.config.get("skin") + ".js");
skinjs.setCallbackParameters(contentnotice);
skinjs.load(Twinkle.config.legacyPrefsNotice);
// start a table of contents
var toctable = document.createElement("div");
toctable.className = "toc";
toctable.style.marginLeft = "0.4em";
// create TOC title
var toctitle = document.createElement("div");
toctitle.id = "toctitle";
var toch2 = document.createElement("h2");
toch2.textContent = "Contents ";
toctitle.appendChild(toch2);
// add TOC show/hide link
var toctoggle = document.createElement("span");
toctoggle.className = "toctoggle";
toctoggle.appendChild(document.createTextNode("["));
var toctogglelink = document.createElement("a");
toctogglelink.className = "internal";
toctogglelink.setAttribute("href", "#tw-tocshowhide");
toctogglelink.textContent = "hide";
toctoggle.appendChild(toctogglelink);
toctoggle.appendChild(document.createTextNode("]"));
toctitle.appendChild(toctoggle);
toctable.appendChild(toctitle);
// create item container: this is what we add stuff to
var tocul = document.createElement("ul");
toctogglelink.addEventListener("click", function twinkleconfigTocToggle() {
var $tocul = $(tocul);
$tocul.toggle();
if ($tocul.find(":visible").length) {
toctogglelink.textContent = "hide";
} else {
toctogglelink.textContent = "show";
}
}, false);
toctable.appendChild(tocul);
contentdiv.appendChild(toctable);
var tocnumber = 1;
var contentform = document.createElement("form");
contentform.setAttribute("action", "javascript:void(0)"); // was #tw-save - changed to void(0) to work around Chrome issue
contentform.addEventListener("submit", Twinkle.config.save, true);
contentdiv.appendChild(contentform);
var container = document.createElement("table");
container.style.width = "100%";
contentform.appendChild(container);
$(Twinkle.config.sections).each(function(sectionkey, section) {
if (section.hidden || (section.adminOnly && !Morebits.userIsInGroup("sysop"))) {
return true; // i.e. "continue" in this context
}
var configgetter; // retrieve the live config values
if (section.inFriendlyConfig) {
configgetter = Twinkle.getFriendlyPref;
} else {
configgetter = Twinkle.getPref;
}
// add to TOC
var tocli = document.createElement("li");
tocli.className = "toclevel-1";
var toca = document.createElement("a");
toca.setAttribute("href", "#twinkle-config-section-" + tocnumber.toString());
toca.appendChild(document.createTextNode(section.title));
tocli.appendChild(toca);
tocul.appendChild(tocli);
var row = document.createElement("tr");
var cell = document.createElement("td");
cell.setAttribute("colspan", "3");
var heading = document.createElement("h4");
heading.style.borderBottom = "1px solid gray";
heading.style.marginTop = "0.2em";
heading.id = "twinkle-config-section-" + (tocnumber++).toString();
heading.appendChild(document.createTextNode(section.title));
cell.appendChild(heading);
row.appendChild(cell);
container.appendChild(row);
var rowcount = 1; // for row banding
// add each of the preferences to the form
$(section.preferences).each(function(prefkey, pref) {
if (pref.adminOnly && !Morebits.userIsInGroup("sysop")) {
return true; // i.e. "continue" in this context
}
row = document.createElement("tr");
row.style.marginBottom = "0.2em";
// create odd row banding
if (rowcount++ % 2 === 0) {
row.style.backgroundColor = "rgba(128, 128, 128, 0.1)";
}
cell = document.createElement("td");
var label, input;
switch (pref.type) {
case "boolean": // create a checkbox
cell.setAttribute("colspan", "2");
label = document.createElement("label");
input = document.createElement("input");
input.setAttribute("type", "checkbox");
input.setAttribute("id", pref.name);
input.setAttribute("name", pref.name);
if (configgetter(pref.name) === true) {
input.setAttribute("checked", "checked");
}
label.appendChild(input);
label.appendChild(document.createTextNode(" " + pref.label));
cell.appendChild(label);
break;
case "string": // create an input box
case "integer":
// add label to first column
cell.style.textAlign = "right";
cell.style.paddingRight = "0.5em";
label = document.createElement("label");
label.setAttribute("for", pref.name);
label.appendChild(document.createTextNode(pref.label + ":"));
cell.appendChild(label);
row.appendChild(cell);
// add input box to second column
cell = document.createElement("td");
cell.style.paddingRight = "1em";
input = document.createElement("input");
input.setAttribute("type", "text");
input.setAttribute("id", pref.name);
input.setAttribute("name", pref.name);
if (pref.type === "integer") {
input.setAttribute("size", 6);
input.setAttribute("type", "number");
input.setAttribute("step", "1"); // integers only
}
if (configgetter(pref.name)) {
input.setAttribute("value", configgetter(pref.name));
}
cell.appendChild(input);
break;
case "enum": // create a combo box
// add label to first column
// note: duplicates the code above, under string/integer
cell.style.textAlign = "right";
cell.style.paddingRight = "0.5em";
label = document.createElement("label");
label.setAttribute("for", pref.name);
label.appendChild(document.createTextNode(pref.label + ":"));
cell.appendChild(label);
row.appendChild(cell);
// add input box to second column
cell = document.createElement("td");
cell.style.paddingRight = "1em";
input = document.createElement("select");
input.setAttribute("id", pref.name);
input.setAttribute("name", pref.name);
$.each(pref.enumValues, function(enumvalue, enumdisplay) {
var option = document.createElement("option");
option.setAttribute("value", enumvalue);
if (configgetter(pref.name) === enumvalue) {
option.setAttribute("selected", "selected");
}
option.appendChild(document.createTextNode(enumdisplay));
input.appendChild(option);
});
cell.appendChild(input);
break;
case "set": // create a set of check boxes
// add label first of all
cell.setAttribute("colspan", "2");
label = document.createElement("label"); // not really necessary to use a label element here, but we do it for consistency of styling
label.appendChild(document.createTextNode(pref.label + ":"));
cell.appendChild(label);
var checkdiv = document.createElement("div");
checkdiv.style.paddingLeft = "1em";
var worker = function(itemkey, itemvalue) {
var checklabel = document.createElement("label");
checklabel.style.marginRight = "0.7em";
checklabel.style.display = "inline-block";
var check = document.createElement("input");
check.setAttribute("type", "checkbox");
check.setAttribute("id", pref.name + "_" + itemkey);
check.setAttribute("name", pref.name + "_" + itemkey);
if (configgetter(pref.name) && configgetter(pref.name).indexOf(itemkey) !== -1) {
check.setAttribute("checked", "checked");
}
// cater for legacy integer array values for unlinkNamespaces (this can be removed a few years down the track...)
if (pref.name === "unlinkNamespaces") {
if (configgetter(pref.name) && configgetter(pref.name).indexOf(parseInt(itemkey, 10)) !== -1) {
check.setAttribute("checked", "checked");
}
}
checklabel.appendChild(check);
checklabel.appendChild(document.createTextNode(itemvalue));
checkdiv.appendChild(checklabel);
};
if (pref.setDisplayOrder) {
// add check boxes according to the given display order
$.each(pref.setDisplayOrder, function(itemkey, item) {
worker(item, pref.setValues[item]);
});
} else {
// add check boxes according to the order it gets fed to us (probably strict alphabetical)
$.each(pref.setValues, worker);
}
cell.appendChild(checkdiv);
break;
case "customList":
// add label to first column
cell.style.textAlign = "right";
cell.style.paddingRight = "0.5em";
label = document.createElement("label");
label.setAttribute("for", pref.name);
label.appendChild(document.createTextNode(pref.label + ":"));
cell.appendChild(label);
row.appendChild(cell);
// add button to second column
cell = document.createElement("td");
cell.style.paddingRight = "1em";
var button = document.createElement("button");
button.setAttribute("id", pref.name);
button.setAttribute("name", pref.name);
button.setAttribute("type", "button");
button.addEventListener("click", Twinkle.config.listDialog.display, false);
// use jQuery data on the button to store the current config value
$(button).data({
value: configgetter(pref.name),
pref: pref,
inFriendlyConfig: section.inFriendlyConfig
});
button.appendChild(document.createTextNode("Edit items"));
cell.appendChild(button);
break;
default:
alert("twinkleconfig: unknown data type for preference " + pref.name);
break;
}
row.appendChild(cell);
// add help tip
cell = document.createElement("td");
cell.style.fontSize = "90%";
cell.style.color = "gray";
if (pref.helptip) {
// convert mentions of templates in the helptip to clickable links
cell.innerHTML = pref.helptip.replace(/{{(.+?)}}/g,
'{{<a href="' + mw.util.getUrl("Template:") + '$1" target="_blank">$1</a>}}');
}
// add reset link (custom lists don't need this, as their config value isn't displayed on the form)
if (pref.type !== "customList") {
var resetlink = document.createElement("a");
resetlink.setAttribute("href", "#tw-reset");
resetlink.setAttribute("id", "twinkle-config-reset-" + pref.name);
resetlink.addEventListener("click", Twinkle.config.resetPrefLink, false);
if (resetlink.style.styleFloat) { // IE (inc. IE9)
resetlink.style.styleFloat = "right";
} else { // standards
resetlink.style.cssFloat = "right";
}
resetlink.style.margin = "0 0.6em";
resetlink.appendChild(document.createTextNode("Reset"));
cell.appendChild(resetlink);
}
row.appendChild(cell);
container.appendChild(row);
return true;
});
return true;
});
var footerbox = document.createElement("div");
footerbox.setAttribute("id", "twinkle-config-buttonpane");
footerbox.style.backgroundColor = "#BCCADF";
footerbox.style.padding = "0.5em";
var button = document.createElement("button");
button.setAttribute("id", "twinkle-config-submit");
button.setAttribute("type", "submit");
button.appendChild(document.createTextNode("Save changes"));
footerbox.appendChild(button);
var footerspan = document.createElement("span");
footerspan.className = "plainlinks";
footerspan.style.marginLeft = "2.4em";
footerspan.style.fontSize = "90%";
var footera = document.createElement("a");
footera.setAttribute("href", "#tw-reset-all");
footera.setAttribute("id", "twinkle-config-resetall");
footera.addEventListener("click", Twinkle.config.resetAllPrefs, false);
footera.appendChild(document.createTextNode("Restore defaults"));
footerspan.appendChild(footera);
footerbox.appendChild(footerspan);
contentform.appendChild(footerbox);
// since all the section headers exist now, we can try going to the requested anchor
if (location.hash) {
location.hash = location.hash;
}
} else if (mw.config.get("wgNamespaceNumber") === mw.config.get("wgNamespaceIds").user &&
mw.config.get("wgTitle").indexOf(mw.config.get("wgUserName")) === 0 &&
mw.config.get("wgPageName").slice(-3) === ".js") {
var box = document.createElement("div");
box.setAttribute("id", "twinkle-config-headerbox");
box.style.border = "1px #f60 solid";
box.style.background = "#fed";
box.style.padding = "0.6em";
box.style.margin = "0.5em auto";
box.style.textAlign = "center";
var link,
scriptPageName = mw.config.get("wgPageName").slice(mw.config.get("wgPageName").lastIndexOf("/") + 1,
mw.config.get("wgPageName").lastIndexOf(".js"));
if (scriptPageName === "twinkleoptions") {
// place "why not try the preference panel" notice
box.style.fontWeight = "bold";
box.style.width = "80%";
box.style.borderWidth = "2px";
if (mw.config.get("wgArticleId") > 0) { // page exists
box.appendChild(document.createTextNode("This page contains your Twinkle preferences. You can change them using the "));
} else { // page does not exist
box.appendChild(document.createTextNode("You can customize Twinkle to suit your preferences by using the "));
}
link = document.createElement("a");
link.setAttribute("href", mw.util.getUrl(mw.config.get("wgFormattedNamespaces")[mw.config.get("wgNamespaceIds").project] + ":Twinkle/Preferences") );
link.appendChild(document.createTextNode("Twinkle preferences panel"));
box.appendChild(link);
box.appendChild(document.createTextNode(", or by editing this page."));
$(box).insertAfter($("#contentSub"));
} else if (["monobook", "vector", "cologneblue", "modern", "common"].indexOf(scriptPageName) !== -1) {
// place "Looking for Twinkle options?" notice
box.style.width = "60%";
box.appendChild(document.createTextNode("If you want to set Twinkle preferences, you can use the "));
link = document.createElement("a");
link.setAttribute("href", mw.util.getUrl(mw.config.get("wgFormattedNamespaces")[mw.config.get("wgNamespaceIds").project] + ":Twinkle/Preferences") );
link.appendChild(document.createTextNode("Twinkle preferences panel"));
box.appendChild(link);
box.appendChild(document.createTextNode("."));
$(box).insertAfter($("#contentSub"));
}
}
};
// Morebits.wiki.page callback from init code
Twinkle.config.legacyPrefsNotice = function twinkleconfigLegacyPrefsNotice(pageobj) {
var text = pageobj.getPageText();
var contentnotice = pageobj.getCallbackParameters();
if (text.indexOf("TwinkleConfig") !== -1 || text.indexOf("FriendlyConfig") !== -1) {
contentnotice.innerHTML = '<table class="plainlinks ombox ombox-content"><tr><td class="mbox-image">' +
'<img alt="" src="http://upload.wikimedia.org/wikipedia/en/3/38/Imbox_content.png" /></td>' +
'<td class="mbox-text"><p><big><b>Before modifying your settings here,</b> you must remove your old Twinkle and Friendly settings from your personal skin JavaScript.</big></p>' +
'<p>To do this, you can <a href="' + mw.config.get("wgScript") + '?title=User:' + encodeURIComponent(mw.config.get("wgUserName")) + '/' + mw.config.get("skin") + '.js&action=edit" target="_blank"><b>edit your personal JavaScript</b></a>, removing all lines of code that refer to <code>TwinkleConfig</code> and <code>FriendlyConfig</code>.</p>' +
'</td></tr></table>';
} else {
$(contentnotice).remove();
}
};
// custom list-related stuff
Twinkle.config.listDialog = {};
Twinkle.config.listDialog.addRow = function twinkleconfigListDialogAddRow(dlgtable, value, label) {
var contenttr = document.createElement("tr");
// "remove" button
var contenttd = document.createElement("td");
var removeButton = document.createElement("button");
removeButton.setAttribute("type", "button");
removeButton.addEventListener("click", function() { $(contenttr).remove(); }, false);
removeButton.textContent = "Remove";
contenttd.appendChild(removeButton);
contenttr.appendChild(contenttd);
// value input box
contenttd = document.createElement("td");
var input = document.createElement("input");
input.setAttribute("type", "text");
input.className = "twinkle-config-customlist-value";
input.style.width = "97%";
if (value) {
input.setAttribute("value", value);
}
contenttd.appendChild(input);
contenttr.appendChild(contenttd);
// label input box
contenttd = document.createElement("td");
input = document.createElement("input");
input.setAttribute("type", "text");
input.className = "twinkle-config-customlist-label";
input.style.width = "98%";
if (label) {
input.setAttribute("value", label);
}
contenttd.appendChild(input);
contenttr.appendChild(contenttd);
dlgtable.appendChild(contenttr);
};
Twinkle.config.listDialog.display = function twinkleconfigListDialogDisplay(e) {
var $prefbutton = $(e.target);
var curvalue = $prefbutton.data("value");
var curpref = $prefbutton.data("pref");
var dialog = new Morebits.simpleWindow(720, 400);
dialog.setTitle(curpref.label);
dialog.setScriptName("Twinkle preferences");
var dialogcontent = document.createElement("div");
var dlgtable = document.createElement("table");
dlgtable.className = "wikitable";
dlgtable.style.margin = "1.4em 1em";
dlgtable.style.width = "auto";
var dlgtbody = document.createElement("tbody");
// header row
var dlgtr = document.createElement("tr");
// top-left cell
var dlgth = document.createElement("th");
dlgth.style.width = "5%";
dlgtr.appendChild(dlgth);
// value column header
dlgth = document.createElement("th");
dlgth.style.width = "35%";
dlgth.textContent = (curpref.customListValueTitle ? curpref.customListValueTitle : "Value");
dlgtr.appendChild(dlgth);
// label column header
dlgth = document.createElement("th");
dlgth.style.width = "60%";
dlgth.textContent = (curpref.customListLabelTitle ? curpref.customListLabelTitle : "Label");
dlgtr.appendChild(dlgth);
dlgtbody.appendChild(dlgtr);
// content rows
var gotRow = false;
$.each(curvalue, function(k, v) {
gotRow = true;
Twinkle.config.listDialog.addRow(dlgtbody, v.value, v.label);
});
// if there are no values present, add a blank row to start the user off
if (!gotRow) {
Twinkle.config.listDialog.addRow(dlgtbody);
}
// final "add" button
var dlgtfoot = document.createElement("tfoot");
dlgtr = document.createElement("tr");
var dlgtd = document.createElement("td");
dlgtd.setAttribute("colspan", "3");
var addButton = document.createElement("button");
addButton.style.minWidth = "8em";
addButton.setAttribute("type", "button");
addButton.addEventListener("click", function(e) {
Twinkle.config.listDialog.addRow(dlgtbody);
}, false);
addButton.textContent = "Add";
dlgtd.appendChild(addButton);
dlgtr.appendChild(dlgtd);
dlgtfoot.appendChild(dlgtr);
dlgtable.appendChild(dlgtbody);
dlgtable.appendChild(dlgtfoot);
dialogcontent.appendChild(dlgtable);
// buttonpane buttons: [Save changes] [Reset] [Cancel]
var button = document.createElement("button");
button.setAttribute("type", "submit"); // so Morebits.simpleWindow puts the button in the button pane
button.addEventListener("click", function(e) {
Twinkle.config.listDialog.save($prefbutton, dlgtbody);
dialog.close();
}, false);
button.textContent = "Save changes";
dialogcontent.appendChild(button);
button = document.createElement("button");
button.setAttribute("type", "submit"); // so Morebits.simpleWindow puts the button in the button pane
button.addEventListener("click", function(e) {
Twinkle.config.listDialog.reset($prefbutton, dlgtbody);
}, false);
button.textContent = "Reset";
dialogcontent.appendChild(button);
button = document.createElement("button");
button.setAttribute("type", "submit"); // so Morebits.simpleWindow puts the button in the button pane
button.addEventListener("click", function(e) {
dialog.close(); // the event parameter on this function seems to be broken
}, false);
button.textContent = "Cancel";
dialogcontent.appendChild(button);
dialog.setContent(dialogcontent);
dialog.display();
};
// Resets the data value, re-populates based on the new (default) value, then saves the
// old data value again (less surprising behaviour)
Twinkle.config.listDialog.reset = function twinkleconfigListDialogReset(button, tbody) {
// reset value on button
var $button = $(button);
var curpref = $button.data("pref");
var oldvalue = $button.data("value");
Twinkle.config.resetPref(curpref, $button.data("inFriendlyConfig"));
// reset form
var $tbody = $(tbody);
$tbody.find("tr").slice(1).remove(); // all rows except the first (header) row
// add the new values
var curvalue = $button.data("value");
$.each(curvalue, function(k, v) {
Twinkle.config.listDialog.addRow(tbody, v.value, v.label);
});
// save the old value
$button.data("value", oldvalue);
};
Twinkle.config.listDialog.save = function twinkleconfigListDialogSave(button, tbody) {
var result = [];
var current = {};
$(tbody).find('input[type="text"]').each(function(inputkey, input) {
if ($(input).hasClass("twinkle-config-customlist-value")) {
current = { value: input.value };
} else {
current.label = input.value;
// exclude totally empty rows
if (current.value || current.label) {
result.push(current);
}
}
});
$(button).data("value", result);
};
// reset/restore defaults
Twinkle.config.resetPrefLink = function twinkleconfigResetPrefLink(e) {
var wantedpref = e.target.id.substring(21); // "twinkle-config-reset-" prefix is stripped
// search tactics
$(Twinkle.config.sections).each(function(sectionkey, section) {
if (section.hidden || (section.adminOnly && !Morebits.userIsInGroup("sysop"))) {
return true; // continue: skip impossibilities
}
var foundit = false;
$(section.preferences).each(function(prefkey, pref) {
if (pref.name !== wantedpref) {
return true; // continue
}
Twinkle.config.resetPref(pref, section.inFriendlyConfig);
foundit = true;
return false; // break
});
if (foundit) {
return false; // break
}
});
return false; // stop link from scrolling page
};
Twinkle.config.resetPref = function twinkleconfigResetPref(pref, inFriendlyConfig) {
switch (pref.type) {
case "boolean":
document.getElementById(pref.name).checked = (inFriendlyConfig ?
Twinkle.defaultConfig.friendly[pref.name] : Twinkle.defaultConfig.twinkle[pref.name]);
break;
case "string":
case "integer":
case "enum":
document.getElementById(pref.name).value = (inFriendlyConfig ?
Twinkle.defaultConfig.friendly[pref.name] : Twinkle.defaultConfig.twinkle[pref.name]);
break;
case "set":
$.each(pref.setValues, function(itemkey, itemvalue) {
if (document.getElementById(pref.name + "_" + itemkey)) {
document.getElementById(pref.name + "_" + itemkey).checked = ((inFriendlyConfig ?
Twinkle.defaultConfig.friendly[pref.name] : Twinkle.defaultConfig.twinkle[pref.name]).indexOf(itemkey) !== -1);
}
});
break;
case "customList":
$(document.getElementById(pref.name)).data("value", (inFriendlyConfig ?
Twinkle.defaultConfig.friendly[pref.name] : Twinkle.defaultConfig.twinkle[pref.name]));
break;
default:
alert("twinkleconfig: unknown data type for preference " + pref.name);
break;
}
};
Twinkle.config.resetAllPrefs = function twinkleconfigResetAllPrefs() {
// no confirmation message - the user can just refresh/close the page to abort
$(Twinkle.config.sections).each(function(sectionkey, section) {
if (section.hidden || (section.adminOnly && !Morebits.userIsInGroup("sysop"))) {
return true; // continue: skip impossibilities
}
$(section.preferences).each(function(prefkey, pref) {
if (!pref.adminOnly || Morebits.userIsInGroup("sysop")) {
Twinkle.config.resetPref(pref, section.inFriendlyConfig);
}
});
return true;
});
return false; // stop link from scrolling page
};
Twinkle.config.save = function twinkleconfigSave(e) {
Morebits.status.init( document.getElementById("twinkle-config-content") );
Morebits.wiki.actionCompleted.notice = "Save";
var userjs = mw.config.get("wgFormattedNamespaces")[mw.config.get("wgNamespaceIds").user] + ":" + mw.config.get("wgUserName") + "/twinkleoptions.js";
var wikipedia_page = new Morebits.wiki.page(userjs, "Saving preferences to " + userjs);
wikipedia_page.setCallbackParameters(e.target);
wikipedia_page.load(Twinkle.config.writePrefs);
return false;
};
// The JSON stringify method in the following code was excerpted from
// http://www.JSON.org/json2.js
// version of 2011-02-23
// Douglas Crockford, the code's author, has released it into the Public Domain.
// See http://www.JSON.org/js.html
var JSON;
if (!JSON) {
JSON = {};
}
(function() {
var escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
gap,
indent = ' ', // hardcoded indent
meta = { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\' };
function quote(string) {
escapable.lastIndex = 0;
return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
var c = meta[a];
return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
}) + '"' : '"' + string + '"';
}
function str(key, holder) {
var i, k, v, length, mind = gap, partial, value = holder[key];
if (value && typeof value === 'object' && $.isFunction(value.toJSON)) {
value = value.toJSON(key);
}
switch (typeof value) {
case 'string':
return quote(value);
case 'number':
return isFinite(value) ? String(value) : 'null';
case 'boolean':
case 'null':
return String(value);
case 'object':
if (!value) {
return 'null';
}
gap += indent;
partial = [];
if ($.isArray(value)) {
length = value.length;
for (i = 0; i < length; ++i) {
partial[i] = str(i, value) || 'null';
}
v = partial.length === 0 ? '[]' : gap ?
'[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
'[' + partial.join(',') + ']';
gap = mind;
return v;
}
for (k in value) {
if (Object.prototype.hasOwnProperty.call(value, k)) {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
v = partial.length === 0 ? '{}' : gap ?
'{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
'{' + partial.join(',') + '}';
gap = mind;
return v;
default:
throw new Error( "JSON.stringify: unknown data type" );
}
}
if (!$.isFunction(JSON.stringify)) {
JSON.stringify = function (value, ignoredParam1, ignoredParam2) {
ignoredParam1 = ignoredParam2; // boredom
gap = '';
return str('', {'': value});
};
}
}());
Twinkle.config.writePrefs = function twinkleconfigWritePrefs(pageobj) {
var form = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
// this is the object which gets serialized into JSON
var newConfig = {
twinkle: {},
friendly: {}
};
// keeping track of all preferences that we encounter
// any others that are set in the user's current config are kept
// this way, preferences that this script doesn't know about are not lost
// (it does mean obsolete prefs will never go away, but... ah well...)
var foundTwinklePrefs = [], foundFriendlyPrefs = [];
// a comparison function is needed later on
// it is just enough for our purposes (i.e. comparing strings, numbers, booleans,
// arrays of strings, and arrays of { value, label })
// and it is not very robust: e.g. compare([2], ["2"]) === true, and
// compare({}, {}) === false, but it's good enough for our purposes here
var compare = function(a, b) {
if ($.isArray(a)) {
if (a.length !== b.length) {
return false;
}
var asort = a.sort(), bsort = b.sort();
for (var i = 0; asort[i]; ++i) {
// comparison of the two properties of custom lists
if ((typeof asort[i] === "object") && (asort[i].label !== bsort[i].label ||
asort[i].value !== bsort[i].value)) {
return false;
} else if (asort[i].toString() !== bsort[i].toString()) {
return false;
}
}
return true;
} else {
return a === b;
}
};
$(Twinkle.config.sections).each(function(sectionkey, section) {
if (section.adminOnly && !Morebits.userIsInGroup("sysop")) {
return; // i.e. "continue" in this context
}
// reach each of the preferences from the form
$(section.preferences).each(function(prefkey, pref) {
var userValue; // = undefined
// only read form values for those prefs that have them
if (!section.hidden && (!pref.adminOnly || Morebits.userIsInGroup("sysop"))) {
switch (pref.type) {
case "boolean": // read from the checkbox
userValue = form[pref.name].checked;
break;
case "string": // read from the input box or combo box
case "enum":
userValue = form[pref.name].value;
break;
case "integer": // read from the input box
userValue = parseInt(form[pref.name].value, 10);
if (isNaN(userValue)) {
Morebits.status.warn("Saving", "The value you specified for " + pref.name + " (" + pref.value + ") was invalid. The save will continue, but the invalid data value will be skipped.");
userValue = null;
}
break;
case "set": // read from the set of check boxes
userValue = [];
if (pref.setDisplayOrder) {
// read only those keys specified in the display order
$.each(pref.setDisplayOrder, function(itemkey, item) {
if (form[pref.name + "_" + item].checked) {
userValue.push(item);
}
});
} else {
// read all the keys in the list of values
$.each(pref.setValues, function(itemkey, itemvalue) {
if (form[pref.name + "_" + itemkey].checked) {
userValue.push(itemkey);
}
});
}
break;
case "customList": // read from the jQuery data stored on the button object
userValue = $(form[pref.name]).data("value");
break;
default:
alert("twinkleconfig: unknown data type for preference " + pref.name);
break;
}
}
// only save those preferences that are *different* from the default
if (section.inFriendlyConfig) {
if (userValue !== undefined && !compare(userValue, Twinkle.defaultConfig.friendly[pref.name])) {
newConfig.friendly[pref.name] = userValue;
}
foundFriendlyPrefs.push(pref.name);
} else {
if (userValue !== undefined && !compare(userValue, Twinkle.defaultConfig.twinkle[pref.name])) {
newConfig.twinkle[pref.name] = userValue;
}
foundTwinklePrefs.push(pref.name);
}
});
});
if (Twinkle.prefs) {
$.each(Twinkle.prefs.twinkle, function(tkey, tvalue) {
if (foundTwinklePrefs.indexOf(tkey) === -1) {
newConfig.twinkle[tkey] = tvalue;
}
});
$.each(Twinkle.prefs.friendly, function(fkey, fvalue) {
if (foundFriendlyPrefs.indexOf(fkey) === -1) {
newConfig.friendly[fkey] = fvalue;
}
});
}
var text =
"// twinkleoptions.js: personal Twinkle preferences file\n" +
"//\n" +
"// NOTE: The easiest way to change your Twinkle preferences is by using the\n" +
"// Twinkle preferences panel, at [[" + Morebits.pageNameNorm + "]].\n" +
"//\n" +
"// This file is AUTOMATICALLY GENERATED. Any changes you make (aside from\n" +
"// changing the configuration parameters in a valid-JavaScript way) will be\n" +
"// overwritten the next time you click \"save\" in the Twinkle preferences\n" +
"// panel. If modifying this file, make sure to use correct JavaScript.\n" +
"\n" +
"window.Twinkle.prefs = ";
text += JSON.stringify(newConfig, null, 2);
text +=
";\n" +
"\n" +
"// End of twinkleoptions.js\n";
pageobj.setPageText(text);
pageobj.setEditSummary("Saving Twinkle preferences: automatic edit from [[" + Morebits.pageNameNorm + "]] ([[WP:TW|TW]])");
pageobj.setCreateOption("recreate");
pageobj.save(Twinkle.config.saveSuccess);
};
Twinkle.config.saveSuccess = function twinkleconfigSaveSuccess(pageobj) {
pageobj.getStatusElement().info("successful");
var noticebox = document.createElement("div");
noticebox.className = "successbox";
noticebox.style.fontSize = "100%";
noticebox.style.marginTop = "2em";
noticebox.innerHTML = "<p><b>Your Twinkle preferences have been saved.</b></p><p>To see the changes, you will need to <b>clear your browser cache entirely</b> (see <a href=\"" + mw.util.getUrl("WP:BYPASS") + "\" title=\"WP:BYPASS\">WP:BYPASS</a> for instructions).</p>";
Morebits.status.root.appendChild(noticebox);
var noticeclear = document.createElement("br");
noticeclear.style.clear = "both";
Morebits.status.root.appendChild(noticeclear);
};
})(jQuery);
//</nowiki>
43f8245631418a51c775be09f3d994f7843290b3
335
2013-12-20T09:16:51Z
Amalthea
0
v2.0-673-g489663a: tag: Remove {{orphan}}; Update moment.js to 2.4; Use permalinks for CPAN links; Use https for Wikipedia links; Update jQuery style guideline link; Integrate Draft namespaces; Add page link templates for Draft, TimedText, and Module
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkleconfig.js: Preferences module
****************************************
* Mode of invocation: Adds configuration form to Wikipedia:Twinkle/Preferences and user
subpages named "/Twinkle preferences", and adds ad box to the top of user
subpages belonging to the currently logged-in user which end in '.js'
* Active on: What I just said. Yeah.
* Config directives in: TwinkleConfig
I, [[User:This, that and the other]], originally wrote this. If the code is misbehaving, or you have any
questions, don't hesitate to ask me. (This doesn't at all imply [[WP:OWN]]ership - it's just meant to
point you in the right direction.) -- TTO
*/
Twinkle.config = {};
Twinkle.config.commonEnums = {
watchlist: { yes: "Add to watchlist", no: "Don't add to watchlist", "default": "Follow your site preferences" },
talkPageMode: { window: "In a window, replacing other user talks", tab: "In a new tab", blank: "In a totally new window" }
};
Twinkle.config.commonSets = {
csdCriteria: {
db: "Custom rationale ({{db}})",
g1: "G1", g2: "G2", g3: "G3", g4: "G4", g5: "G5", g6: "G6", g7: "G7", g8: "G8", g10: "G10", g11: "G11", g12: "G12", g13: "G13",
a1: "A1", a2: "A2", a3: "A3", a5: "A5", a7: "A7", a9: "A9", a10: "A10", a11: "A11",
u1: "U1", u2: "U2", u3: "U3",
f1: "F1", f2: "F2", f3: "F3", f7: "F7", f8: "F8", f9: "F9", f10: "F10",
c1: "C1",
t2: "T2", t3: "T3",
r2: "R2", r3: "R3",
p1: "P1", p2: "P2"
},
csdCriteriaDisplayOrder: [
"db",
"g1", "g2", "g3", "g4", "g5", "g6", "g7", "g8", "g10", "g11", "g12", "g13",
"a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11",
"u1", "u2", "u3",
"f1", "f2", "f3", "f7", "f8", "f9", "f10",
"c1",
"t2", "t3",
"r2", "r3",
"p1", "p2"
],
csdCriteriaNotification: {
db: "Custom rationale ({{db}})",
g1: "G1", g2: "G2", g3: "G3", g4: "G4", g6: 'G6 ("unnecessary disambig." and "copy-paste move" only)',
g10: "G10", g11: "G11", g12: "G12", g13: "G13",
a1: "A1", a2: "A2", a3: "A3", a5: "A5", a7: "A7", a9: "A9", a10: "A10", a11: "A11",
u3: "U3",
f1: "F1", f2: "F2", f3: "F3", f7: "F7", f8: "F8", f9: "F9", f10: "F10",
c1: "C1",
t2: "T2", t3: "T3",
r2: "R2", r3: "R3",
p1: "P1", p2: "P2"
},
csdCriteriaNotificationDisplayOrder: [
"db",
"g1", "g2", "g3", "g4", "g6", "g10", "g11", "g12", "g13",
"a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11",
"u3",
"f1", "f2", "f3", "f7", "f9", "f10",
"c1",
"t2", "t3",
"r2", "r3",
"p1", "p2"
],
csdAndDICriteria: {
db: "Custom rationale ({{db}})",
g1: "G1", g2: "G2", g3: "G3", g4: "G4", g5: "G5", g6: "G6", g7: "G7", g8: "G8", g10: "G10", g11: "G11", g12: "G12", g13: "G13",
a1: "A1", a2: "A2", a3: "A3", a5: "A5", a7: "A7", a9: "A9", a10: "A10", a11: "A11",
u1: "U1", u2: "U2", u3: "U3",
f1: "F1", f2: "F2", f3: "F3", f4: "F4", f5: "F5", f6: "F6", f7: "F7", f8: "F8", f9: "F9", f10: "F10", f11: "F11",
c1: "C1",
t2: "T2", t3: "T3",
r2: "R2", r3: "R3",
p1: "P1", p2: "P2"
},
csdAndDICriteriaDisplayOrder: [
"db",
"g1", "g2", "g3", "g4", "g5", "g6", "g7", "g8", "g10", "g11", "g12", "g13",
"a1", "a2", "a3", "a5", "a7", "a9", "a10", "a11",
"u1", "u2", "u3",
"f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "f10", "f11",
"c1",
"t2", "t3",
"r2", "r3",
"p1", "p2"
],
namespacesNoSpecial: {
"0": "Article",
"1": "Talk (article)",
"2": "User",
"3": "User talk",
"4": "Wikipedia",
"5": "Wikipedia talk",
"6": "File",
"7": "File talk",
"8": "MediaWiki",
"9": "MediaWiki talk",
"10": "Template",
"11": "Template talk",
"12": "Help",
"13": "Help talk",
"14": "Category",
"15": "Category talk",
"100": "Portal",
"101": "Portal talk",
"108": "Book",
"109": "Book talk",
"118": "Draft",
"119": "Draft talk",
"710": "TimedText",
"711": "TimedText talk",
"828": "Module",
"829": "Module talk"
}
};
/**
* Section entry format:
*
* {
* title: <human-readable section title>,
* adminOnly: <true for admin-only sections>,
* hidden: <true for advanced preferences that rarely need to be changed - they can still be modified by manually editing twinkleoptions.js>,
* inFriendlyConfig: <true for preferences located under FriendlyConfig rather than TwinkleConfig>,
* preferences: [
* {
* name: <TwinkleConfig property name>,
* label: <human-readable short description - used as a form label>,
* helptip: <(optional) human-readable text (using valid HTML) that complements the description, like limits, warnings, etc.>
* adminOnly: <true for admin-only preferences>,
* type: <string|boolean|integer|enum|set|customList> (customList stores an array of JSON objects { value, label }),
* enumValues: <for type = "enum": a JSON object where the keys are the internal names and the values are human-readable strings>,
* setValues: <for type = "set": a JSON object where the keys are the internal names and the values are human-readable strings>,
* setDisplayOrder: <(optional) for type = "set": an array containing the keys of setValues (as strings) in the order that they are displayed>,
* customListValueTitle: <for type = "customList": the heading for the left "value" column in the custom list editor>,
* customListLabelTitle: <for type = "customList": the heading for the right "label" column in the custom list editor>
* },
* . . .
* ]
* },
* . . .
*
*/
Twinkle.config.sections = [
{
title: "General",
preferences: [
// TwinkleConfig.summaryAd (string)
// Text to be appended to the edit summary of edits made using Twinkle
{
name: "summaryAd",
label: "\"Ad\" to be appended to Twinkle's edit summaries",
helptip: "The summary ad should start with a space, and be kept short.",
type: "string"
},
// TwinkleConfig.deletionSummaryAd (string)
// Text to be appended to the edit summary of deletions made using Twinkle
{
name: "deletionSummaryAd",
label: "Summary ad to use for deletion summaries",
helptip: "Normally the same as the edit summary ad above.",
adminOnly: true,
type: "string"
},
// TwinkleConfig.protectionSummaryAd (string)
// Text to be appended to the edit summary of page protections made using Twinkle
{
name: "protectionSummaryAd",
label: "Summary ad to use for page protections",
helptip: "Normally the same as the edit summary ad above.",
adminOnly: true,
type: "string"
},
// TwinkleConfig.userTalkPageMode may take arguments:
// 'window': open a new window, remember the opened window
// 'tab': opens in a new tab, if possible.
// 'blank': force open in a new window, even if such a window exists
{
name: "userTalkPageMode",
label: "When opening a user talk page, open it",
type: "enum",
enumValues: Twinkle.config.commonEnums.talkPageMode
},
// TwinkleConfig.dialogLargeFont (boolean)
{
name: "dialogLargeFont",
label: "Use larger text in Twinkle dialogs",
type: "boolean"
}
]
},
{
title: "ARV",
preferences: [
{
name: "spiWatchReport",
label: "Add sockpuppet report pages to watchlist",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
}
]
},
{
title: "Image deletion (DI)",
preferences: [
// TwinkleConfig.notifyUserOnDeli (boolean)
// If the user should be notified after placing a file deletion tag
{
name: "notifyUserOnDeli",
label: "Check the \"notify initial uploader\" box by default",
type: "boolean"
},
// TwinkleConfig.deliWatchPage (string)
// The watchlist setting of the page tagged for deletion. Either "yes", "no", or "default". Default is "default" (Duh).
{
name: "deliWatchPage",
label: "Add image page to watchlist when tagging",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
},
// TwinkleConfig.deliWatchUser (string)
// The watchlist setting of the user talk page if a notification is placed. Either "yes", "no", or "default". Default is "default" (Duh).
{
name: "deliWatchUser",
label: "Add user talk page of initial uploader to watchlist when notifying",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
}
]
},
{
title: "Proposed deletion (PROD)",
preferences: [
// TwinkleConfig.watchProdPages (boolean)
// If, when applying prod template to page, to watch the page
{
name: "watchProdPages",
label: "Add article to watchlist when tagging",
type: "boolean"
},
// TwinkleConfig.prodReasonDefault (string)
// The prefilled PROD reason.
{
name: "prodReasonDefault",
label: "Prefilled PROD reason",
type: "string"
},
{
name: "logProdPages",
label: "Keep a log in userspace of all pages you tag for PROD",
helptip: "Since non-admins do not have access to their deleted contributions, the userspace log offers a good way to keep track of all pages you tag for PROD using Twinkle.",
type: "boolean"
},
{
name: "prodLogPageName",
label: "Keep the PROD userspace log at this user subpage",
helptip: "Enter a subpage name in this box. You will find your PROD log at User:<i>username</i>/<i>subpage name</i>. Only works if you turn on the PROD userspace log.",
type: "string"
}
]
},
{
title: "Revert and rollback", // twinklefluff module
preferences: [
// TwinkleConfig.openTalkPage (array)
// What types of actions that should result in opening of talk page
{
name: "openTalkPage",
label: "Open user talk page after these types of reversions",
type: "set",
setValues: { agf: "AGF rollback", norm: "Normal rollback", vand: "Vandalism rollback", torev: "\"Restore this version\"" }
},
// TwinkleConfig.openTalkPageOnAutoRevert (bool)
// Defines if talk page should be opened when calling revert from contrib page, because from there, actions may be multiple, and opening talk page not suitable. If set to true, openTalkPage defines then if talk page will be opened.
{
name: "openTalkPageOnAutoRevert",
label: "Open user talk page when invoking rollback from user contributions",
helptip: "Often, you may be rolling back many pages at a time from a vandal's contributions page, so it would be unsuitable to open the user talk page. Hence, this option is off by default. When this is on, the desired options must be enabled in the previous setting for this to work.",
type: "boolean"
},
// TwinkleConfig.markRevertedPagesAsMinor (array)
// What types of actions that should result in marking edit as minor
{
name: "markRevertedPagesAsMinor",
label: "Mark as minor edit for these types of reversions",
type: "set",
setValues: { agf: "AGF rollback", norm: "Normal rollback", vand: "Vandalism rollback", torev: "\"Restore this version\"" }
},
// TwinkleConfig.watchRevertedPages (array)
// What types of actions that should result in forced addition to watchlist
{
name: "watchRevertedPages",
label: "Add pages to watchlist for these types of reversions",
type: "set",
setValues: { agf: "AGF rollback", norm: "Normal rollback", vand: "Vandalism rollback", torev: "\"Restore this version\"" }
},
// TwinkleConfig.offerReasonOnNormalRevert (boolean)
// If to offer a prompt for extra summary reason for normal reverts, default to true
{
name: "offerReasonOnNormalRevert",
label: "Prompt for reason for normal rollbacks",
helptip: "\"Normal\" rollbacks are the ones that are invoked from the middle [rollback] link.",
type: "boolean"
},
{
name: "confirmOnFluff",
label: "Provide a confirmation message before reverting",
helptip: "For users of pen or touch devices, and chronically indecisive people.",
type: "boolean"
},
// TwinkleConfig.showRollbackLinks (array)
// Where Twinkle should show rollback links (diff, others, mine, contribs)
// Note from TTO: |contribs| seems to be equal to |others| + |mine|, i.e. redundant, so I left it out heres
{
name: "showRollbackLinks",
label: "Show rollback links on these pages",
type: "set",
setValues: { diff: "Diff pages", others: "Contributions pages of other users", mine: "My contributions page" }
}
]
},
{
title: "Shared IP tagging",
inFriendlyConfig: true,
preferences: [
{
name: "markSharedIPAsMinor",
label: "Mark shared IP tagging as a minor edit",
type: "boolean"
}
]
},
{
title: "Speedy deletion (CSD)",
preferences: [
{
name: "speedySelectionStyle",
label: "When to go ahead and tag/delete the page",
type: "enum",
enumValues: { "buttonClick": 'When I click "Submit"', "radioClick": "As soon as I click an option" }
},
// TwinkleConfig.watchSpeedyPages (array)
// Whether to add speedy tagged pages to watchlist
{
name: "watchSpeedyPages",
label: "Add page to watchlist when tagging with these criteria",
type: "set",
setValues: Twinkle.config.commonSets.csdCriteria,
setDisplayOrder: Twinkle.config.commonSets.csdCriteriaDisplayOrder
},
// TwinkleConfig.markSpeedyPagesAsPatrolled (boolean)
// If, when applying speedy template to page, to mark the page as patrolled (if the page was reached from NewPages)
{
name: "markSpeedyPagesAsPatrolled",
label: "Mark page as patrolled when tagging (if possible)",
helptip: "Due to technical limitations, pages are only marked as patrolled when they are reached via Special:NewPages.",
type: "boolean"
},
// TwinkleConfig.notifyUserOnSpeedyDeletionNomination (array)
// What types of actions should result that the author of the page being notified of nomination
{
name: "notifyUserOnSpeedyDeletionNomination",
label: "Notify page creator only when tagging with these criteria",
helptip: "Even if you choose to notify from the CSD screen, the notification will only take place for those criteria selected here.",
type: "set",
setValues: Twinkle.config.commonSets.csdCriteriaNotification,
setDisplayOrder: Twinkle.config.commonSets.csdCriteriaNotificationDisplayOrder
},
// TwinkleConfig.welcomeUserOnSpeedyDeletionNotification (array of strings)
// On what types of speedy deletion notifications shall the user be welcomed
// with a "firstarticle" notice if his talk page has not yet been created.
{
name: "welcomeUserOnSpeedyDeletionNotification",
label: "Welcome page creator alongside notification when tagging with these criteria",
helptip: "The welcome is issued only if the user is notified about the deletion, and only if their talk page does not already exist. The template used is {{firstarticle}}.",
type: "set",
setValues: Twinkle.config.commonSets.csdCriteriaNotification,
setDisplayOrder: Twinkle.config.commonSets.csdCriteriaNotificationDisplayOrder
},
// TwinkleConfig.promptForSpeedyDeletionSummary (array of strings)
{
name: "promptForSpeedyDeletionSummary",
label: "Allow editing of deletion summary when deleting under these criteria",
adminOnly: true,
type: "set",
setValues: Twinkle.config.commonSets.csdAndDICriteria,
setDisplayOrder: Twinkle.config.commonSets.csdAndDICriteriaDisplayOrder
},
// TwinkleConfig.openUserTalkPageOnSpeedyDelete (array of strings)
// What types of actions that should result user talk page to be opened when speedily deleting (admin only)
{
name: "openUserTalkPageOnSpeedyDelete",
label: "Open user talk page when deleting under these criteria",
adminOnly: true,
type: "set",
setValues: Twinkle.config.commonSets.csdAndDICriteria,
setDisplayOrder: Twinkle.config.commonSets.csdAndDICriteriaDisplayOrder
},
// TwinkleConfig.deleteTalkPageOnDelete (boolean)
// If talk page if exists should also be deleted (CSD G8) when spedying a page (admin only)
{
name: "deleteTalkPageOnDelete",
label: "Check the \"also delete talk page\" box by default",
adminOnly: true,
type: "boolean"
},
{
name: "deleteRedirectsOnDelete",
label: "Check the \"also delete redirects\" box by default",
adminOnly: true,
type: "boolean"
},
// TwinkleConfig.deleteSysopDefaultToTag (boolean)
// Make the CSD screen default to "tag" instead of "delete" (admin only)
{
name: "deleteSysopDefaultToTag",
label: "Default to speedy tagging instead of outright deletion",
adminOnly: true,
type: "boolean"
},
// TwinkleConfig.speedyWindowWidth (integer)
// Defines the width of the Twinkle SD window in pixels
{
name: "speedyWindowWidth",
label: "Width of speedy deletion window (pixels)",
type: "integer"
},
// TwinkleConfig.speedyWindowWidth (integer)
// Defines the width of the Twinkle SD window in pixels
{
name: "speedyWindowHeight",
label: "Height of speedy deletion window (pixels)",
helptip: "If you have a big monitor, you might like to increase this.",
type: "integer"
},
{
name: "logSpeedyNominations",
label: "Keep a log in userspace of all CSD nominations",
helptip: "Since non-admins do not have access to their deleted contributions, the userspace log offers a good way to keep track of all pages you nominate for CSD using Twinkle. Files tagged using DI are also added to this log.",
type: "boolean"
},
{
name: "speedyLogPageName",
label: "Keep the CSD userspace log at this user subpage",
helptip: "Enter a subpage name in this box. You will find your CSD log at User:<i>username</i>/<i>subpage name</i>. Only works if you turn on the CSD userspace log.",
type: "string"
},
{
name: "noLogOnSpeedyNomination",
label: "Do not create a userspace log entry when tagging with these criteria",
type: "set",
setValues: Twinkle.config.commonSets.csdAndDICriteria,
setDisplayOrder: Twinkle.config.commonSets.csdAndDICriteriaDisplayOrder
}
]
},
{
title: "Tag",
inFriendlyConfig: true,
preferences: [
{
name: "watchTaggedPages",
label: "Add page to watchlist when tagging",
type: "boolean"
},
{
name: "watchMergeDiscussions",
label: "Add talk pages to watchlist when starting merge discussions",
type: "boolean"
},
{
name: "markTaggedPagesAsMinor",
label: "Mark addition of tags as a minor edit",
type: "boolean"
},
{
name: "markTaggedPagesAsPatrolled",
label: "Check the \"mark page as patrolled\" box by default",
type: "boolean"
},
{
name: "groupByDefault",
label: "Check the \"group into {{multiple issues}}\" box by default",
type: "boolean"
},
{
name: "tagArticleSortOrder",
label: "Default view order for article tags",
type: "enum",
enumValues: { "cat": "By categories", "alpha": "In alphabetical order" }
},
{
name: "customTagList",
label: "Custom article maintenance tags to display",
helptip: "These appear as additional options at the bottom of the list of tags. For example, you could add new maintenance tags which have not yet been added to Twinkle's defaults.",
type: "customList",
customListValueTitle: "Template name (no curly brackets)",
customListLabelTitle: "Text to show in Tag dialog"
}
]
},
{
title: "Talkback",
inFriendlyConfig: true,
preferences: [
{
name: "markTalkbackAsMinor",
label: "Mark talkbacks as minor edits",
type: "boolean"
},
{
name: "insertTalkbackSignature",
label: "Insert signature within talkbacks",
type: "boolean"
},
{
name: "talkbackHeading",
label: "Section heading to use for talkbacks",
type: "string"
},
{
name: "adminNoticeHeading",
label: "Section heading to use for administrators' noticeboard notices",
helptip: "Only relevant for AN and ANI.",
type: "string"
},
{
name: "mailHeading",
label: "Section heading to use for \"you've got mail\" notices",
type: "string"
}
]
},
{
title: "Unlink",
preferences: [
// TwinkleConfig.unlinkNamespaces (array)
// In what namespaces unlink should happen, default in 0 (article) and 100 (portal)
{
name: "unlinkNamespaces",
label: "Remove links from pages in these namespaces",
helptip: "Avoid selecting any talk namespaces, as Twinkle might end up unlinking on talk archives (a big no-no).",
type: "set",
setValues: Twinkle.config.commonSets.namespacesNoSpecial
}
]
},
{
title: "Warn user",
preferences: [
// TwinkleConfig.defaultWarningGroup (int)
// if true, watch the page which has been dispatched an warning or notice, if false, default applies
{
name: "defaultWarningGroup",
label: "Default warning level",
type: "enum",
enumValues: {
"1": "Level 1",
"2": "Level 2",
"3": "Level 3",
"4": "Level 4",
"5": "Level 4im",
"6": "Single-issue notices",
"7": "Single-issue warnings",
"9": "Custom warnings",
"8": "Block (admin only)"
}
},
// TwinkleConfig.showSharedIPNotice may take arguments:
// true: to show shared ip notice if an IP address
// false: to not print the notice
{
name: "showSharedIPNotice",
label: "Add extra notice on shared IP talk pages",
helptip: "Notice used is {{SharedIPAdvice}}",
type: "boolean"
},
// TwinkleConfig.watchWarnings (boolean)
// if true, watch the page which has been dispatched an warning or notice, if false, default applies
{
name: "watchWarnings",
label: "Add user talk page to watchlist when notifying",
type: "boolean"
},
// TwinkleConfig.blankTalkpageOnIndefBlock (boolean)
// if true, blank the talk page when issuing an indef block notice (per [[WP:UW#Indefinitely blocked users]])
{
name: "blankTalkpageOnIndefBlock",
label: "Blank the talk page when indefinitely blocking users",
helptip: "See <a href=\"" + mw.util.getUrl("WP:UW#Indefinitely blocked users") + "\">WP:UW</a> for more information.",
adminOnly: true,
type: "boolean"
},
{
name: "customWarningList",
label: "Custom warning templates to display",
helptip: "You can add individual templates or user subpages. Custom warnings appear in the \"Custom warnings\" category within the warning dialog box.",
type: "customList",
customListValueTitle: "Template name (no curly brackets)",
customListLabelTitle: "Text to show in warning list (also used as edit summary)"
}
]
},
{
title: "Welcome user",
inFriendlyConfig: true,
preferences: [
{
name: "topWelcomes",
label: "Place welcomes above existing content on user talk pages",
type: "boolean"
},
{
name: "watchWelcomes",
label: "Add user talk pages to watchlist when welcoming",
helptip: "Doing so adds to the personal element of welcoming a user - you will be able to see how they are coping as a newbie, and possibly help them.",
type: "boolean"
},
{
name: "insertUsername",
label: "Add your username to the template (where applicable)",
helptip: "Some welcome templates have an opening sentence like \"Hi, I'm <username>. Welcome\" etc. If you turn off this option, these templates will not display your username in that way.",
type: "boolean"
},
{
name: "quickWelcomeMode",
label: "Clicking the \"welcome\" link on a diff page will",
helptip: "If you choose to welcome automatically, the template you specify below will be used.",
type: "enum",
enumValues: { auto: "welcome automatically", norm: "prompt you to select a template" }
},
{
name: "quickWelcomeTemplate",
label: "Template to use when welcoming automatically",
helptip: "Enter the name of a welcome template, without the curly brackets. A link to the given article will be added.",
type: "string"
},
{
name: "customWelcomeList",
label: "Custom welcome templates to display",
helptip: "You can add other welcome templates, or user subpages that are welcome templates (prefixed with \"User:\"). Don't forget that these templates are substituted onto user talk pages.",
type: "customList",
customListValueTitle: "Template name (no curly brackets)",
customListLabelTitle: "Text to show in Welcome dialog"
},
{
name: "customWelcomeSignature",
label: "Automatically sign custom welcome templates",
helptip: "If your custom welcome templates contain a built-in signature within the template, turn off this option.",
type: "boolean"
}
]
},
{
title: "XFD (deletion discussions)",
preferences: [
// TwinkleConfig.xfdWatchPage (string)
// The watchlist setting of the page being nominated for XfD. Either "yes" (add to watchlist), "no" (don't
// add to watchlist), or "default" (use setting from preferences). Default is "default" (duh).
{
name: "xfdWatchPage",
label: "Add the nominated page to watchlist",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
},
// TwinkleConfig.xfdWatchDiscussion (string)
// The watchlist setting of the newly created XfD page (for those processes that create discussion pages for each nomination),
// or the list page for the other processes.
// Either "yes" (add to watchlist), "no" (don't add to watchlist), or "default" (use setting from preferences). Default is "default" (duh).
{
name: "xfdWatchDiscussion",
label: "Add the deletion discussion page to watchlist",
helptip: "This refers to the discussion subpage (for AfD and MfD) or the daily log page (for TfD, CfD, RfD and FfD)",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
},
// TwinkleConfig.xfdWatchList (string)
// The watchlist setting of the XfD list page, *if* the discussion is on a separate page. Either "yes" (add to watchlist), "no" (don't
// add to watchlist), or "default" (use setting from preferences). Default is "no" (Hehe. Seriously though, who wants to watch it?
// Sorry in advance for any false positives.).
{
name: "xfdWatchList",
label: "Add the daily log/list page to the watchlist (where applicable)",
helptip: "This only applies for AfD and MfD, where the discussions are transcluded onto a daily log page (for AfD) or the main MfD page (for MfD).",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
},
// TwinkleConfig.xfdWatchUser (string)
// The watchlist setting of the user if he receives a notification. Either "yes" (add to watchlist), "no" (don't
// add to watchlist), or "default" (use setting from preferences). Default is "default" (duh).
{
name: "xfdWatchUser",
label: "Add the user talk page to watchlist (when notifying)",
type: "enum",
enumValues: Twinkle.config.commonEnums.watchlist
}
]
},
{
title: "Hidden",
hidden: true,
preferences: [
// twinkle.header.js: portlet setup
{
name: "portletArea",
type: "string"
},
{
name: "portletId",
type: "string"
},
{
name: "portletName",
type: "string"
},
{
name: "portletType",
type: "string"
},
{
name: "portletNext",
type: "string"
},
// twinklefluff.js: defines how many revision to query maximum, maximum possible is 50, default is 50
{
name: "revertMaxRevisions",
type: "integer"
},
// twinklebatchdelete.js: How many pages should be processed at a time
{
name: "batchdeleteChunks",
type: "integer"
},
// twinklebatchdelete.js: How many pages left in the process of being completed should allow a new batch to be initialized
{
name: "batchDeleteMinCutOff",
type: "integer"
},
// twinklebatchdelete.js: How many pages should be processed maximum
{
name: "batchMax",
type: "integer"
},
// twinklebatchprotect.js: How many pages should be processed at a time
{
name: "batchProtectChunks",
type: "integer"
},
// twinklebatchprotect.js: How many pages left in the process of being completed should allow a new batch to be initialized
{
name: "batchProtectMinCutOff",
type: "integer"
},
// twinklebatchundelete.js: How many pages should be processed at a time
{
name: "batchundeleteChunks",
type: "integer"
},
// twinklebatchundelete.js: How many pages left in the process of being completed should allow a new batch to be initialized
{
name: "batchUndeleteMinCutOff",
type: "integer"
},
// twinkledelimages.js: How many files should be processed at a time
{
name: "deliChunks",
type: "integer"
},
// twinkledelimages.js: How many files should be processed maximum
{
name: "deliMax",
type: "integer"
},
// twinkledeprod.js: How many pages should be processed at a time
{
name: "proddeleteChunks",
type: "integer"
}
]
}
]; // end of Twinkle.config.sections
//{
// name: "",
// label: "",
// type: ""
// },
Twinkle.config.init = function twinkleconfigInit() {
if ((mw.config.get("wgNamespaceNumber") === mw.config.get("wgNamespaceIds").project && mw.config.get("wgTitle") === "Twinkle/Preferences" ||
(mw.config.get("wgNamespaceNumber") === mw.config.get("wgNamespaceIds").user && mw.config.get("wgTitle").lastIndexOf("/Twinkle preferences") === (mw.config.get("wgTitle").length - 20))) &&
mw.config.get("wgAction") === "view") {
// create the config page at Wikipedia:Twinkle/Preferences, and at user subpages (for testing purposes)
if (!document.getElementById("twinkle-config")) {
return; // maybe the page is misconfigured, or something - but any attempt to modify it will be pointless
}
// set style (the url() CSS function doesn't seem to work from wikicode - ?!)
document.getElementById("twinkle-config-titlebar").style.backgroundImage = "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB%2FqqA%2BAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEhQTFRFr73ZobTPusjdsMHZp7nVwtDhzNbnwM3fu8jdq7vUt8nbxtDkw9DhpbfSvMrfssPZqLvVztbno7bRrr7W1d%2Fs1N7qydXk0NjpkW7Q%2BgAAADVJREFUeNoMwgESQCAAAMGLkEIi%2FP%2BnbnbpdB59app5Vdg0sXAoMZCpGoFbK6ciuy6FX4ABAEyoAef0BXOXAAAAAElFTkSuQmCC)";
var contentdiv = document.getElementById("twinkle-config-content");
contentdiv.textContent = ""; // clear children
// let user know about possible conflict with monobook.js/vector.js file
// (settings in that file will still work, but they will be overwritten by twinkleoptions.js settings)
var contentnotice = document.createElement("p");
// I hate innerHTML, but this is one thing it *is* good for...
contentnotice.innerHTML = "<b>Before modifying your preferences here,</b> make sure you have removed any old <code>TwinkleConfig</code> and <code>FriendlyConfig</code> settings from your <a href=\"" + mw.util.getUrl("Special:MyPage/skin.js") + "\" title=\"Special:MyPage/skin.js\">user JavaScript file</a>.";
contentdiv.appendChild(contentnotice);
// look and see if the user does in fact have any old settings in their skin JS file
var skinjs = new Morebits.wiki.page("User:" + mw.config.get("wgUserName") + "/" + mw.config.get("skin") + ".js");
skinjs.setCallbackParameters(contentnotice);
skinjs.load(Twinkle.config.legacyPrefsNotice);
// start a table of contents
var toctable = document.createElement("div");
toctable.className = "toc";
toctable.style.marginLeft = "0.4em";
// create TOC title
var toctitle = document.createElement("div");
toctitle.id = "toctitle";
var toch2 = document.createElement("h2");
toch2.textContent = "Contents ";
toctitle.appendChild(toch2);
// add TOC show/hide link
var toctoggle = document.createElement("span");
toctoggle.className = "toctoggle";
toctoggle.appendChild(document.createTextNode("["));
var toctogglelink = document.createElement("a");
toctogglelink.className = "internal";
toctogglelink.setAttribute("href", "#tw-tocshowhide");
toctogglelink.textContent = "hide";
toctoggle.appendChild(toctogglelink);
toctoggle.appendChild(document.createTextNode("]"));
toctitle.appendChild(toctoggle);
toctable.appendChild(toctitle);
// create item container: this is what we add stuff to
var tocul = document.createElement("ul");
toctogglelink.addEventListener("click", function twinkleconfigTocToggle() {
var $tocul = $(tocul);
$tocul.toggle();
if ($tocul.find(":visible").length) {
toctogglelink.textContent = "hide";
} else {
toctogglelink.textContent = "show";
}
}, false);
toctable.appendChild(tocul);
contentdiv.appendChild(toctable);
var tocnumber = 1;
var contentform = document.createElement("form");
contentform.setAttribute("action", "javascript:void(0)"); // was #tw-save - changed to void(0) to work around Chrome issue
contentform.addEventListener("submit", Twinkle.config.save, true);
contentdiv.appendChild(contentform);
var container = document.createElement("table");
container.style.width = "100%";
contentform.appendChild(container);
$(Twinkle.config.sections).each(function(sectionkey, section) {
if (section.hidden || (section.adminOnly && !Morebits.userIsInGroup("sysop"))) {
return true; // i.e. "continue" in this context
}
var configgetter; // retrieve the live config values
if (section.inFriendlyConfig) {
configgetter = Twinkle.getFriendlyPref;
} else {
configgetter = Twinkle.getPref;
}
// add to TOC
var tocli = document.createElement("li");
tocli.className = "toclevel-1";
var toca = document.createElement("a");
toca.setAttribute("href", "#twinkle-config-section-" + tocnumber.toString());
toca.appendChild(document.createTextNode(section.title));
tocli.appendChild(toca);
tocul.appendChild(tocli);
var row = document.createElement("tr");
var cell = document.createElement("td");
cell.setAttribute("colspan", "3");
var heading = document.createElement("h4");
heading.style.borderBottom = "1px solid gray";
heading.style.marginTop = "0.2em";
heading.id = "twinkle-config-section-" + (tocnumber++).toString();
heading.appendChild(document.createTextNode(section.title));
cell.appendChild(heading);
row.appendChild(cell);
container.appendChild(row);
var rowcount = 1; // for row banding
// add each of the preferences to the form
$(section.preferences).each(function(prefkey, pref) {
if (pref.adminOnly && !Morebits.userIsInGroup("sysop")) {
return true; // i.e. "continue" in this context
}
row = document.createElement("tr");
row.style.marginBottom = "0.2em";
// create odd row banding
if (rowcount++ % 2 === 0) {
row.style.backgroundColor = "rgba(128, 128, 128, 0.1)";
}
cell = document.createElement("td");
var label, input;
switch (pref.type) {
case "boolean": // create a checkbox
cell.setAttribute("colspan", "2");
label = document.createElement("label");
input = document.createElement("input");
input.setAttribute("type", "checkbox");
input.setAttribute("id", pref.name);
input.setAttribute("name", pref.name);
if (configgetter(pref.name) === true) {
input.setAttribute("checked", "checked");
}
label.appendChild(input);
label.appendChild(document.createTextNode(" " + pref.label));
cell.appendChild(label);
break;
case "string": // create an input box
case "integer":
// add label to first column
cell.style.textAlign = "right";
cell.style.paddingRight = "0.5em";
label = document.createElement("label");
label.setAttribute("for", pref.name);
label.appendChild(document.createTextNode(pref.label + ":"));
cell.appendChild(label);
row.appendChild(cell);
// add input box to second column
cell = document.createElement("td");
cell.style.paddingRight = "1em";
input = document.createElement("input");
input.setAttribute("type", "text");
input.setAttribute("id", pref.name);
input.setAttribute("name", pref.name);
if (pref.type === "integer") {
input.setAttribute("size", 6);
input.setAttribute("type", "number");
input.setAttribute("step", "1"); // integers only
}
if (configgetter(pref.name)) {
input.setAttribute("value", configgetter(pref.name));
}
cell.appendChild(input);
break;
case "enum": // create a combo box
// add label to first column
// note: duplicates the code above, under string/integer
cell.style.textAlign = "right";
cell.style.paddingRight = "0.5em";
label = document.createElement("label");
label.setAttribute("for", pref.name);
label.appendChild(document.createTextNode(pref.label + ":"));
cell.appendChild(label);
row.appendChild(cell);
// add input box to second column
cell = document.createElement("td");
cell.style.paddingRight = "1em";
input = document.createElement("select");
input.setAttribute("id", pref.name);
input.setAttribute("name", pref.name);
$.each(pref.enumValues, function(enumvalue, enumdisplay) {
var option = document.createElement("option");
option.setAttribute("value", enumvalue);
if (configgetter(pref.name) === enumvalue) {
option.setAttribute("selected", "selected");
}
option.appendChild(document.createTextNode(enumdisplay));
input.appendChild(option);
});
cell.appendChild(input);
break;
case "set": // create a set of check boxes
// add label first of all
cell.setAttribute("colspan", "2");
label = document.createElement("label"); // not really necessary to use a label element here, but we do it for consistency of styling
label.appendChild(document.createTextNode(pref.label + ":"));
cell.appendChild(label);
var checkdiv = document.createElement("div");
checkdiv.style.paddingLeft = "1em";
var worker = function(itemkey, itemvalue) {
var checklabel = document.createElement("label");
checklabel.style.marginRight = "0.7em";
checklabel.style.display = "inline-block";
var check = document.createElement("input");
check.setAttribute("type", "checkbox");
check.setAttribute("id", pref.name + "_" + itemkey);
check.setAttribute("name", pref.name + "_" + itemkey);
if (configgetter(pref.name) && configgetter(pref.name).indexOf(itemkey) !== -1) {
check.setAttribute("checked", "checked");
}
// cater for legacy integer array values for unlinkNamespaces (this can be removed a few years down the track...)
if (pref.name === "unlinkNamespaces") {
if (configgetter(pref.name) && configgetter(pref.name).indexOf(parseInt(itemkey, 10)) !== -1) {
check.setAttribute("checked", "checked");
}
}
checklabel.appendChild(check);
checklabel.appendChild(document.createTextNode(itemvalue));
checkdiv.appendChild(checklabel);
};
if (pref.setDisplayOrder) {
// add check boxes according to the given display order
$.each(pref.setDisplayOrder, function(itemkey, item) {
worker(item, pref.setValues[item]);
});
} else {
// add check boxes according to the order it gets fed to us (probably strict alphabetical)
$.each(pref.setValues, worker);
}
cell.appendChild(checkdiv);
break;
case "customList":
// add label to first column
cell.style.textAlign = "right";
cell.style.paddingRight = "0.5em";
label = document.createElement("label");
label.setAttribute("for", pref.name);
label.appendChild(document.createTextNode(pref.label + ":"));
cell.appendChild(label);
row.appendChild(cell);
// add button to second column
cell = document.createElement("td");
cell.style.paddingRight = "1em";
var button = document.createElement("button");
button.setAttribute("id", pref.name);
button.setAttribute("name", pref.name);
button.setAttribute("type", "button");
button.addEventListener("click", Twinkle.config.listDialog.display, false);
// use jQuery data on the button to store the current config value
$(button).data({
value: configgetter(pref.name),
pref: pref,
inFriendlyConfig: section.inFriendlyConfig
});
button.appendChild(document.createTextNode("Edit items"));
cell.appendChild(button);
break;
default:
alert("twinkleconfig: unknown data type for preference " + pref.name);
break;
}
row.appendChild(cell);
// add help tip
cell = document.createElement("td");
cell.style.fontSize = "90%";
cell.style.color = "gray";
if (pref.helptip) {
// convert mentions of templates in the helptip to clickable links
cell.innerHTML = pref.helptip.replace(/{{(.+?)}}/g,
'{{<a href="' + mw.util.getUrl("Template:") + '$1" target="_blank">$1</a>}}');
}
// add reset link (custom lists don't need this, as their config value isn't displayed on the form)
if (pref.type !== "customList") {
var resetlink = document.createElement("a");
resetlink.setAttribute("href", "#tw-reset");
resetlink.setAttribute("id", "twinkle-config-reset-" + pref.name);
resetlink.addEventListener("click", Twinkle.config.resetPrefLink, false);
if (resetlink.style.styleFloat) { // IE (inc. IE9)
resetlink.style.styleFloat = "right";
} else { // standards
resetlink.style.cssFloat = "right";
}
resetlink.style.margin = "0 0.6em";
resetlink.appendChild(document.createTextNode("Reset"));
cell.appendChild(resetlink);
}
row.appendChild(cell);
container.appendChild(row);
return true;
});
return true;
});
var footerbox = document.createElement("div");
footerbox.setAttribute("id", "twinkle-config-buttonpane");
footerbox.style.backgroundColor = "#BCCADF";
footerbox.style.padding = "0.5em";
var button = document.createElement("button");
button.setAttribute("id", "twinkle-config-submit");
button.setAttribute("type", "submit");
button.appendChild(document.createTextNode("Save changes"));
footerbox.appendChild(button);
var footerspan = document.createElement("span");
footerspan.className = "plainlinks";
footerspan.style.marginLeft = "2.4em";
footerspan.style.fontSize = "90%";
var footera = document.createElement("a");
footera.setAttribute("href", "#tw-reset-all");
footera.setAttribute("id", "twinkle-config-resetall");
footera.addEventListener("click", Twinkle.config.resetAllPrefs, false);
footera.appendChild(document.createTextNode("Restore defaults"));
footerspan.appendChild(footera);
footerbox.appendChild(footerspan);
contentform.appendChild(footerbox);
// since all the section headers exist now, we can try going to the requested anchor
if (location.hash) {
location.hash = location.hash;
}
} else if (mw.config.get("wgNamespaceNumber") === mw.config.get("wgNamespaceIds").user &&
mw.config.get("wgTitle").indexOf(mw.config.get("wgUserName")) === 0 &&
mw.config.get("wgPageName").slice(-3) === ".js") {
var box = document.createElement("div");
box.setAttribute("id", "twinkle-config-headerbox");
box.style.border = "1px #f60 solid";
box.style.background = "#fed";
box.style.padding = "0.6em";
box.style.margin = "0.5em auto";
box.style.textAlign = "center";
var link,
scriptPageName = mw.config.get("wgPageName").slice(mw.config.get("wgPageName").lastIndexOf("/") + 1,
mw.config.get("wgPageName").lastIndexOf(".js"));
if (scriptPageName === "twinkleoptions") {
// place "why not try the preference panel" notice
box.style.fontWeight = "bold";
box.style.width = "80%";
box.style.borderWidth = "2px";
if (mw.config.get("wgArticleId") > 0) { // page exists
box.appendChild(document.createTextNode("This page contains your Twinkle preferences. You can change them using the "));
} else { // page does not exist
box.appendChild(document.createTextNode("You can customize Twinkle to suit your preferences by using the "));
}
link = document.createElement("a");
link.setAttribute("href", mw.util.getUrl(mw.config.get("wgFormattedNamespaces")[mw.config.get("wgNamespaceIds").project] + ":Twinkle/Preferences") );
link.appendChild(document.createTextNode("Twinkle preferences panel"));
box.appendChild(link);
box.appendChild(document.createTextNode(", or by editing this page."));
$(box).insertAfter($("#contentSub"));
} else if (["monobook", "vector", "cologneblue", "modern", "common"].indexOf(scriptPageName) !== -1) {
// place "Looking for Twinkle options?" notice
box.style.width = "60%";
box.appendChild(document.createTextNode("If you want to set Twinkle preferences, you can use the "));
link = document.createElement("a");
link.setAttribute("href", mw.util.getUrl(mw.config.get("wgFormattedNamespaces")[mw.config.get("wgNamespaceIds").project] + ":Twinkle/Preferences") );
link.appendChild(document.createTextNode("Twinkle preferences panel"));
box.appendChild(link);
box.appendChild(document.createTextNode("."));
$(box).insertAfter($("#contentSub"));
}
}
};
// Morebits.wiki.page callback from init code
Twinkle.config.legacyPrefsNotice = function twinkleconfigLegacyPrefsNotice(pageobj) {
var text = pageobj.getPageText();
var contentnotice = pageobj.getCallbackParameters();
if (text.indexOf("TwinkleConfig") !== -1 || text.indexOf("FriendlyConfig") !== -1) {
contentnotice.innerHTML = '<table class="plainlinks ombox ombox-content"><tr><td class="mbox-image">' +
'<img alt="" src="http://upload.wikimedia.org/wikipedia/en/3/38/Imbox_content.png" /></td>' +
'<td class="mbox-text"><p><big><b>Before modifying your settings here,</b> you must remove your old Twinkle and Friendly settings from your personal skin JavaScript.</big></p>' +
'<p>To do this, you can <a href="' + mw.config.get("wgScript") + '?title=User:' + encodeURIComponent(mw.config.get("wgUserName")) + '/' + mw.config.get("skin") + '.js&action=edit" target="_blank"><b>edit your personal JavaScript</b></a>, removing all lines of code that refer to <code>TwinkleConfig</code> and <code>FriendlyConfig</code>.</p>' +
'</td></tr></table>';
} else {
$(contentnotice).remove();
}
};
// custom list-related stuff
Twinkle.config.listDialog = {};
Twinkle.config.listDialog.addRow = function twinkleconfigListDialogAddRow(dlgtable, value, label) {
var contenttr = document.createElement("tr");
// "remove" button
var contenttd = document.createElement("td");
var removeButton = document.createElement("button");
removeButton.setAttribute("type", "button");
removeButton.addEventListener("click", function() { $(contenttr).remove(); }, false);
removeButton.textContent = "Remove";
contenttd.appendChild(removeButton);
contenttr.appendChild(contenttd);
// value input box
contenttd = document.createElement("td");
var input = document.createElement("input");
input.setAttribute("type", "text");
input.className = "twinkle-config-customlist-value";
input.style.width = "97%";
if (value) {
input.setAttribute("value", value);
}
contenttd.appendChild(input);
contenttr.appendChild(contenttd);
// label input box
contenttd = document.createElement("td");
input = document.createElement("input");
input.setAttribute("type", "text");
input.className = "twinkle-config-customlist-label";
input.style.width = "98%";
if (label) {
input.setAttribute("value", label);
}
contenttd.appendChild(input);
contenttr.appendChild(contenttd);
dlgtable.appendChild(contenttr);
};
Twinkle.config.listDialog.display = function twinkleconfigListDialogDisplay(e) {
var $prefbutton = $(e.target);
var curvalue = $prefbutton.data("value");
var curpref = $prefbutton.data("pref");
var dialog = new Morebits.simpleWindow(720, 400);
dialog.setTitle(curpref.label);
dialog.setScriptName("Twinkle preferences");
var dialogcontent = document.createElement("div");
var dlgtable = document.createElement("table");
dlgtable.className = "wikitable";
dlgtable.style.margin = "1.4em 1em";
dlgtable.style.width = "auto";
var dlgtbody = document.createElement("tbody");
// header row
var dlgtr = document.createElement("tr");
// top-left cell
var dlgth = document.createElement("th");
dlgth.style.width = "5%";
dlgtr.appendChild(dlgth);
// value column header
dlgth = document.createElement("th");
dlgth.style.width = "35%";
dlgth.textContent = (curpref.customListValueTitle ? curpref.customListValueTitle : "Value");
dlgtr.appendChild(dlgth);
// label column header
dlgth = document.createElement("th");
dlgth.style.width = "60%";
dlgth.textContent = (curpref.customListLabelTitle ? curpref.customListLabelTitle : "Label");
dlgtr.appendChild(dlgth);
dlgtbody.appendChild(dlgtr);
// content rows
var gotRow = false;
$.each(curvalue, function(k, v) {
gotRow = true;
Twinkle.config.listDialog.addRow(dlgtbody, v.value, v.label);
});
// if there are no values present, add a blank row to start the user off
if (!gotRow) {
Twinkle.config.listDialog.addRow(dlgtbody);
}
// final "add" button
var dlgtfoot = document.createElement("tfoot");
dlgtr = document.createElement("tr");
var dlgtd = document.createElement("td");
dlgtd.setAttribute("colspan", "3");
var addButton = document.createElement("button");
addButton.style.minWidth = "8em";
addButton.setAttribute("type", "button");
addButton.addEventListener("click", function(e) {
Twinkle.config.listDialog.addRow(dlgtbody);
}, false);
addButton.textContent = "Add";
dlgtd.appendChild(addButton);
dlgtr.appendChild(dlgtd);
dlgtfoot.appendChild(dlgtr);
dlgtable.appendChild(dlgtbody);
dlgtable.appendChild(dlgtfoot);
dialogcontent.appendChild(dlgtable);
// buttonpane buttons: [Save changes] [Reset] [Cancel]
var button = document.createElement("button");
button.setAttribute("type", "submit"); // so Morebits.simpleWindow puts the button in the button pane
button.addEventListener("click", function(e) {
Twinkle.config.listDialog.save($prefbutton, dlgtbody);
dialog.close();
}, false);
button.textContent = "Save changes";
dialogcontent.appendChild(button);
button = document.createElement("button");
button.setAttribute("type", "submit"); // so Morebits.simpleWindow puts the button in the button pane
button.addEventListener("click", function(e) {
Twinkle.config.listDialog.reset($prefbutton, dlgtbody);
}, false);
button.textContent = "Reset";
dialogcontent.appendChild(button);
button = document.createElement("button");
button.setAttribute("type", "submit"); // so Morebits.simpleWindow puts the button in the button pane
button.addEventListener("click", function(e) {
dialog.close(); // the event parameter on this function seems to be broken
}, false);
button.textContent = "Cancel";
dialogcontent.appendChild(button);
dialog.setContent(dialogcontent);
dialog.display();
};
// Resets the data value, re-populates based on the new (default) value, then saves the
// old data value again (less surprising behaviour)
Twinkle.config.listDialog.reset = function twinkleconfigListDialogReset(button, tbody) {
// reset value on button
var $button = $(button);
var curpref = $button.data("pref");
var oldvalue = $button.data("value");
Twinkle.config.resetPref(curpref, $button.data("inFriendlyConfig"));
// reset form
var $tbody = $(tbody);
$tbody.find("tr").slice(1).remove(); // all rows except the first (header) row
// add the new values
var curvalue = $button.data("value");
$.each(curvalue, function(k, v) {
Twinkle.config.listDialog.addRow(tbody, v.value, v.label);
});
// save the old value
$button.data("value", oldvalue);
};
Twinkle.config.listDialog.save = function twinkleconfigListDialogSave(button, tbody) {
var result = [];
var current = {};
$(tbody).find('input[type="text"]').each(function(inputkey, input) {
if ($(input).hasClass("twinkle-config-customlist-value")) {
current = { value: input.value };
} else {
current.label = input.value;
// exclude totally empty rows
if (current.value || current.label) {
result.push(current);
}
}
});
$(button).data("value", result);
};
// reset/restore defaults
Twinkle.config.resetPrefLink = function twinkleconfigResetPrefLink(e) {
var wantedpref = e.target.id.substring(21); // "twinkle-config-reset-" prefix is stripped
// search tactics
$(Twinkle.config.sections).each(function(sectionkey, section) {
if (section.hidden || (section.adminOnly && !Morebits.userIsInGroup("sysop"))) {
return true; // continue: skip impossibilities
}
var foundit = false;
$(section.preferences).each(function(prefkey, pref) {
if (pref.name !== wantedpref) {
return true; // continue
}
Twinkle.config.resetPref(pref, section.inFriendlyConfig);
foundit = true;
return false; // break
});
if (foundit) {
return false; // break
}
});
return false; // stop link from scrolling page
};
Twinkle.config.resetPref = function twinkleconfigResetPref(pref, inFriendlyConfig) {
switch (pref.type) {
case "boolean":
document.getElementById(pref.name).checked = (inFriendlyConfig ?
Twinkle.defaultConfig.friendly[pref.name] : Twinkle.defaultConfig.twinkle[pref.name]);
break;
case "string":
case "integer":
case "enum":
document.getElementById(pref.name).value = (inFriendlyConfig ?
Twinkle.defaultConfig.friendly[pref.name] : Twinkle.defaultConfig.twinkle[pref.name]);
break;
case "set":
$.each(pref.setValues, function(itemkey, itemvalue) {
if (document.getElementById(pref.name + "_" + itemkey)) {
document.getElementById(pref.name + "_" + itemkey).checked = ((inFriendlyConfig ?
Twinkle.defaultConfig.friendly[pref.name] : Twinkle.defaultConfig.twinkle[pref.name]).indexOf(itemkey) !== -1);
}
});
break;
case "customList":
$(document.getElementById(pref.name)).data("value", (inFriendlyConfig ?
Twinkle.defaultConfig.friendly[pref.name] : Twinkle.defaultConfig.twinkle[pref.name]));
break;
default:
alert("twinkleconfig: unknown data type for preference " + pref.name);
break;
}
};
Twinkle.config.resetAllPrefs = function twinkleconfigResetAllPrefs() {
// no confirmation message - the user can just refresh/close the page to abort
$(Twinkle.config.sections).each(function(sectionkey, section) {
if (section.hidden || (section.adminOnly && !Morebits.userIsInGroup("sysop"))) {
return true; // continue: skip impossibilities
}
$(section.preferences).each(function(prefkey, pref) {
if (!pref.adminOnly || Morebits.userIsInGroup("sysop")) {
Twinkle.config.resetPref(pref, section.inFriendlyConfig);
}
});
return true;
});
return false; // stop link from scrolling page
};
Twinkle.config.save = function twinkleconfigSave(e) {
Morebits.status.init( document.getElementById("twinkle-config-content") );
Morebits.wiki.actionCompleted.notice = "Save";
var userjs = mw.config.get("wgFormattedNamespaces")[mw.config.get("wgNamespaceIds").user] + ":" + mw.config.get("wgUserName") + "/twinkleoptions.js";
var wikipedia_page = new Morebits.wiki.page(userjs, "Saving preferences to " + userjs);
wikipedia_page.setCallbackParameters(e.target);
wikipedia_page.load(Twinkle.config.writePrefs);
return false;
};
// The JSON stringify method in the following code was excerpted from
// http://www.JSON.org/json2.js
// version of 2011-02-23
// Douglas Crockford, the code's author, has released it into the Public Domain.
// See http://www.JSON.org/js.html
var JSON;
if (!JSON) {
JSON = {};
}
(function() {
var escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
gap,
indent = ' ', // hardcoded indent
meta = { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\' };
function quote(string) {
escapable.lastIndex = 0;
return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
var c = meta[a];
return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
}) + '"' : '"' + string + '"';
}
function str(key, holder) {
var i, k, v, length, mind = gap, partial, value = holder[key];
if (value && typeof value === 'object' && $.isFunction(value.toJSON)) {
value = value.toJSON(key);
}
switch (typeof value) {
case 'string':
return quote(value);
case 'number':
return isFinite(value) ? String(value) : 'null';
case 'boolean':
case 'null':
return String(value);
case 'object':
if (!value) {
return 'null';
}
gap += indent;
partial = [];
if ($.isArray(value)) {
length = value.length;
for (i = 0; i < length; ++i) {
partial[i] = str(i, value) || 'null';
}
v = partial.length === 0 ? '[]' : gap ?
'[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
'[' + partial.join(',') + ']';
gap = mind;
return v;
}
for (k in value) {
if (Object.prototype.hasOwnProperty.call(value, k)) {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
v = partial.length === 0 ? '{}' : gap ?
'{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
'{' + partial.join(',') + '}';
gap = mind;
return v;
default:
throw new Error( "JSON.stringify: unknown data type" );
}
}
if (!$.isFunction(JSON.stringify)) {
JSON.stringify = function (value, ignoredParam1, ignoredParam2) {
ignoredParam1 = ignoredParam2; // boredom
gap = '';
return str('', {'': value});
};
}
}());
Twinkle.config.writePrefs = function twinkleconfigWritePrefs(pageobj) {
var form = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
// this is the object which gets serialized into JSON
var newConfig = {
twinkle: {},
friendly: {}
};
// keeping track of all preferences that we encounter
// any others that are set in the user's current config are kept
// this way, preferences that this script doesn't know about are not lost
// (it does mean obsolete prefs will never go away, but... ah well...)
var foundTwinklePrefs = [], foundFriendlyPrefs = [];
// a comparison function is needed later on
// it is just enough for our purposes (i.e. comparing strings, numbers, booleans,
// arrays of strings, and arrays of { value, label })
// and it is not very robust: e.g. compare([2], ["2"]) === true, and
// compare({}, {}) === false, but it's good enough for our purposes here
var compare = function(a, b) {
if ($.isArray(a)) {
if (a.length !== b.length) {
return false;
}
var asort = a.sort(), bsort = b.sort();
for (var i = 0; asort[i]; ++i) {
// comparison of the two properties of custom lists
if ((typeof asort[i] === "object") && (asort[i].label !== bsort[i].label ||
asort[i].value !== bsort[i].value)) {
return false;
} else if (asort[i].toString() !== bsort[i].toString()) {
return false;
}
}
return true;
} else {
return a === b;
}
};
$(Twinkle.config.sections).each(function(sectionkey, section) {
if (section.adminOnly && !Morebits.userIsInGroup("sysop")) {
return; // i.e. "continue" in this context
}
// reach each of the preferences from the form
$(section.preferences).each(function(prefkey, pref) {
var userValue; // = undefined
// only read form values for those prefs that have them
if (!section.hidden && (!pref.adminOnly || Morebits.userIsInGroup("sysop"))) {
switch (pref.type) {
case "boolean": // read from the checkbox
userValue = form[pref.name].checked;
break;
case "string": // read from the input box or combo box
case "enum":
userValue = form[pref.name].value;
break;
case "integer": // read from the input box
userValue = parseInt(form[pref.name].value, 10);
if (isNaN(userValue)) {
Morebits.status.warn("Saving", "The value you specified for " + pref.name + " (" + pref.value + ") was invalid. The save will continue, but the invalid data value will be skipped.");
userValue = null;
}
break;
case "set": // read from the set of check boxes
userValue = [];
if (pref.setDisplayOrder) {
// read only those keys specified in the display order
$.each(pref.setDisplayOrder, function(itemkey, item) {
if (form[pref.name + "_" + item].checked) {
userValue.push(item);
}
});
} else {
// read all the keys in the list of values
$.each(pref.setValues, function(itemkey, itemvalue) {
if (form[pref.name + "_" + itemkey].checked) {
userValue.push(itemkey);
}
});
}
break;
case "customList": // read from the jQuery data stored on the button object
userValue = $(form[pref.name]).data("value");
break;
default:
alert("twinkleconfig: unknown data type for preference " + pref.name);
break;
}
}
// only save those preferences that are *different* from the default
if (section.inFriendlyConfig) {
if (userValue !== undefined && !compare(userValue, Twinkle.defaultConfig.friendly[pref.name])) {
newConfig.friendly[pref.name] = userValue;
}
foundFriendlyPrefs.push(pref.name);
} else {
if (userValue !== undefined && !compare(userValue, Twinkle.defaultConfig.twinkle[pref.name])) {
newConfig.twinkle[pref.name] = userValue;
}
foundTwinklePrefs.push(pref.name);
}
});
});
if (Twinkle.prefs) {
$.each(Twinkle.prefs.twinkle, function(tkey, tvalue) {
if (foundTwinklePrefs.indexOf(tkey) === -1) {
newConfig.twinkle[tkey] = tvalue;
}
});
$.each(Twinkle.prefs.friendly, function(fkey, fvalue) {
if (foundFriendlyPrefs.indexOf(fkey) === -1) {
newConfig.friendly[fkey] = fvalue;
}
});
}
var text =
"// twinkleoptions.js: personal Twinkle preferences file\n" +
"//\n" +
"// NOTE: The easiest way to change your Twinkle preferences is by using the\n" +
"// Twinkle preferences panel, at [[" + Morebits.pageNameNorm + "]].\n" +
"//\n" +
"// This file is AUTOMATICALLY GENERATED. Any changes you make (aside from\n" +
"// changing the configuration parameters in a valid-JavaScript way) will be\n" +
"// overwritten the next time you click \"save\" in the Twinkle preferences\n" +
"// panel. If modifying this file, make sure to use correct JavaScript.\n" +
"\n" +
"window.Twinkle.prefs = ";
text += JSON.stringify(newConfig, null, 2);
text +=
";\n" +
"\n" +
"// End of twinkleoptions.js\n";
pageobj.setPageText(text);
pageobj.setEditSummary("Saving Twinkle preferences: automatic edit from [[" + Morebits.pageNameNorm + "]] ([[WP:TW|TW]])");
pageobj.setCreateOption("recreate");
pageobj.save(Twinkle.config.saveSuccess);
};
Twinkle.config.saveSuccess = function twinkleconfigSaveSuccess(pageobj) {
pageobj.getStatusElement().info("successful");
var noticebox = document.createElement("div");
noticebox.className = "successbox";
noticebox.style.fontSize = "100%";
noticebox.style.marginTop = "2em";
noticebox.innerHTML = "<p><b>Your Twinkle preferences have been saved.</b></p><p>To see the changes, you will need to <b>clear your browser cache entirely</b> (see <a href=\"" + mw.util.getUrl("WP:BYPASS") + "\" title=\"WP:BYPASS\">WP:BYPASS</a> for instructions).</p>";
Morebits.status.root.appendChild(noticebox);
var noticeclear = document.createElement("br");
noticeclear.style.clear = "both";
Morebits.status.root.appendChild(noticeclear);
};
})(jQuery);
//</nowiki>
43f8245631418a51c775be09f3d994f7843290b3
MediaWiki:Gadget-twinkledelimages.js
8
126
322
321
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkledelimages.js: Batch deletion of images (sysops only)
****************************************
* Mode of invocation: Tab ("Deli-batch")
* Active on: Existing non-special pages
* Config directives in: TwinkleConfig
*/
Twinkle.delimages = function twinkledeli() {
if( mw.config.get( 'wgNamespaceNumber' ) < 0 || !mw.config.get( 'wgCurRevisionId' ) ) {
return;
}
if( Morebits.userIsInGroup( 'sysop' ) ) {
Twinkle.addPortletLink( Twinkle.delimages.callback, "Deli-batch", "tw-deli", "Delete files found on page" );
}
};
Twinkle.delimages.unlinkCache = {};
Twinkle.delimages.callback = function twinkledeliCallback() {
var Window = new Morebits.simpleWindow( 800, 400 );
Window.setTitle( "Batch file deletion" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#delimages" );
var form = new Morebits.quickForm( Twinkle.delimages.callback.evaluate );
form.append( {
type: 'checkbox',
list: [
{
label: 'Delete files',
name: 'delete_image',
value: 'delete',
checked: true
},
{
label: 'Unlink uses of this file',
name: 'unlink_image',
value: 'unlink',
checked: true
}
]
} );
form.append( {
type: 'textarea',
name: 'reason',
label: 'Reason: '
} );
var query;
if( mw.config.get( 'wgNamespaceNumber' ) === 14 ) { // Category:
query = {
'action': 'query',
'generator': 'categorymembers',
'gcmtitle': mw.config.get( 'wgPageName' ),
'gcmnamespace': 6, // File:
'gcmlimit' : Twinkle.getPref('deliMax'),
'prop': [ 'imageinfo', 'categories', 'revisions' ],
'grvlimit': 1,
'grvprop': [ 'user' ]
};
} else {
query = {
'action': 'query',
'generator': 'images',
'titles': mw.config.get( 'wgPageName' ),
'prop': [ 'imageinfo', 'categories', 'revisions' ],
'gimlimit': 'max'
};
}
var wikipedia_api = new Morebits.wiki.api( 'Grabbing files', query, function( self ) {
var xmlDoc = self.responseXML;
var images = $(xmlDoc).find('page[imagerepository="local"]');
var list = [];
$.each(images, function() {
var $self = $(this);
var image = $self.attr('title');
var user = $self.find('imageinfo ii').attr('user');
var last_edit = $self.find('revisions rev').attr('user');
var disputed = $self.find('categories cl[title="Category:Contested candidates for speedy deletion"]').size() > 0;
list.push( {
'label': image + ' - author: ' + user + ', last edit from: ' + last_edit + ( disputed ? ' DISPUTED' : '' ),
'value': image,
'checked': !disputed
});
});
self.params.form.append({
type: 'checkbox',
name: 'images',
list: list
});
self.params.form.append( { type:'submit' } );
var result = self.params.form.render();
self.params.Window.setContent( result );
});
wikipedia_api.params = { form:form, Window:Window };
wikipedia_api.post();
var root = document.createElement( 'div' );
Morebits.status.init( root );
Window.setContent( root );
Window.display();
};
Twinkle.delimages.currentDeleteCounter = 0;
Twinkle.delimages.currentUnlinkCounter = 0;
Twinkle.delimages.currentdeletor = 0;
Twinkle.delimages.callback.evaluate = function twinkledeliCallbackEvaluate(event) {
var images = event.target.getChecked( 'images' );
var reason = event.target.reason.value;
var delete_image = event.target.delete_image.checked;
var unlink_image = event.target.unlink_image.checked;
if( ! reason ) {
return;
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( event.target );
function toCall( work ) {
if( work.length === 0 && Twinkle.delimages.currentDeleteCounter <= 0 && Twinkle.delimages.currentUnlinkCounter <= 0 ) {
window.clearInterval( Twinkle.delimages.currentdeletor );
Morebits.wiki.removeCheckpoint();
return;
} else if( work.length !== 0 && Twinkle.delimages.currentDeleteCounter <= Twinkle.getPref('batchDeleteMinCutOff') && Twinkle.delimages.currentUnlinkCounter <= Twinkle.getPref('batchDeleteMinCutOff') ) {
Twinkle.delimages.unlinkCache = []; // Clear the cache
var images = work.shift();
Twinkle.delimages.currentDeleteCounter = images.length;
Twinkle.delimages.currentUnlinkCounter = images.length;
var i;
for( i = 0; i < images.length; ++i ) {
var image = images[i];
var query = {
'action': 'query',
'titles': image
};
var wikipedia_api = new Morebits.wiki.api( 'Checking if file ' + image + ' exists', query, Twinkle.delimages.callbacks.main );
wikipedia_api.params = { image:image, reason:reason, unlink_image:unlink_image, delete_image:delete_image };
wikipedia_api.post();
}
}
}
var work = Morebits.array.chunk( images, Twinkle.getPref('deliChunks') );
Morebits.wiki.addCheckpoint();
Twinkle.delimages.currentdeletor = window.setInterval( toCall, 1000, work );
};
Twinkle.delimages.callbacks = {
main: function( self ) {
var xmlDoc = self.responseXML;
var $data = $(xmlDoc);
var normal = $data.find('normalized n').attr('to');
if( normal ) {
self.params.image = normal;
}
var exists = $data.find('pages page[title="'+self.params.image.replace( /"/g, '\\"')+'"]:not([missing])').size() > 0;
if( ! exists ) {
self.statelem.error( "It seems that the page doesn't exists, perhaps it has already been deleted" );
return;
}
if( self.params.unlink_image ) {
var query = {
'action': 'query',
'list': 'imageusage',
'iutitle': self.params.image,
'iulimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500 // 500 is max for normal users, 5000 for bots and sysops
};
var wikipedia_api = new Morebits.wiki.api( 'Grabbing file links', query, Twinkle.delimages.callbacks.unlinkImageInstancesMain );
wikipedia_api.params = self.params;
wikipedia_api.post();
}
if( self.params.delete_image ) {
var imagepage = new Morebits.wiki.page( self.params.image, 'Deleting image');
imagepage.setEditSummary( "File deleted: " + self.params.reason + Twinkle.getPref('deletionSummaryAd'));
imagepage.deletePage();
}
},
unlinkImageInstancesMain: function( self ) {
var xmlDoc = self.responseXML;
var instances = [];
$(xmlDoc).find('imageusage iu').each(function(){
instances.push($(this).attr('title'));
});
if( instances.length === 0 ) {
--Twinkle.delimages.currentUnlinkCounter;
return;
}
$.each( instances, function(k,title) {
var page = new Morebits.wiki.page(title, "Unlinking instances on " + title);
page.setFollowRedirect(true);
page.setCallbackParameters({'image': self.params.image, 'reason': self.params.reason});
page.load(Twinkle.delimages.callbacks.unlinkImageInstances);
});
},
unlinkImageInstances: function( self ) {
var params = self.getCallbackParameters();
var statelem = self.getStatusElement();
var image = params.image.replace( /^(?:Image|File):/, '' );
var old_text = self.getPageText();
var wikiPage = new Morebits.wikitext.page( old_text );
wikiPage.commentOutImage( image , 'Commented out because image was deleted' );
var text = wikiPage.getText();
if( text === old_text ) {
statelem.error( 'failed to unlink image ' + image +' from ' + self.getPageName() );
return;
}
self.setPageText(text);
self.setEditSummary('Removing instance of file ' + image + " that has been deleted because \"" + params.reason + "\")" + "; " + Twinkle.getPref('deletionSummaryAd'));
self.setCreateOption('nocreate');
self.save();
}
};
})(jQuery);
//</nowiki>
703111f4e5e86be097df87496659549099febf9f
321
2014-01-07T11:38:47Z
Amalthea
0
v2.0-682-ge4735d6: Linting
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkledelimages.js: Batch deletion of images (sysops only)
****************************************
* Mode of invocation: Tab ("Deli-batch")
* Active on: Existing non-special pages
* Config directives in: TwinkleConfig
*/
Twinkle.delimages = function twinkledeli() {
if( mw.config.get( 'wgNamespaceNumber' ) < 0 || !mw.config.get( 'wgCurRevisionId' ) ) {
return;
}
if( Morebits.userIsInGroup( 'sysop' ) ) {
Twinkle.addPortletLink( Twinkle.delimages.callback, "Deli-batch", "tw-deli", "Delete files found on page" );
}
};
Twinkle.delimages.unlinkCache = {};
Twinkle.delimages.callback = function twinkledeliCallback() {
var Window = new Morebits.simpleWindow( 800, 400 );
Window.setTitle( "Batch file deletion" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#delimages" );
var form = new Morebits.quickForm( Twinkle.delimages.callback.evaluate );
form.append( {
type: 'checkbox',
list: [
{
label: 'Delete files',
name: 'delete_image',
value: 'delete',
checked: true
},
{
label: 'Unlink uses of this file',
name: 'unlink_image',
value: 'unlink',
checked: true
}
]
} );
form.append( {
type: 'textarea',
name: 'reason',
label: 'Reason: '
} );
var query;
if( mw.config.get( 'wgNamespaceNumber' ) === 14 ) { // Category:
query = {
'action': 'query',
'generator': 'categorymembers',
'gcmtitle': mw.config.get( 'wgPageName' ),
'gcmnamespace': 6, // File:
'gcmlimit' : Twinkle.getPref('deliMax'),
'prop': [ 'imageinfo', 'categories', 'revisions' ],
'grvlimit': 1,
'grvprop': [ 'user' ]
};
} else {
query = {
'action': 'query',
'generator': 'images',
'titles': mw.config.get( 'wgPageName' ),
'prop': [ 'imageinfo', 'categories', 'revisions' ],
'gimlimit': 'max'
};
}
var wikipedia_api = new Morebits.wiki.api( 'Grabbing files', query, function( self ) {
var xmlDoc = self.responseXML;
var images = $(xmlDoc).find('page[imagerepository="local"]');
var list = [];
$.each(images, function() {
var $self = $(this);
var image = $self.attr('title');
var user = $self.find('imageinfo ii').attr('user');
var last_edit = $self.find('revisions rev').attr('user');
var disputed = $self.find('categories cl[title="Category:Contested candidates for speedy deletion"]').size() > 0;
list.push( {
'label': image + ' - author: ' + user + ', last edit from: ' + last_edit + ( disputed ? ' DISPUTED' : '' ),
'value': image,
'checked': !disputed
});
});
self.params.form.append({
type: 'checkbox',
name: 'images',
list: list
});
self.params.form.append( { type:'submit' } );
var result = self.params.form.render();
self.params.Window.setContent( result );
});
wikipedia_api.params = { form:form, Window:Window };
wikipedia_api.post();
var root = document.createElement( 'div' );
Morebits.status.init( root );
Window.setContent( root );
Window.display();
};
Twinkle.delimages.currentDeleteCounter = 0;
Twinkle.delimages.currentUnlinkCounter = 0;
Twinkle.delimages.currentdeletor = 0;
Twinkle.delimages.callback.evaluate = function twinkledeliCallbackEvaluate(event) {
var images = event.target.getChecked( 'images' );
var reason = event.target.reason.value;
var delete_image = event.target.delete_image.checked;
var unlink_image = event.target.unlink_image.checked;
if( ! reason ) {
return;
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( event.target );
function toCall( work ) {
if( work.length === 0 && Twinkle.delimages.currentDeleteCounter <= 0 && Twinkle.delimages.currentUnlinkCounter <= 0 ) {
window.clearInterval( Twinkle.delimages.currentdeletor );
Morebits.wiki.removeCheckpoint();
return;
} else if( work.length !== 0 && Twinkle.delimages.currentDeleteCounter <= Twinkle.getPref('batchDeleteMinCutOff') && Twinkle.delimages.currentUnlinkCounter <= Twinkle.getPref('batchDeleteMinCutOff') ) {
Twinkle.delimages.unlinkCache = []; // Clear the cache
var images = work.shift();
Twinkle.delimages.currentDeleteCounter = images.length;
Twinkle.delimages.currentUnlinkCounter = images.length;
var i;
for( i = 0; i < images.length; ++i ) {
var image = images[i];
var query = {
'action': 'query',
'titles': image
};
var wikipedia_api = new Morebits.wiki.api( 'Checking if file ' + image + ' exists', query, Twinkle.delimages.callbacks.main );
wikipedia_api.params = { image:image, reason:reason, unlink_image:unlink_image, delete_image:delete_image };
wikipedia_api.post();
}
}
}
var work = Morebits.array.chunk( images, Twinkle.getPref('deliChunks') );
Morebits.wiki.addCheckpoint();
Twinkle.delimages.currentdeletor = window.setInterval( toCall, 1000, work );
};
Twinkle.delimages.callbacks = {
main: function( self ) {
var xmlDoc = self.responseXML;
var $data = $(xmlDoc);
var normal = $data.find('normalized n').attr('to');
if( normal ) {
self.params.image = normal;
}
var exists = $data.find('pages page[title="'+self.params.image.replace( /"/g, '\\"')+'"]:not([missing])').size() > 0;
if( ! exists ) {
self.statelem.error( "It seems that the page doesn't exists, perhaps it has already been deleted" );
return;
}
if( self.params.unlink_image ) {
var query = {
'action': 'query',
'list': 'imageusage',
'iutitle': self.params.image,
'iulimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500 // 500 is max for normal users, 5000 for bots and sysops
};
var wikipedia_api = new Morebits.wiki.api( 'Grabbing file links', query, Twinkle.delimages.callbacks.unlinkImageInstancesMain );
wikipedia_api.params = self.params;
wikipedia_api.post();
}
if( self.params.delete_image ) {
var imagepage = new Morebits.wiki.page( self.params.image, 'Deleting image');
imagepage.setEditSummary( "File deleted: " + self.params.reason + Twinkle.getPref('deletionSummaryAd'));
imagepage.deletePage();
}
},
unlinkImageInstancesMain: function( self ) {
var xmlDoc = self.responseXML;
var instances = [];
$(xmlDoc).find('imageusage iu').each(function(){
instances.push($(this).attr('title'));
});
if( instances.length === 0 ) {
--Twinkle.delimages.currentUnlinkCounter;
return;
}
$.each( instances, function(k,title) {
var page = new Morebits.wiki.page(title, "Unlinking instances on " + title);
page.setFollowRedirect(true);
page.setCallbackParameters({'image': self.params.image, 'reason': self.params.reason});
page.load(Twinkle.delimages.callbacks.unlinkImageInstances);
});
},
unlinkImageInstances: function( self ) {
var params = self.getCallbackParameters();
var statelem = self.getStatusElement();
var image = params.image.replace( /^(?:Image|File):/, '' );
var old_text = self.getPageText();
var wikiPage = new Morebits.wikitext.page( old_text );
wikiPage.commentOutImage( image , 'Commented out because image was deleted' );
var text = wikiPage.getText();
if( text === old_text ) {
statelem.error( 'failed to unlink image ' + image +' from ' + self.getPageName() );
return;
}
self.setPageText(text);
self.setEditSummary('Removing instance of file ' + image + " that has been deleted because \"" + params.reason + "\")" + "; " + Twinkle.getPref('deletionSummaryAd'));
self.setCreateOption('nocreate');
self.save();
}
};
})(jQuery);
//</nowiki>
703111f4e5e86be097df87496659549099febf9f
MediaWiki:Gadget-twinkledeprod.js
8
128
326
325
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkledeprod.js: Batch deletion of expired PRODs (sysops only)
****************************************
* Mode of invocation: Tab ("Deprod")
* Active on: Categories whose name starts with "Category:Proposed deletion as of"
* Config directives in: TwinkleConfig
*/
Twinkle.deprod = function() {
if( mw.config.get( 'wgNamespaceNumber' ) !== 14 || ! Morebits.userIsInGroup( 'sysop' ) || !((/^Category:Proposed_deletion_as_of/).test(mw.config.get( 'wgPageName' ))) ) {
return;
}
Twinkle.addPortletLink( callback, "Deprod", "tw-deprod", "Delete prod pages found in this category");
};
var unlinkCache = {},
concerns = {},
currentDeleteCounter = 0,
currentUnlinkCounter = 0,
currentDeletor = null,
callback = function() {
var Window = new Morebits.simpleWindow( 800, 400 );
Window.setTitle( "PROD cleaning" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Proposed deletion", "WP:PROD" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#deprod" );
var form = new Morebits.quickForm( callback_commit );
var query = {
'action': 'query',
'generator': 'categorymembers',
'gcmtitle': mw.config.get( 'wgPageName' ),
'gcmlimit' : 5000, // the max for sysops
'prop': [ 'categories', 'revisions' ],
'rvprop': [ 'content' ]
};
var wikipedia_api = new Morebits.wiki.api( 'Grabbing pages', query,
function( self ) {
var $doc = $(self.responseXML);
var $pages = $doc.find('page[ns!="6"]'); // all non-files
var list = [];
var re = /\{\{Proposed deletion/;
$pages.each(function() {
var $self = $(this);
var page = $self.attr('title');
var content = $self.find('revisions rev').text();
var concern = '';
var res = re.exec(content);
if( res ) {
var parsed = Morebits.wikitext.template.parse( content, res.index );
concern = parsed.parameters.concern || '';
}
list.push( {label:page + ' (' + concern + ')' , value:page, checked:concern !== '' });
concerns[page] = concern;
});
self.params.form.append({
'type': 'checkbox',
'name': 'pages',
'list': list
});
self.params.form.append({
'type': 'submit'
});
self.params.Window.setContent( self.params.form.render() );
});
wikipedia_api.params = { form:form, Window:Window };
wikipedia_api.post();
var root = document.createElement( 'div' );
Morebits.simpleWindow.setButtonsEnabled( true );
Morebits.status.init( root );
Window.setContent( root );
Window.display();
},
callback_commit = function(event) {
var pages = event.target.getChecked( 'pages' );
Morebits.status.init( event.target );
function toCall( work ) {
if( work.length === 0 ) {
Morebits.status.info( 'work done' );
window.clearInterval( currentDeletor );
Morebits.wiki.removeCheckpoint();
return;
} else if( currentDeleteCounter <= 0 || currentUnlinkCounter <= 0 ) {
unlinkCache = []; // Clear the cache
var pages = work.pop(), i;
for( i = 0; i < pages.length; ++i ) {
var page = pages[i];
var query = {
'action': 'query',
'prop': 'revisions',
'rvprop': [ 'content' ],
'rvlimit': 1,
'titles': page
};
var wikipedia_api = new Morebits.wiki.api( 'Checking if page ' + page + ' exists', query, callback_check );
wikipedia_api.params = { page:page, reason: concerns[page] };
wikipedia_api.post();
}
}
}
var work = Morebits.array.chunk( pages, Twinkle.getPref('proddeleteChunks') );
Morebits.wiki.addCheckpoint();
currentDeletor = window.setInterval( toCall, 1000, work );
},
callback_check = function( self ) {
var $doc = $(self.responseXML);
var normal = $doc.find('normalized n').attr('to');
if( normal ) {
self.params.page = normal;
}
var exists = $doc.find('pages page:not([missing])').size() > 0;
if( ! exists ) {
self.statelem.error( "It seems that the page doesn't exist, perhaps it has already been deleted" );
return;
}
var query = {
'action': 'query',
'list': 'backlinks',
'blfilterredir': 'redirects',
'bltitle': self.params.page,
'bllimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500 // 500 is max for normal users, 5000 for bots and sysops
};
var wikipedia_api = new Morebits.wiki.api( 'Grabbing redirects', query, callback_deleteRedirects );
wikipedia_api.params = self.params;
wikipedia_api.post();
var page = new Morebits.wiki.page('Talk:' + self.params.page, "Deleting talk page");
page.setEditSummary("[[WP:CSD#G8|G8]]: [[Help:Talk page|Talk page]] of deleted page \"" + self.params.page + "\"" + Twinkle.getPref('deletionSummaryAd'));
page.deletePage();
page = new Morebits.wiki.page(self.params.page, "Deleting article");
page.setEditSummary("Expired [[WP:PROD|PROD]], concern was: " + self.params.reason + Twinkle.getPref('deletionSummaryAd'));
page.deletePage();
},
callback_deleteRedirects = function( self ) {
var $doc = $(self.responseXML);
$doc.find("backlinks bl").each(function(){
var title = $(this).attr('title');
var page = new Morebits.wiki.page(title, "Deleting redirecting page " + title);
page.setEditSummary("[[WP:CSD#R1|R1]]: Redirect to deleted page \"" + self.params.page + "\"" + Twinkle.getPref('deletionSummaryAd'));
page.deletePage();
});
};
})(jQuery);
//</nowiki>
9e1ae373afaf668692a34373ab62138e7c683782
325
2014-01-07T11:38:50Z
Amalthea
0
v2.0-682-ge4735d6: Linting
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkledeprod.js: Batch deletion of expired PRODs (sysops only)
****************************************
* Mode of invocation: Tab ("Deprod")
* Active on: Categories whose name starts with "Category:Proposed deletion as of"
* Config directives in: TwinkleConfig
*/
Twinkle.deprod = function() {
if( mw.config.get( 'wgNamespaceNumber' ) !== 14 || ! Morebits.userIsInGroup( 'sysop' ) || !((/^Category:Proposed_deletion_as_of/).test(mw.config.get( 'wgPageName' ))) ) {
return;
}
Twinkle.addPortletLink( callback, "Deprod", "tw-deprod", "Delete prod pages found in this category");
};
var unlinkCache = {},
concerns = {},
currentDeleteCounter = 0,
currentUnlinkCounter = 0,
currentDeletor = null,
callback = function() {
var Window = new Morebits.simpleWindow( 800, 400 );
Window.setTitle( "PROD cleaning" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Proposed deletion", "WP:PROD" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#deprod" );
var form = new Morebits.quickForm( callback_commit );
var query = {
'action': 'query',
'generator': 'categorymembers',
'gcmtitle': mw.config.get( 'wgPageName' ),
'gcmlimit' : 5000, // the max for sysops
'prop': [ 'categories', 'revisions' ],
'rvprop': [ 'content' ]
};
var wikipedia_api = new Morebits.wiki.api( 'Grabbing pages', query,
function( self ) {
var $doc = $(self.responseXML);
var $pages = $doc.find('page[ns!="6"]'); // all non-files
var list = [];
var re = /\{\{Proposed deletion/;
$pages.each(function() {
var $self = $(this);
var page = $self.attr('title');
var content = $self.find('revisions rev').text();
var concern = '';
var res = re.exec(content);
if( res ) {
var parsed = Morebits.wikitext.template.parse( content, res.index );
concern = parsed.parameters.concern || '';
}
list.push( {label:page + ' (' + concern + ')' , value:page, checked:concern !== '' });
concerns[page] = concern;
});
self.params.form.append({
'type': 'checkbox',
'name': 'pages',
'list': list
});
self.params.form.append({
'type': 'submit'
});
self.params.Window.setContent( self.params.form.render() );
});
wikipedia_api.params = { form:form, Window:Window };
wikipedia_api.post();
var root = document.createElement( 'div' );
Morebits.simpleWindow.setButtonsEnabled( true );
Morebits.status.init( root );
Window.setContent( root );
Window.display();
},
callback_commit = function(event) {
var pages = event.target.getChecked( 'pages' );
Morebits.status.init( event.target );
function toCall( work ) {
if( work.length === 0 ) {
Morebits.status.info( 'work done' );
window.clearInterval( currentDeletor );
Morebits.wiki.removeCheckpoint();
return;
} else if( currentDeleteCounter <= 0 || currentUnlinkCounter <= 0 ) {
unlinkCache = []; // Clear the cache
var pages = work.pop(), i;
for( i = 0; i < pages.length; ++i ) {
var page = pages[i];
var query = {
'action': 'query',
'prop': 'revisions',
'rvprop': [ 'content' ],
'rvlimit': 1,
'titles': page
};
var wikipedia_api = new Morebits.wiki.api( 'Checking if page ' + page + ' exists', query, callback_check );
wikipedia_api.params = { page:page, reason: concerns[page] };
wikipedia_api.post();
}
}
}
var work = Morebits.array.chunk( pages, Twinkle.getPref('proddeleteChunks') );
Morebits.wiki.addCheckpoint();
currentDeletor = window.setInterval( toCall, 1000, work );
},
callback_check = function( self ) {
var $doc = $(self.responseXML);
var normal = $doc.find('normalized n').attr('to');
if( normal ) {
self.params.page = normal;
}
var exists = $doc.find('pages page:not([missing])').size() > 0;
if( ! exists ) {
self.statelem.error( "It seems that the page doesn't exist, perhaps it has already been deleted" );
return;
}
var query = {
'action': 'query',
'list': 'backlinks',
'blfilterredir': 'redirects',
'bltitle': self.params.page,
'bllimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500 // 500 is max for normal users, 5000 for bots and sysops
};
var wikipedia_api = new Morebits.wiki.api( 'Grabbing redirects', query, callback_deleteRedirects );
wikipedia_api.params = self.params;
wikipedia_api.post();
var page = new Morebits.wiki.page('Talk:' + self.params.page, "Deleting talk page");
page.setEditSummary("[[WP:CSD#G8|G8]]: [[Help:Talk page|Talk page]] of deleted page \"" + self.params.page + "\"" + Twinkle.getPref('deletionSummaryAd'));
page.deletePage();
page = new Morebits.wiki.page(self.params.page, "Deleting article");
page.setEditSummary("Expired [[WP:PROD|PROD]], concern was: " + self.params.reason + Twinkle.getPref('deletionSummaryAd'));
page.deletePage();
},
callback_deleteRedirects = function( self ) {
var $doc = $(self.responseXML);
$doc.find("backlinks bl").each(function(){
var title = $(this).attr('title');
var page = new Morebits.wiki.page(title, "Deleting redirecting page " + title);
page.setEditSummary("[[WP:CSD#R1|R1]]: Redirect to deleted page \"" + self.params.page + "\"" + Twinkle.getPref('deletionSummaryAd'));
page.deletePage();
});
};
})(jQuery);
//</nowiki>
9e1ae373afaf668692a34373ab62138e7c683782
MediaWiki:Gadget-twinklediff.js
8
124
318
317
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklediff.js: Diff module
****************************************
* Mode of invocation: Tab on non-diff pages ("Last"); tabs on diff pages ("Since", "Since mine", "Current")
* Active on: Existing non-special pages
* Config directives in: TwinkleConfig
*/
Twinkle.diff = function twinklediff() {
if( mw.config.get('wgNamespaceNumber') < 0 || !mw.config.get('wgArticleId') ) {
return;
}
var query = {
'title': mw.config.get('wgPageName'),
'diff': 'cur',
'oldid': 'prev'
};
Twinkle.addPortletLink( mw.util.wikiScript("index")+ "?" + $.param( query ), 'Last', 'tw-lastdiff', 'Show most recent diff' );
// Show additional tabs only on diff pages
if (Morebits.queryString.exists('diff')) {
Twinkle.addPortletLink(function(){ Twinkle.diff.evaluate(false); }, 'Since', 'tw-since', 'Show difference between last diff and the revision made by previous user' );
Twinkle.addPortletLink( function(){ Twinkle.diff.evaluate(true); }, 'Since mine', 'tw-sincemine', 'Show difference between last diff and my last revision' );
var oldid = /oldid=(.+)/.exec($('#mw-diff-ntitle1').find('strong a').first().attr("href"))[1];
query = {
'title': mw.config.get('wgPageName'),
'diff': 'cur',
'oldid' : oldid
};
Twinkle.addPortletLink( mw.util.wikiScript("index")+ "?" + $.param( query ), 'Current', 'tw-curdiff', 'Show difference to current revision' );
}
};
Twinkle.diff.evaluate = function twinklediffEvaluate(me) {
var user;
if( me ) {
user = mw.config.get('wgUserName');
} else {
var node = document.getElementById( 'mw-diff-ntitle2' );
if( ! node ) {
// nothing to do?
return;
}
user = $(node).find('a').first().text();
}
var query = {
'prop': 'revisions',
'action': 'query',
'titles': mw.config.get('wgPageName'),
'rvlimit': 1,
'rvprop': [ 'ids', 'user' ],
'rvstartid': mw.config.get('wgCurRevisionId') - 1, // i.e. not the current one
'rvuser': user
};
Morebits.status.init( document.getElementById('mw-content-text') );
var wikipedia_api = new Morebits.wiki.api( 'Grabbing data of initial contributor', query, Twinkle.diff.callbacks.main );
wikipedia_api.params = { user: user };
wikipedia_api.post();
};
Twinkle.diff.callbacks = {
main: function( self ) {
var xmlDoc = self.responseXML;
var revid = $(xmlDoc).find('rev').attr('revid');
if( ! revid ) {
self.statelem.error( 'no suitable earlier revision found, or ' + self.params.user + ' is the only contributor. Aborting.' );
return;
}
var query = {
'title': mw.config.get('wgPageName'),
'oldid': revid,
'diff': mw.config.get('wgCurRevisionId')
};
window.location = mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query );
}
};
})(jQuery);
//</nowiki>
df7ef8b2984fa3845e4ce3a1cc7d57c372e82eb9
317
2013-07-13T18:09:47Z
AzaToth
0
v2.0-556-g0beacc0: use .utc() for timestamps and format them the sme way as the wiki does
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklediff.js: Diff module
****************************************
* Mode of invocation: Tab on non-diff pages ("Last"); tabs on diff pages ("Since", "Since mine", "Current")
* Active on: Existing non-special pages
* Config directives in: TwinkleConfig
*/
Twinkle.diff = function twinklediff() {
if( mw.config.get('wgNamespaceNumber') < 0 || !mw.config.get('wgArticleId') ) {
return;
}
var query = {
'title': mw.config.get('wgPageName'),
'diff': 'cur',
'oldid': 'prev'
};
Twinkle.addPortletLink( mw.util.wikiScript("index")+ "?" + $.param( query ), 'Last', 'tw-lastdiff', 'Show most recent diff' );
// Show additional tabs only on diff pages
if (Morebits.queryString.exists('diff')) {
Twinkle.addPortletLink(function(){ Twinkle.diff.evaluate(false); }, 'Since', 'tw-since', 'Show difference between last diff and the revision made by previous user' );
Twinkle.addPortletLink( function(){ Twinkle.diff.evaluate(true); }, 'Since mine', 'tw-sincemine', 'Show difference between last diff and my last revision' );
var oldid = /oldid=(.+)/.exec($('#mw-diff-ntitle1').find('strong a').first().attr("href"))[1];
query = {
'title': mw.config.get('wgPageName'),
'diff': 'cur',
'oldid' : oldid
};
Twinkle.addPortletLink( mw.util.wikiScript("index")+ "?" + $.param( query ), 'Current', 'tw-curdiff', 'Show difference to current revision' );
}
};
Twinkle.diff.evaluate = function twinklediffEvaluate(me) {
var user;
if( me ) {
user = mw.config.get('wgUserName');
} else {
var node = document.getElementById( 'mw-diff-ntitle2' );
if( ! node ) {
// nothing to do?
return;
}
user = $(node).find('a').first().text();
}
var query = {
'prop': 'revisions',
'action': 'query',
'titles': mw.config.get('wgPageName'),
'rvlimit': 1,
'rvprop': [ 'ids', 'user' ],
'rvstartid': mw.config.get('wgCurRevisionId') - 1, // i.e. not the current one
'rvuser': user
};
Morebits.status.init( document.getElementById('mw-content-text') );
var wikipedia_api = new Morebits.wiki.api( 'Grabbing data of initial contributor', query, Twinkle.diff.callbacks.main );
wikipedia_api.params = { user: user };
wikipedia_api.post();
};
Twinkle.diff.callbacks = {
main: function( self ) {
var xmlDoc = self.responseXML;
var revid = $(xmlDoc).find('rev').attr('revid');
if( ! revid ) {
self.statelem.error( 'no suitable earlier revision found, or ' + self.params.user + ' is the only contributor. Aborting.' );
return;
}
var query = {
'title': mw.config.get('wgPageName'),
'oldid': revid,
'diff': mw.config.get('wgCurRevisionId')
};
window.location = mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query );
}
};
})(jQuery);
//</nowiki>
df7ef8b2984fa3845e4ce3a1cc7d57c372e82eb9
MediaWiki:Gadget-twinklefluff.js
8
134
338
337
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklefluff.js: Revert/rollback module
****************************************
* Mode of invocation: Links on history, contributions, and diff pages
* Active on: Diff pages, history pages, contributions pages
* Config directives in: TwinkleConfig
*/
/**
Twinklefluff revert and antivandalism utility
*/
Twinkle.fluff = {
auto: function() {
if( parseInt( Morebits.queryString.get('oldid'), 10) !== mw.config.get('wgCurRevisionId') ) {
// not latest revision
alert("Can't rollback, page has changed in the meantime.");
return;
}
var vandal = $("#mw-diff-ntitle2").find("a.mw-userlink").text();
Twinkle.fluff.revert( Morebits.queryString.get( 'twinklerevert' ), vandal, true );
},
normal: function() {
var spanTag = function( color, content ) {
var span = document.createElement( 'span' );
span.style.color = color;
span.appendChild( document.createTextNode( content ) );
return span;
};
if( mw.config.get('wgNamespaceNumber') === -1 && mw.config.get('wgCanonicalSpecialPageName') === "Contributions" ) {
//Get the username these contributions are for
var username = decodeURIComponent(/wiki\/Special:Log\/(.+)$/.exec($('#contentSub').find('a[title^="Special:Log"]').last().attr("href").replace(/_/g, "%20"))[1]);
if( Twinkle.getPref('showRollbackLinks').indexOf('contribs') !== -1 ||
( mw.config.get('wgUserName') !== username && Twinkle.getPref('showRollbackLinks').indexOf('others') !== -1 ) ||
( mw.config.get('wgUserName') === username && Twinkle.getPref('showRollbackLinks').indexOf('mine') !== -1 ) ) {
var list = $("#mw-content-text").find("ul li:has(span.mw-uctop)");
var revNode = document.createElement('strong');
var revLink = document.createElement('a');
revLink.appendChild( spanTag( 'Black', '[' ) );
revLink.appendChild( spanTag( 'SteelBlue', 'rollback' ) );
revLink.appendChild( spanTag( 'Black', ']' ) );
revNode.appendChild(revLink);
var revVandNode = document.createElement('strong');
var revVandLink = document.createElement('a');
revVandLink.appendChild( spanTag( 'Black', '[' ) );
revVandLink.appendChild( spanTag( 'Red', 'vandalism' ) );
revVandLink.appendChild( spanTag( 'Black', ']' ) );
revVandNode.appendChild(revVandLink);
list.each(function(key, current) {
var href = $(current).children("a:eq(1)").attr("href");
current.appendChild( document.createTextNode(' ') );
var tmpNode = revNode.cloneNode( true );
tmpNode.firstChild.setAttribute( 'href', href + '&' + Morebits.queryString.create( { 'twinklerevert': 'norm' } ) );
current.appendChild( tmpNode );
current.appendChild( document.createTextNode(' ') );
tmpNode = revVandNode.cloneNode( true );
tmpNode.firstChild.setAttribute( 'href', href + '&' + Morebits.queryString.create( { 'twinklerevert': 'vand' } ) );
current.appendChild( tmpNode );
});
}
} else {
if( mw.config.get('wgCanonicalSpecialPageName') === "Undelete" ) {
//You can't rollback deleted pages!
return;
}
var firstRev = $("div.firstrevisionheader").length;
if( firstRev ) {
// we have first revision here, nothing to do.
return;
}
var otitle, ntitle;
try {
var otitle1 = document.getElementById('mw-diff-otitle1');
var ntitle1 = document.getElementById('mw-diff-ntitle1');
if (!otitle1 || !ntitle1) {
return;
}
otitle = otitle1.parentNode;
ntitle = ntitle1.parentNode;
} catch( e ) {
// no old, nor new title, nothing to do really, return;
return;
}
var old_rev_url = $("#mw-diff-otitle1").find("strong a").attr("href");
// Lets first add a [edit this revision] link
var query = new Morebits.queryString( old_rev_url.split( '?', 2 )[1] );
var oldrev = query.get('oldid');
var revertToRevision = document.createElement('div');
revertToRevision.setAttribute( 'id', 'tw-revert-to-orevision' );
revertToRevision.style.fontWeight = 'bold';
var revertToRevisionLink = revertToRevision.appendChild( document.createElement('a') );
revertToRevisionLink.href = "#";
$(revertToRevisionLink).click(function(){
Twinkle.fluff.revertToRevision(oldrev);
});
revertToRevisionLink.appendChild( spanTag( 'Black', '[' ) );
revertToRevisionLink.appendChild( spanTag( 'SaddleBrown', 'restore this version' ) );
revertToRevisionLink.appendChild( spanTag( 'Black', ']' ) );
otitle.insertBefore( revertToRevision, otitle.firstChild );
if( document.getElementById('differences-nextlink') ) {
// Not latest revision
var curVersion = false;
var new_rev_url = $("#mw-diff-ntitle1").find("strong a").attr("href");
query = new Morebits.queryString( new_rev_url.split( '?', 2 )[1] );
var newrev = query.get('oldid');
revertToRevision = document.createElement('div');
revertToRevision.setAttribute( 'id', 'tw-revert-to-nrevision' );
revertToRevision.style.fontWeight = 'bold';
revertToRevisionLink = revertToRevision.appendChild( document.createElement('a') );
revertToRevisionLink.href = "#";
$(revertToRevisionLink).click(function(){
Twinkle.fluff.revertToRevision(newrev);
});
revertToRevisionLink.appendChild( spanTag( 'Black', '[' ) );
revertToRevisionLink.appendChild( spanTag( 'SaddleBrown', 'restore this version' ) );
revertToRevisionLink.appendChild( spanTag( 'Black', ']' ) );
ntitle.insertBefore( revertToRevision, ntitle.firstChild );
return;
}
if( Twinkle.getPref('showRollbackLinks').indexOf('diff') !== -1 ) {
var vandal = $("#mw-diff-ntitle2").find("a").first().text();
var revertNode = document.createElement('div');
revertNode.setAttribute( 'id', 'tw-revert' );
var agfNode = document.createElement('strong');
var vandNode = document.createElement('strong');
var normNode = document.createElement('strong');
var agfLink = document.createElement('a');
var vandLink = document.createElement('a');
var normLink = document.createElement('a');
agfLink.href = "#";
vandLink.href = "#";
normLink.href = "#";
$(agfLink).click(function(){
Twinkle.fluff.revert('agf', vandal);
});
$(vandLink).click(function(){
Twinkle.fluff.revert('vand', vandal);
});
$(normLink).click(function(){
Twinkle.fluff.revert('norm', vandal);
});
agfLink.appendChild( spanTag( 'Black', '[' ) );
agfLink.appendChild( spanTag( 'DarkOliveGreen', 'rollback (AGF)' ) );
agfLink.appendChild( spanTag( 'Black', ']' ) );
vandLink.appendChild( spanTag( 'Black', '[' ) );
vandLink.appendChild( spanTag( 'Red', 'rollback (VANDAL)' ) );
vandLink.appendChild( spanTag( 'Black', ']' ) );
normLink.appendChild( spanTag( 'Black', '[' ) );
normLink.appendChild( spanTag( 'SteelBlue', 'rollback' ) );
normLink.appendChild( spanTag( 'Black', ']' ) );
agfNode.appendChild(agfLink);
vandNode.appendChild(vandLink);
normNode.appendChild(normLink);
revertNode.appendChild( agfNode );
revertNode.appendChild( document.createTextNode(' || ') );
revertNode.appendChild( normNode );
revertNode.appendChild( document.createTextNode(' || ') );
revertNode.appendChild( vandNode );
ntitle.insertBefore( revertNode, ntitle.firstChild );
}
}
}
};
Twinkle.fluff.revert = function revertPage( type, vandal, autoRevert, rev, page ) {
var pagename = page || mw.config.get('wgPageName');
var revid = rev || mw.config.get('wgCurRevisionId');
Morebits.status.init( document.getElementById('mw-content-text') );
$( '#catlinks' ).remove();
var params = {
type: type,
user: vandal,
pagename: pagename,
revid: revid,
autoRevert: !!autoRevert
};
var query = {
'action': 'query',
'prop': ['info', 'revisions', 'flagged'],
'titles': pagename,
'rvlimit': 50, // max possible
'rvprop': [ 'ids', 'timestamp', 'user', 'comment' ],
'intoken': 'edit'
};
var wikipedia_api = new Morebits.wiki.api( 'Grabbing data of earlier revisions', query, Twinkle.fluff.callbacks.main );
wikipedia_api.params = params;
wikipedia_api.post();
};
Twinkle.fluff.revertToRevision = function revertToRevision( oldrev ) {
Morebits.status.init( document.getElementById('mw-content-text') );
var query = {
'action': 'query',
'prop': ['info', 'revisions'],
'titles': mw.config.get('wgPageName'),
'rvlimit': 1,
'rvstartid': oldrev,
'rvprop': [ 'ids', 'timestamp', 'user', 'comment' ],
'intoken': 'edit',
'format': 'xml'
};
var wikipedia_api = new Morebits.wiki.api( 'Grabbing data of the earlier revision', query, Twinkle.fluff.callbacks.toRevision.main );
wikipedia_api.params = { rev: oldrev };
wikipedia_api.post();
};
Twinkle.fluff.userIpLink = function( user ) {
return (Morebits.isIPAddress(user) ? "[[Special:Contributions/" : "[[User:" ) + user + "|" + user + "]]";
};
Twinkle.fluff.callbacks = {
toRevision: {
main: function( self ) {
var xmlDoc = self.responseXML;
var lastrevid = parseInt( $(xmlDoc).find('page').attr('lastrevid'), 10);
var touched = $(xmlDoc).find('page').attr('touched');
var starttimestamp = $(xmlDoc).find('page').attr('starttimestamp');
var edittoken = $(xmlDoc).find('page').attr('edittoken');
var revertToRevID = $(xmlDoc).find('rev').attr('revid');
var revertToUser = $(xmlDoc).find('rev').attr('user');
if (revertToRevID !== self.params.rev) {
self.statitem.error( 'The retrieved revision does not match the requested revision. Aborting.' );
return;
}
var optional_summary = prompt( "Please specify a reason for the revert: ", "" ); // padded out to widen prompt in Firefox
if (optional_summary === null)
{
self.statelem.error( 'Aborted by user.' );
return;
}
var summary = Twinkle.fluff.formatSummary("Reverted to revision " + revertToRevID + " by $USER", revertToUser, optional_summary);
var query = {
'action': 'edit',
'title': mw.config.get('wgPageName'),
'summary': summary,
'token': edittoken,
'undo': lastrevid,
'undoafter': revertToRevID,
'basetimestamp': touched,
'starttimestamp': starttimestamp,
'watchlist': Twinkle.getPref('watchRevertedPages').indexOf( self.params.type ) !== -1 ? 'watch' : undefined,
'minor': Twinkle.getPref('markRevertedPagesAsMinor').indexOf( self.params.type ) !== -1 ? true : undefined
};
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Reversion completed";
var wikipedia_api = new Morebits.wiki.api( 'Saving reverted contents', query, Twinkle.fluff.callbacks.complete, self.statelem);
wikipedia_api.params = self.params;
wikipedia_api.post();
}
},
main: function( self ) {
var xmlDoc = self.responseXML;
var lastrevid = parseInt( $(xmlDoc).find('page').attr('lastrevid'), 10);
var touched = $(xmlDoc).find('page').attr('touched');
var starttimestamp = $(xmlDoc).find('page').attr('starttimestamp');
var edittoken = $(xmlDoc).find('page').attr('edittoken');
var lastuser = $(xmlDoc).find('rev').attr('user');
var revs = $(xmlDoc).find('rev');
if( revs.length < 1 ) {
self.statelem.error( 'We have less than one additional revision, thus impossible to revert' );
return;
}
var top = revs[0];
if( lastrevid < self.params.revid ) {
Morebits.status.error( 'Error', [ 'The most recent revision ID received from the server, ', Morebits.htmlNode( 'strong', lastrevid ), ', is less than the ID of the displayed revision. This could indicate that the current revision has been deleted, the server is lagging, or that bad data has been received. Will stop proceeding at this point.' ] );
return;
}
var index = 1;
if( self.params.revid !== lastrevid ) {
Morebits.status.warn( 'Warning', [ 'Latest revision ', Morebits.htmlNode( 'strong', lastrevid ), ' doesn\'t equal our revision ', Morebits.htmlNode( 'strong', self.params.revid ) ] );
if( lastuser === self.params.user ) {
switch( self.params.type ) {
case 'vand':
Morebits.status.info( 'Info', [ 'Latest revision was made by ', Morebits.htmlNode( 'strong', self.params.user ) , '. As we assume vandalism, we continue to revert' ]);
break;
case 'agf':
Morebits.status.warn( 'Warning', [ 'Latest revision was made by ', Morebits.htmlNode( 'strong', self.params.user ) , '. As we assume good faith, we stop reverting, as the problem might have been fixed.' ]);
return;
default:
Morebits.status.warn( 'Notice', [ 'Latest revision was made by ', Morebits.htmlNode( 'strong', self.params.user ) , ', but we will stop reverting anyway.' ] );
return;
}
}
else if(self.params.type === 'vand' &&
Twinkle.fluff.whiteList.indexOf( top.getAttribute( 'user' ) ) !== -1 && revs.length > 1 &&
revs[1].getAttribute( 'pageId' ) === self.params.revid) {
Morebits.status.info( 'Info', [ 'Latest revision was made by ', Morebits.htmlNode( 'strong', lastuser ), ', a trusted bot, and the revision before was made by our vandal, so we proceed with the revert.' ] );
index = 2;
} else {
Morebits.status.error( 'Error', [ 'Latest revision was made by ', Morebits.htmlNode( 'strong', lastuser ), ', so it might have already been reverted, stopping reverting.'] );
return;
}
}
if( Twinkle.fluff.whiteList.indexOf( self.params.user ) !== -1 ) {
switch( self.params.type ) {
case 'vand':
Morebits.status.info( 'Info', [ 'Vandalism revert was chosen on ', Morebits.htmlNode( 'strong', self.params.user ), '. As this is a whitelisted bot, we assume you wanted to revert vandalism made by the previous user instead.' ] );
index = 2;
self.params.user = revs[1].getAttribute( 'user' );
break;
case 'agf':
Morebits.status.warn( 'Notice', [ 'Good faith revert was chosen on ', Morebits.htmlNode( 'strong', self.params.user ), '. This is a whitelisted bot, and since bots have no faith, AGF rollback will not proceed.' ] );
return;
case 'norm':
/* falls through */
default:
var cont = confirm( 'Normal revert was chosen, but the most recent edit was made by a whitelisted bot (' + self.params.user + '). Do you want to revert the revision before instead?' );
if( cont ) {
Morebits.status.info( 'Info', [ 'Normal revert was chosen on ', Morebits.htmlNode( 'strong', self.params.user ), '. This is a whitelisted bot, and per confirmation, we\'ll revert the previous revision instead.' ] );
index = 2;
self.params.user = revs[1].getAttribute( 'user' );
} else {
Morebits.status.warn( 'Notice', [ 'Normal revert was chosen on ', Morebits.htmlNode( 'strong', self.params.user ), '. This is a whitelisted bot, but per confirmation, revert on top revision will proceed.' ] );
}
break;
}
}
var found = false;
var count = 0;
for( var i = index; i < revs.length; ++i ) {
++count;
if( revs[i].getAttribute( 'user' ) !== self.params.user ) {
found = i;
break;
}
}
if( ! found ) {
self.statelem.error( [ 'No previous revision found. Perhaps ', Morebits.htmlNode( 'strong', self.params.user ), ' is the only contributor, or that the user has made more than ' + Twinkle.getPref('revertMaxRevisions') + ' edits in a row.' ] );
return;
}
if( ! count ) {
Morebits.status.error( 'Error', "We were to revert zero revisions. As that makes no sense, we'll stop reverting this time. It could be that the edit has already been reverted, but the revision ID was still the same." );
return;
}
var good_revision = revs[ found ];
var userHasAlreadyConfirmedAction = false;
if (self.params.type !== 'vand' && count > 1) {
if ( !confirm( self.params.user + ' has made ' + count + ' edits in a row. Are you sure you want to revert them all?') ) {
Morebits.status.info( 'Notice', 'Stopping reverting per user input' );
return;
}
userHasAlreadyConfirmedAction = true;
}
self.params.count = count;
self.params.goodid = good_revision.getAttribute( 'revid' );
self.params.gooduser = good_revision.getAttribute( 'user' );
self.statelem.status( [ ' revision ', Morebits.htmlNode( 'strong', self.params.goodid ), ' that was made ', Morebits.htmlNode( 'strong', count ), ' revisions ago by ', Morebits.htmlNode( 'strong', self.params.gooduser ) ] );
var summary, extra_summary;
switch( self.params.type ) {
case 'agf':
extra_summary = prompt( "An optional comment for the edit summary: ", "" ); // padded out to widen prompt in Firefox
if (extra_summary === null)
{
self.statelem.error( 'Aborted by user.' );
return;
}
userHasAlreadyConfirmedAction = true;
summary = Twinkle.fluff.formatSummary("Reverted [[WP:AGF|good faith]] edits by $USER", self.params.user, extra_summary);
break;
case 'vand':
summary = "Reverted " + self.params.count + (self.params.count > 1 ? ' edits' : ' edit') + " by [[Special:Contributions/" +
self.params.user + "|" + self.params.user + "]] ([[User talk:" + self.params.user + "|talk]]) to last revision by " +
self.params.gooduser + "." + Twinkle.getPref('summaryAd');
break;
case 'norm':
/* falls through */
default:
if( Twinkle.getPref('offerReasonOnNormalRevert') ) {
extra_summary = prompt( "An optional comment for the edit summary: ", "" ); // padded out to widen prompt in Firefox
if (extra_summary === null)
{
self.statelem.error( 'Aborted by user.' );
return;
}
userHasAlreadyConfirmedAction = true;
}
summary = Twinkle.fluff.formatSummary("Reverted " + self.params.count + (self.params.count > 1 ? ' edits' : ' edit') +
" by $USER", self.params.user, extra_summary);
break;
}
if (Twinkle.getPref('confirmOnFluff') && !userHasAlreadyConfirmedAction && !confirm("Reverting page: are you sure?")) {
self.statelem.error( 'Aborted by user.' );
return;
}
var query;
if( (!self.params.autoRevert || Twinkle.getPref('openTalkPageOnAutoRevert')) &&
Twinkle.getPref('openTalkPage').indexOf( self.params.type ) !== -1 &&
mw.config.get('wgUserName') !== self.params.user ) {
Morebits.status.info( 'Info', [ 'Opening user talk page edit form for user ', Morebits.htmlNode( 'strong', self.params.user ) ] );
query = {
'title': 'User talk:' + self.params.user,
'action': 'edit',
'preview': 'yes',
'vanarticle': self.params.pagename.replace(/_/g, ' '),
'vanarticlerevid': self.params.revid,
'vanarticlegoodrevid': self.params.goodid,
'type': self.params.type,
'count': self.params.count
};
switch( Twinkle.getPref('userTalkPageMode') ) {
case 'tab':
window.open( mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ), '_blank' );
break;
case 'blank':
window.open( mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ), '_blank',
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800' );
break;
case 'window':
/* falls through */
default:
window.open( mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ),
( window.name === 'twinklewarnwindow' ? '_blank' : 'twinklewarnwindow' ),
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800' );
break;
}
}
// figure out whether we need to/can review the edit
var $flagged = $(xmlDoc).find('flagged');
if ((Morebits.userIsInGroup('reviewer') || Morebits.userIsInGroup('sysop')) &&
$flagged.length &&
$flagged.attr("stable_revid") >= self.params.goodid &&
$flagged.attr("pending_since")) {
self.params.reviewRevert = true;
self.params.edittoken = edittoken;
}
query = {
'action': 'edit',
'title': self.params.pagename,
'summary': summary,
'token': edittoken,
'undo': lastrevid,
'undoafter': self.params.goodid,
'basetimestamp': touched,
'starttimestamp': starttimestamp,
'watchlist' : Twinkle.getPref('watchRevertedPages').indexOf( self.params.type ) !== -1 ? 'watch' : undefined,
'minor': Twinkle.getPref('markRevertedPagesAsMinor').indexOf( self.params.type ) !== -1 ? true : undefined
};
Morebits.wiki.actionCompleted.redirect = self.params.pagename;
Morebits.wiki.actionCompleted.notice = "Reversion completed";
var wikipedia_api = new Morebits.wiki.api( 'Saving reverted contents', query, Twinkle.fluff.callbacks.complete, self.statelem);
wikipedia_api.params = self.params;
wikipedia_api.post();
},
complete: function (apiobj) {
var $edit = $(apiobj.getXML()).find('edit');
var blacklist = $edit.attr('spamblacklist');
if (blacklist) {
var code = document.createElement('code');
code.style.fontFamily = "monospace";
code.appendChild(document.createTextNode(blacklist));
apiobj.statelem.error(['Could not rollback because the URL ', code, ' is on the spam blacklist.']);
} else if ($edit.attr('nochange') === '') {
apiobj.statelem.warn("Revision we are reverting to is identical to current revision: Nothing to do");
} else {
apiobj.statelem.info("done");
// review the revert, if needed
if (apiobj.params.reviewRevert) {
var query = {
'action': 'review',
'revid': $edit.attr('newrevid'),
'token': apiobj.params.edittoken,
'comment': Twinkle.getPref('summaryAd').trim()
};
var wikipedia_api = new Morebits.wiki.api('Automatically accepting your changes', query);
wikipedia_api.post();
}
}
}
};
// builtInString should contain the string "$USER", which will be replaced
// by an appropriate user link
Twinkle.fluff.formatSummary = function(builtInString, userName, userString) {
var result = builtInString;
// append user's custom reason with requisite punctuation
if (userString) {
result += ': ' + Morebits.string.toUpperCaseFirstChar(userString);
if (userString.search(/[.?!;]$/) === -1) {
result += '.';
}
} else {
result += '.';
}
result += Twinkle.getPref('summaryAd');
// find number of UTF-8 bytes the resulting string takes up, and possibly add
// a contributions or contributions+talk link if it doesn't push the edit summary
// over the 255-byte limit
var resultLen = unescape(encodeURIComponent(result.replace("$USER", ""))).length;
var contribsLink = "[[Special:Contributions/" + userName + "|" + userName + "]]";
var contribsLen = unescape(encodeURIComponent(contribsLink)).length;
if (resultLen + contribsLen <= 255) {
var talkLink = " ([[User talk:" + userName + "|talk]])";
if (resultLen + contribsLen + unescape(encodeURIComponent(talkLink)).length <= 255) {
result = result.replace("$USER", contribsLink + talkLink);
} else {
result = result.replace("$USER", contribsLink);
}
} else {
result = result.replace("$USER", userName);
}
return result;
};
Twinkle.fluff.init = function twinklefluffinit() {
if (Twinkle.userAuthorized)
{
// A list of usernames, usually only bots, that vandalism revert is jumped over; that is,
// if vandalism revert was chosen on such username, then its target is on the revision before.
// This is for handling quick bots that makes edits seconds after the original edit is made.
// This only affects vandalism rollback; for good faith rollback, it will stop, indicating a bot
// has no faith, and for normal rollback, it will rollback that edit.
Twinkle.fluff.whiteList = [
'AnomieBOT',
'SineBot'
];
if ( Morebits.queryString.exists( 'twinklerevert' ) ) {
Twinkle.fluff.auto();
} else {
Twinkle.fluff.normal();
}
}
};
})(jQuery);
//</nowiki>
99cd418ee279386bc93e541885ae63808f44e63d
337
2014-01-07T11:38:58Z
Amalthea
0
v2.0-682-ge4735d6: Linting
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklefluff.js: Revert/rollback module
****************************************
* Mode of invocation: Links on history, contributions, and diff pages
* Active on: Diff pages, history pages, contributions pages
* Config directives in: TwinkleConfig
*/
/**
Twinklefluff revert and antivandalism utility
*/
Twinkle.fluff = {
auto: function() {
if( parseInt( Morebits.queryString.get('oldid'), 10) !== mw.config.get('wgCurRevisionId') ) {
// not latest revision
alert("Can't rollback, page has changed in the meantime.");
return;
}
var vandal = $("#mw-diff-ntitle2").find("a.mw-userlink").text();
Twinkle.fluff.revert( Morebits.queryString.get( 'twinklerevert' ), vandal, true );
},
normal: function() {
var spanTag = function( color, content ) {
var span = document.createElement( 'span' );
span.style.color = color;
span.appendChild( document.createTextNode( content ) );
return span;
};
if( mw.config.get('wgNamespaceNumber') === -1 && mw.config.get('wgCanonicalSpecialPageName') === "Contributions" ) {
//Get the username these contributions are for
var username = decodeURIComponent(/wiki\/Special:Log\/(.+)$/.exec($('#contentSub').find('a[title^="Special:Log"]').last().attr("href").replace(/_/g, "%20"))[1]);
if( Twinkle.getPref('showRollbackLinks').indexOf('contribs') !== -1 ||
( mw.config.get('wgUserName') !== username && Twinkle.getPref('showRollbackLinks').indexOf('others') !== -1 ) ||
( mw.config.get('wgUserName') === username && Twinkle.getPref('showRollbackLinks').indexOf('mine') !== -1 ) ) {
var list = $("#mw-content-text").find("ul li:has(span.mw-uctop)");
var revNode = document.createElement('strong');
var revLink = document.createElement('a');
revLink.appendChild( spanTag( 'Black', '[' ) );
revLink.appendChild( spanTag( 'SteelBlue', 'rollback' ) );
revLink.appendChild( spanTag( 'Black', ']' ) );
revNode.appendChild(revLink);
var revVandNode = document.createElement('strong');
var revVandLink = document.createElement('a');
revVandLink.appendChild( spanTag( 'Black', '[' ) );
revVandLink.appendChild( spanTag( 'Red', 'vandalism' ) );
revVandLink.appendChild( spanTag( 'Black', ']' ) );
revVandNode.appendChild(revVandLink);
list.each(function(key, current) {
var href = $(current).children("a:eq(1)").attr("href");
current.appendChild( document.createTextNode(' ') );
var tmpNode = revNode.cloneNode( true );
tmpNode.firstChild.setAttribute( 'href', href + '&' + Morebits.queryString.create( { 'twinklerevert': 'norm' } ) );
current.appendChild( tmpNode );
current.appendChild( document.createTextNode(' ') );
tmpNode = revVandNode.cloneNode( true );
tmpNode.firstChild.setAttribute( 'href', href + '&' + Morebits.queryString.create( { 'twinklerevert': 'vand' } ) );
current.appendChild( tmpNode );
});
}
} else {
if( mw.config.get('wgCanonicalSpecialPageName') === "Undelete" ) {
//You can't rollback deleted pages!
return;
}
var firstRev = $("div.firstrevisionheader").length;
if( firstRev ) {
// we have first revision here, nothing to do.
return;
}
var otitle, ntitle;
try {
var otitle1 = document.getElementById('mw-diff-otitle1');
var ntitle1 = document.getElementById('mw-diff-ntitle1');
if (!otitle1 || !ntitle1) {
return;
}
otitle = otitle1.parentNode;
ntitle = ntitle1.parentNode;
} catch( e ) {
// no old, nor new title, nothing to do really, return;
return;
}
var old_rev_url = $("#mw-diff-otitle1").find("strong a").attr("href");
// Lets first add a [edit this revision] link
var query = new Morebits.queryString( old_rev_url.split( '?', 2 )[1] );
var oldrev = query.get('oldid');
var revertToRevision = document.createElement('div');
revertToRevision.setAttribute( 'id', 'tw-revert-to-orevision' );
revertToRevision.style.fontWeight = 'bold';
var revertToRevisionLink = revertToRevision.appendChild( document.createElement('a') );
revertToRevisionLink.href = "#";
$(revertToRevisionLink).click(function(){
Twinkle.fluff.revertToRevision(oldrev);
});
revertToRevisionLink.appendChild( spanTag( 'Black', '[' ) );
revertToRevisionLink.appendChild( spanTag( 'SaddleBrown', 'restore this version' ) );
revertToRevisionLink.appendChild( spanTag( 'Black', ']' ) );
otitle.insertBefore( revertToRevision, otitle.firstChild );
if( document.getElementById('differences-nextlink') ) {
// Not latest revision
var curVersion = false;
var new_rev_url = $("#mw-diff-ntitle1").find("strong a").attr("href");
query = new Morebits.queryString( new_rev_url.split( '?', 2 )[1] );
var newrev = query.get('oldid');
revertToRevision = document.createElement('div');
revertToRevision.setAttribute( 'id', 'tw-revert-to-nrevision' );
revertToRevision.style.fontWeight = 'bold';
revertToRevisionLink = revertToRevision.appendChild( document.createElement('a') );
revertToRevisionLink.href = "#";
$(revertToRevisionLink).click(function(){
Twinkle.fluff.revertToRevision(newrev);
});
revertToRevisionLink.appendChild( spanTag( 'Black', '[' ) );
revertToRevisionLink.appendChild( spanTag( 'SaddleBrown', 'restore this version' ) );
revertToRevisionLink.appendChild( spanTag( 'Black', ']' ) );
ntitle.insertBefore( revertToRevision, ntitle.firstChild );
return;
}
if( Twinkle.getPref('showRollbackLinks').indexOf('diff') !== -1 ) {
var vandal = $("#mw-diff-ntitle2").find("a").first().text();
var revertNode = document.createElement('div');
revertNode.setAttribute( 'id', 'tw-revert' );
var agfNode = document.createElement('strong');
var vandNode = document.createElement('strong');
var normNode = document.createElement('strong');
var agfLink = document.createElement('a');
var vandLink = document.createElement('a');
var normLink = document.createElement('a');
agfLink.href = "#";
vandLink.href = "#";
normLink.href = "#";
$(agfLink).click(function(){
Twinkle.fluff.revert('agf', vandal);
});
$(vandLink).click(function(){
Twinkle.fluff.revert('vand', vandal);
});
$(normLink).click(function(){
Twinkle.fluff.revert('norm', vandal);
});
agfLink.appendChild( spanTag( 'Black', '[' ) );
agfLink.appendChild( spanTag( 'DarkOliveGreen', 'rollback (AGF)' ) );
agfLink.appendChild( spanTag( 'Black', ']' ) );
vandLink.appendChild( spanTag( 'Black', '[' ) );
vandLink.appendChild( spanTag( 'Red', 'rollback (VANDAL)' ) );
vandLink.appendChild( spanTag( 'Black', ']' ) );
normLink.appendChild( spanTag( 'Black', '[' ) );
normLink.appendChild( spanTag( 'SteelBlue', 'rollback' ) );
normLink.appendChild( spanTag( 'Black', ']' ) );
agfNode.appendChild(agfLink);
vandNode.appendChild(vandLink);
normNode.appendChild(normLink);
revertNode.appendChild( agfNode );
revertNode.appendChild( document.createTextNode(' || ') );
revertNode.appendChild( normNode );
revertNode.appendChild( document.createTextNode(' || ') );
revertNode.appendChild( vandNode );
ntitle.insertBefore( revertNode, ntitle.firstChild );
}
}
}
};
Twinkle.fluff.revert = function revertPage( type, vandal, autoRevert, rev, page ) {
var pagename = page || mw.config.get('wgPageName');
var revid = rev || mw.config.get('wgCurRevisionId');
Morebits.status.init( document.getElementById('mw-content-text') );
$( '#catlinks' ).remove();
var params = {
type: type,
user: vandal,
pagename: pagename,
revid: revid,
autoRevert: !!autoRevert
};
var query = {
'action': 'query',
'prop': ['info', 'revisions', 'flagged'],
'titles': pagename,
'rvlimit': 50, // max possible
'rvprop': [ 'ids', 'timestamp', 'user', 'comment' ],
'intoken': 'edit'
};
var wikipedia_api = new Morebits.wiki.api( 'Grabbing data of earlier revisions', query, Twinkle.fluff.callbacks.main );
wikipedia_api.params = params;
wikipedia_api.post();
};
Twinkle.fluff.revertToRevision = function revertToRevision( oldrev ) {
Morebits.status.init( document.getElementById('mw-content-text') );
var query = {
'action': 'query',
'prop': ['info', 'revisions'],
'titles': mw.config.get('wgPageName'),
'rvlimit': 1,
'rvstartid': oldrev,
'rvprop': [ 'ids', 'timestamp', 'user', 'comment' ],
'intoken': 'edit',
'format': 'xml'
};
var wikipedia_api = new Morebits.wiki.api( 'Grabbing data of the earlier revision', query, Twinkle.fluff.callbacks.toRevision.main );
wikipedia_api.params = { rev: oldrev };
wikipedia_api.post();
};
Twinkle.fluff.userIpLink = function( user ) {
return (Morebits.isIPAddress(user) ? "[[Special:Contributions/" : "[[User:" ) + user + "|" + user + "]]";
};
Twinkle.fluff.callbacks = {
toRevision: {
main: function( self ) {
var xmlDoc = self.responseXML;
var lastrevid = parseInt( $(xmlDoc).find('page').attr('lastrevid'), 10);
var touched = $(xmlDoc).find('page').attr('touched');
var starttimestamp = $(xmlDoc).find('page').attr('starttimestamp');
var edittoken = $(xmlDoc).find('page').attr('edittoken');
var revertToRevID = $(xmlDoc).find('rev').attr('revid');
var revertToUser = $(xmlDoc).find('rev').attr('user');
if (revertToRevID !== self.params.rev) {
self.statitem.error( 'The retrieved revision does not match the requested revision. Aborting.' );
return;
}
var optional_summary = prompt( "Please specify a reason for the revert: ", "" ); // padded out to widen prompt in Firefox
if (optional_summary === null)
{
self.statelem.error( 'Aborted by user.' );
return;
}
var summary = Twinkle.fluff.formatSummary("Reverted to revision " + revertToRevID + " by $USER", revertToUser, optional_summary);
var query = {
'action': 'edit',
'title': mw.config.get('wgPageName'),
'summary': summary,
'token': edittoken,
'undo': lastrevid,
'undoafter': revertToRevID,
'basetimestamp': touched,
'starttimestamp': starttimestamp,
'watchlist': Twinkle.getPref('watchRevertedPages').indexOf( self.params.type ) !== -1 ? 'watch' : undefined,
'minor': Twinkle.getPref('markRevertedPagesAsMinor').indexOf( self.params.type ) !== -1 ? true : undefined
};
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Reversion completed";
var wikipedia_api = new Morebits.wiki.api( 'Saving reverted contents', query, Twinkle.fluff.callbacks.complete, self.statelem);
wikipedia_api.params = self.params;
wikipedia_api.post();
}
},
main: function( self ) {
var xmlDoc = self.responseXML;
var lastrevid = parseInt( $(xmlDoc).find('page').attr('lastrevid'), 10);
var touched = $(xmlDoc).find('page').attr('touched');
var starttimestamp = $(xmlDoc).find('page').attr('starttimestamp');
var edittoken = $(xmlDoc).find('page').attr('edittoken');
var lastuser = $(xmlDoc).find('rev').attr('user');
var revs = $(xmlDoc).find('rev');
if( revs.length < 1 ) {
self.statelem.error( 'We have less than one additional revision, thus impossible to revert' );
return;
}
var top = revs[0];
if( lastrevid < self.params.revid ) {
Morebits.status.error( 'Error', [ 'The most recent revision ID received from the server, ', Morebits.htmlNode( 'strong', lastrevid ), ', is less than the ID of the displayed revision. This could indicate that the current revision has been deleted, the server is lagging, or that bad data has been received. Will stop proceeding at this point.' ] );
return;
}
var index = 1;
if( self.params.revid !== lastrevid ) {
Morebits.status.warn( 'Warning', [ 'Latest revision ', Morebits.htmlNode( 'strong', lastrevid ), ' doesn\'t equal our revision ', Morebits.htmlNode( 'strong', self.params.revid ) ] );
if( lastuser === self.params.user ) {
switch( self.params.type ) {
case 'vand':
Morebits.status.info( 'Info', [ 'Latest revision was made by ', Morebits.htmlNode( 'strong', self.params.user ) , '. As we assume vandalism, we continue to revert' ]);
break;
case 'agf':
Morebits.status.warn( 'Warning', [ 'Latest revision was made by ', Morebits.htmlNode( 'strong', self.params.user ) , '. As we assume good faith, we stop reverting, as the problem might have been fixed.' ]);
return;
default:
Morebits.status.warn( 'Notice', [ 'Latest revision was made by ', Morebits.htmlNode( 'strong', self.params.user ) , ', but we will stop reverting anyway.' ] );
return;
}
}
else if(self.params.type === 'vand' &&
Twinkle.fluff.whiteList.indexOf( top.getAttribute( 'user' ) ) !== -1 && revs.length > 1 &&
revs[1].getAttribute( 'pageId' ) === self.params.revid) {
Morebits.status.info( 'Info', [ 'Latest revision was made by ', Morebits.htmlNode( 'strong', lastuser ), ', a trusted bot, and the revision before was made by our vandal, so we proceed with the revert.' ] );
index = 2;
} else {
Morebits.status.error( 'Error', [ 'Latest revision was made by ', Morebits.htmlNode( 'strong', lastuser ), ', so it might have already been reverted, stopping reverting.'] );
return;
}
}
if( Twinkle.fluff.whiteList.indexOf( self.params.user ) !== -1 ) {
switch( self.params.type ) {
case 'vand':
Morebits.status.info( 'Info', [ 'Vandalism revert was chosen on ', Morebits.htmlNode( 'strong', self.params.user ), '. As this is a whitelisted bot, we assume you wanted to revert vandalism made by the previous user instead.' ] );
index = 2;
self.params.user = revs[1].getAttribute( 'user' );
break;
case 'agf':
Morebits.status.warn( 'Notice', [ 'Good faith revert was chosen on ', Morebits.htmlNode( 'strong', self.params.user ), '. This is a whitelisted bot, and since bots have no faith, AGF rollback will not proceed.' ] );
return;
case 'norm':
/* falls through */
default:
var cont = confirm( 'Normal revert was chosen, but the most recent edit was made by a whitelisted bot (' + self.params.user + '). Do you want to revert the revision before instead?' );
if( cont ) {
Morebits.status.info( 'Info', [ 'Normal revert was chosen on ', Morebits.htmlNode( 'strong', self.params.user ), '. This is a whitelisted bot, and per confirmation, we\'ll revert the previous revision instead.' ] );
index = 2;
self.params.user = revs[1].getAttribute( 'user' );
} else {
Morebits.status.warn( 'Notice', [ 'Normal revert was chosen on ', Morebits.htmlNode( 'strong', self.params.user ), '. This is a whitelisted bot, but per confirmation, revert on top revision will proceed.' ] );
}
break;
}
}
var found = false;
var count = 0;
for( var i = index; i < revs.length; ++i ) {
++count;
if( revs[i].getAttribute( 'user' ) !== self.params.user ) {
found = i;
break;
}
}
if( ! found ) {
self.statelem.error( [ 'No previous revision found. Perhaps ', Morebits.htmlNode( 'strong', self.params.user ), ' is the only contributor, or that the user has made more than ' + Twinkle.getPref('revertMaxRevisions') + ' edits in a row.' ] );
return;
}
if( ! count ) {
Morebits.status.error( 'Error', "We were to revert zero revisions. As that makes no sense, we'll stop reverting this time. It could be that the edit has already been reverted, but the revision ID was still the same." );
return;
}
var good_revision = revs[ found ];
var userHasAlreadyConfirmedAction = false;
if (self.params.type !== 'vand' && count > 1) {
if ( !confirm( self.params.user + ' has made ' + count + ' edits in a row. Are you sure you want to revert them all?') ) {
Morebits.status.info( 'Notice', 'Stopping reverting per user input' );
return;
}
userHasAlreadyConfirmedAction = true;
}
self.params.count = count;
self.params.goodid = good_revision.getAttribute( 'revid' );
self.params.gooduser = good_revision.getAttribute( 'user' );
self.statelem.status( [ ' revision ', Morebits.htmlNode( 'strong', self.params.goodid ), ' that was made ', Morebits.htmlNode( 'strong', count ), ' revisions ago by ', Morebits.htmlNode( 'strong', self.params.gooduser ) ] );
var summary, extra_summary;
switch( self.params.type ) {
case 'agf':
extra_summary = prompt( "An optional comment for the edit summary: ", "" ); // padded out to widen prompt in Firefox
if (extra_summary === null)
{
self.statelem.error( 'Aborted by user.' );
return;
}
userHasAlreadyConfirmedAction = true;
summary = Twinkle.fluff.formatSummary("Reverted [[WP:AGF|good faith]] edits by $USER", self.params.user, extra_summary);
break;
case 'vand':
summary = "Reverted " + self.params.count + (self.params.count > 1 ? ' edits' : ' edit') + " by [[Special:Contributions/" +
self.params.user + "|" + self.params.user + "]] ([[User talk:" + self.params.user + "|talk]]) to last revision by " +
self.params.gooduser + "." + Twinkle.getPref('summaryAd');
break;
case 'norm':
/* falls through */
default:
if( Twinkle.getPref('offerReasonOnNormalRevert') ) {
extra_summary = prompt( "An optional comment for the edit summary: ", "" ); // padded out to widen prompt in Firefox
if (extra_summary === null)
{
self.statelem.error( 'Aborted by user.' );
return;
}
userHasAlreadyConfirmedAction = true;
}
summary = Twinkle.fluff.formatSummary("Reverted " + self.params.count + (self.params.count > 1 ? ' edits' : ' edit') +
" by $USER", self.params.user, extra_summary);
break;
}
if (Twinkle.getPref('confirmOnFluff') && !userHasAlreadyConfirmedAction && !confirm("Reverting page: are you sure?")) {
self.statelem.error( 'Aborted by user.' );
return;
}
var query;
if( (!self.params.autoRevert || Twinkle.getPref('openTalkPageOnAutoRevert')) &&
Twinkle.getPref('openTalkPage').indexOf( self.params.type ) !== -1 &&
mw.config.get('wgUserName') !== self.params.user ) {
Morebits.status.info( 'Info', [ 'Opening user talk page edit form for user ', Morebits.htmlNode( 'strong', self.params.user ) ] );
query = {
'title': 'User talk:' + self.params.user,
'action': 'edit',
'preview': 'yes',
'vanarticle': self.params.pagename.replace(/_/g, ' '),
'vanarticlerevid': self.params.revid,
'vanarticlegoodrevid': self.params.goodid,
'type': self.params.type,
'count': self.params.count
};
switch( Twinkle.getPref('userTalkPageMode') ) {
case 'tab':
window.open( mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ), '_blank' );
break;
case 'blank':
window.open( mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ), '_blank',
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800' );
break;
case 'window':
/* falls through */
default:
window.open( mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ),
( window.name === 'twinklewarnwindow' ? '_blank' : 'twinklewarnwindow' ),
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800' );
break;
}
}
// figure out whether we need to/can review the edit
var $flagged = $(xmlDoc).find('flagged');
if ((Morebits.userIsInGroup('reviewer') || Morebits.userIsInGroup('sysop')) &&
$flagged.length &&
$flagged.attr("stable_revid") >= self.params.goodid &&
$flagged.attr("pending_since")) {
self.params.reviewRevert = true;
self.params.edittoken = edittoken;
}
query = {
'action': 'edit',
'title': self.params.pagename,
'summary': summary,
'token': edittoken,
'undo': lastrevid,
'undoafter': self.params.goodid,
'basetimestamp': touched,
'starttimestamp': starttimestamp,
'watchlist' : Twinkle.getPref('watchRevertedPages').indexOf( self.params.type ) !== -1 ? 'watch' : undefined,
'minor': Twinkle.getPref('markRevertedPagesAsMinor').indexOf( self.params.type ) !== -1 ? true : undefined
};
Morebits.wiki.actionCompleted.redirect = self.params.pagename;
Morebits.wiki.actionCompleted.notice = "Reversion completed";
var wikipedia_api = new Morebits.wiki.api( 'Saving reverted contents', query, Twinkle.fluff.callbacks.complete, self.statelem);
wikipedia_api.params = self.params;
wikipedia_api.post();
},
complete: function (apiobj) {
var $edit = $(apiobj.getXML()).find('edit');
var blacklist = $edit.attr('spamblacklist');
if (blacklist) {
var code = document.createElement('code');
code.style.fontFamily = "monospace";
code.appendChild(document.createTextNode(blacklist));
apiobj.statelem.error(['Could not rollback because the URL ', code, ' is on the spam blacklist.']);
} else if ($edit.attr('nochange') === '') {
apiobj.statelem.warn("Revision we are reverting to is identical to current revision: Nothing to do");
} else {
apiobj.statelem.info("done");
// review the revert, if needed
if (apiobj.params.reviewRevert) {
var query = {
'action': 'review',
'revid': $edit.attr('newrevid'),
'token': apiobj.params.edittoken,
'comment': Twinkle.getPref('summaryAd').trim()
};
var wikipedia_api = new Morebits.wiki.api('Automatically accepting your changes', query);
wikipedia_api.post();
}
}
}
};
// builtInString should contain the string "$USER", which will be replaced
// by an appropriate user link
Twinkle.fluff.formatSummary = function(builtInString, userName, userString) {
var result = builtInString;
// append user's custom reason with requisite punctuation
if (userString) {
result += ': ' + Morebits.string.toUpperCaseFirstChar(userString);
if (userString.search(/[.?!;]$/) === -1) {
result += '.';
}
} else {
result += '.';
}
result += Twinkle.getPref('summaryAd');
// find number of UTF-8 bytes the resulting string takes up, and possibly add
// a contributions or contributions+talk link if it doesn't push the edit summary
// over the 255-byte limit
var resultLen = unescape(encodeURIComponent(result.replace("$USER", ""))).length;
var contribsLink = "[[Special:Contributions/" + userName + "|" + userName + "]]";
var contribsLen = unescape(encodeURIComponent(contribsLink)).length;
if (resultLen + contribsLen <= 255) {
var talkLink = " ([[User talk:" + userName + "|talk]])";
if (resultLen + contribsLen + unescape(encodeURIComponent(talkLink)).length <= 255) {
result = result.replace("$USER", contribsLink + talkLink);
} else {
result = result.replace("$USER", contribsLink);
}
} else {
result = result.replace("$USER", userName);
}
return result;
};
Twinkle.fluff.init = function twinklefluffinit() {
if (Twinkle.userAuthorized)
{
// A list of usernames, usually only bots, that vandalism revert is jumped over; that is,
// if vandalism revert was chosen on such username, then its target is on the revision before.
// This is for handling quick bots that makes edits seconds after the original edit is made.
// This only affects vandalism rollback; for good faith rollback, it will stop, indicating a bot
// has no faith, and for normal rollback, it will rollback that edit.
Twinkle.fluff.whiteList = [
'AnomieBOT',
'SineBot'
];
if ( Morebits.queryString.exists( 'twinklerevert' ) ) {
Twinkle.fluff.auto();
} else {
Twinkle.fluff.normal();
}
}
};
})(jQuery);
//</nowiki>
99cd418ee279386bc93e541885ae63808f44e63d
MediaWiki:Gadget-twinkleimage.js
8
119
308
307
2014-01-17T00:43:56Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkleimage.js: Image CSD module
****************************************
* Mode of invocation: Tab ("DI")
* Active on: File pages with a corresponding file which is local (not on Commons)
* Config directives in: TwinkleConfig
*/
Twinkle.image = function twinkleimage() {
if (mw.config.get('wgNamespaceNumber') === 6 &&
!document.getElementById("mw-sharedupload") &&
document.getElementById("mw-imagepage-section-filehistory")) {
Twinkle.addPortletLink(Twinkle.image.callback, "DI", "tw-di", "Nominate file for delayed speedy deletion");
}
};
Twinkle.image.callback = function twinkleimageCallback() {
var Window = new Morebits.simpleWindow( 600, 330 );
Window.setTitle( "File for dated speedy deletion" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Speedy deletion policy", "WP:CSD" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#image" );
var form = new Morebits.quickForm( Twinkle.image.callback.evaluate );
form.append( {
type: 'checkbox',
list: [
{
label: 'Notify original uploader',
value: 'notify',
name: 'notify',
tooltip: "Uncheck this if you are planning to make multiple nominations from the same user, and don't want to overload their talk page with too many notifications.",
checked: Twinkle.getPref('notifyUserOnDeli')
}
]
}
);
var field = form.append( {
type: 'field',
label: 'Type of action wanted'
} );
field.append( {
type: 'radio',
name: 'type',
event: Twinkle.image.callback.choice,
list: [
{
label: 'No source (CSD F4)',
value: 'no source',
checked: true,
tooltip: 'Image or media has no source information'
},
{
label: 'No license (CSD F4)',
value: 'no license',
tooltip: 'Image or media does not have information on its copyright status'
},
{
label: 'No source and no license (CSD F4)',
value: 'no source no license',
tooltip: 'Image or media has neither information on source nor its copyright status'
},
{
label: 'Orphaned fair use (CSD F5)',
value: 'orphaned fair use',
tooltip: 'Image or media is unlicensed for use on Wikipedia and allowed only under a claim of fair use per Wikipedia:Non-free content, but it is not used in any articles'
},
{
label: 'No fair use rationale (CSD F6)',
value: 'no fair use rationale',
tooltip: 'Image or media is claimed to be used under Wikipedia\'s fair use policy but has no explanation as to why it is permitted under the policy'
},
{
label: 'Disputed fair use rationale (CSD F7)',
value: 'disputed fair use rationale',
tooltip: 'Image or media has a fair use rationale that is disputed'
},
{
label: 'Replaceable fair use (CSD F7)',
value: 'replaceable fair use',
tooltip: 'Image or media may fail Wikipedia\'s first non-free content criterion ([[WP:NFCC#1]]) in that it illustrates a subject for which a free image might reasonably be found or created that adequately provides the same information'
},
{
label: 'No evidence of permission (CSD F11)',
value: 'no permission',
tooltip: 'Image or media does not have proof that the author agreed to licence the file'
}
]
} );
form.append( {
type: 'div',
label: 'Work area',
name: 'work_area'
} );
form.append( { type:'submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
// We must init the parameters
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.type[0].dispatchEvent( evt );
};
Twinkle.image.callback.choice = function twinkleimageCallbackChoose(event) {
var value = event.target.values;
var root = event.target.form;
var work_area = new Morebits.quickForm.element( {
type: 'div',
name: 'work_area'
} );
switch( value ) {
case 'no source no license':
case 'no source':
work_area.append( {
type: 'checkbox',
name: 'non_free',
list: [
{
label: 'Non-free',
tooltip: 'Image is licensed under a fair use claim'
}
]
} );
break;
case 'no permission':
work_area.append( {
type: 'input',
name: 'source',
label: 'Source: '
} );
break;
case 'disputed fair use rationale':
work_area.append( {
type: 'textarea',
name: 'reason',
label: 'Concern: '
} );
break;
case 'orphaned fair use':
work_area.append( {
type: 'input',
name: 'replacement',
label: 'Replacement: '
} );
break;
case 'replaceable fair use':
work_area.append( {
type: 'checkbox',
name: 'old_image',
list: [
{
label: 'Old image',
tooltip: 'Image was uploaded before 2006-07-13'
}
]
} );
break;
default:
break;
}
root.replaceChild( work_area.render(), $(root).find('div[name="work_area"]')[0] );
};
Twinkle.image.callback.evaluate = function twinkleimageCallbackEvaluate(event) {
var type, non_free, source, reason, replacement, old_image;
var notify = event.target.notify.checked;
var types = event.target.type;
for( var i = 0; i < types.length; ++i ) {
if( types[i].checked ) {
type = types[i].values;
break;
}
}
if( event.target.non_free ) {
non_free = event.target.non_free.checked;
}
if( event.target.source ) {
source = event.target.source.value;
}
if( event.target.reason ) {
reason = event.target.reason.value;
}
if( event.target.replacement ) {
replacement = event.target.replacement.value;
}
if( event.target.old_image ) {
old_image = event.target.old_image.checked;
}
var csdcrit;
switch( type ) {
case 'no source no license':
case 'no source':
case 'no license':
csdcrit = "F4";
break;
case 'orphaned fair use':
csdcrit = "F5";
break;
case 'no fair use rationale':
csdcrit = "F6";
break;
case 'disputed fair use rationale':
case 'replaceable fair use':
csdcrit = "F7";
break;
case 'no permission':
csdcrit = "F11";
break;
default:
throw new Error( "Twinkle.image.callback.evaluate: unknown criterion" );
}
var lognomination = Twinkle.getPref('logSpeedyNominations') && Twinkle.getPref('noLogOnSpeedyNomination').indexOf(csdcrit.toLowerCase()) === -1;
var params = {
'type': type,
'normalized': csdcrit,
'non_free': non_free,
'source': source,
'reason': reason,
'replacement': replacement,
'old_image': old_image,
'lognomination': lognomination
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( event.target );
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Tagging complete";
// Tagging image
var wikipedia_page = new Morebits.wiki.page( mw.config.get('wgPageName'), 'Tagging file with deletion tag' );
wikipedia_page.setCallbackParameters( params );
wikipedia_page.load( Twinkle.image.callbacks.taggingImage );
// Notifying uploader
if( notify ) {
wikipedia_page.lookupCreator(Twinkle.image.callbacks.userNotification);
} else {
// add to CSD log if desired
if (lognomination) {
params.fromDI = true;
Twinkle.speedy.callbacks.user.addToLog(params, null);
}
// No auto-notification, display what was going to be added.
var noteData = document.createElement( 'pre' );
noteData.appendChild( document.createTextNode( "{{subst:di-" + type + "-notice|1=" + mw.config.get('wgTitle') + "}} ~~~~" ) );
Morebits.status.info( 'Notification', [ 'Following/similar data should be posted to the original uploader:', document.createElement( 'br' ), noteData ] );
}
};
Twinkle.image.callbacks = {
taggingImage: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
// remove "move to Commons" tag - deletion-tagged files cannot be moved to Commons
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, "");
var tag = "{{di-" + params.type + "|date={{subst:#time:j F Y}}";
switch( params.type ) {
case 'no source no license':
case 'no source':
tag += params.non_free ? "|non-free=yes" : "";
break;
case 'no permission':
tag += params.source ? "|source=" + params.source : "";
break;
case 'disputed fair use rationale':
tag += params.reason ? "|concern=" + params.reason : "";
break;
case 'orphaned fair use':
tag += params.replacement ? "|replacement=" + params.replacement : "";
break;
case 'replaceable fair use':
tag += params.old_image ? "|old image=yes" : "";
break;
default:
break; // doesn't matter
}
tag += "}}\n";
pageobj.setPageText(tag + text);
pageobj.setEditSummary("This file is up for deletion, per [[WP:CSD#" + params.normalized + "|CSD " + params.normalized + "]] (" + params.type + ")." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('deliWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('nocreate');
pageobj.save();
},
userNotification: function(pageobj) {
var params = pageobj.getCallbackParameters();
var initialContrib = pageobj.getCreator();
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:di-" + params.type + "-notice|1=" + mw.config.get('wgTitle');
if (params.type === 'no permission') {
notifytext += params.source ? "|source=" + params.source : "";
}
notifytext += "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: tagging for deletion of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('deliWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
// add this nomination to the user's userspace log, if the user has enabled it
if (params.lognomination) {
params.fromDI = true;
Twinkle.speedy.callbacks.user.addToLog(params, initialContrib);
}
}
};
})(jQuery);
//</nowiki>
46c873e63a4c6e5bc528a4c509a883b9b4fb6d1f
307
2013-11-15T17:33:40Z
Amalthea
0
v2.0-641-g8668628: morebits: Stop tooltips colliding with the field; arv: No more double full stops on AIV reports; morebits.css: limit titlebar line-height in Monobook; image: increase window height; warn: add {{[[Template:uw-redlink|uw-redlink]]}}
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkleimage.js: Image CSD module
****************************************
* Mode of invocation: Tab ("DI")
* Active on: File pages with a corresponding file which is local (not on Commons)
* Config directives in: TwinkleConfig
*/
Twinkle.image = function twinkleimage() {
if (mw.config.get('wgNamespaceNumber') === 6 &&
!document.getElementById("mw-sharedupload") &&
document.getElementById("mw-imagepage-section-filehistory")) {
Twinkle.addPortletLink(Twinkle.image.callback, "DI", "tw-di", "Nominate file for delayed speedy deletion");
}
};
Twinkle.image.callback = function twinkleimageCallback() {
var Window = new Morebits.simpleWindow( 600, 330 );
Window.setTitle( "File for dated speedy deletion" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Speedy deletion policy", "WP:CSD" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#image" );
var form = new Morebits.quickForm( Twinkle.image.callback.evaluate );
form.append( {
type: 'checkbox',
list: [
{
label: 'Notify original uploader',
value: 'notify',
name: 'notify',
tooltip: "Uncheck this if you are planning to make multiple nominations from the same user, and don't want to overload their talk page with too many notifications.",
checked: Twinkle.getPref('notifyUserOnDeli')
}
]
}
);
var field = form.append( {
type: 'field',
label: 'Type of action wanted'
} );
field.append( {
type: 'radio',
name: 'type',
event: Twinkle.image.callback.choice,
list: [
{
label: 'No source (CSD F4)',
value: 'no source',
checked: true,
tooltip: 'Image or media has no source information'
},
{
label: 'No license (CSD F4)',
value: 'no license',
tooltip: 'Image or media does not have information on its copyright status'
},
{
label: 'No source and no license (CSD F4)',
value: 'no source no license',
tooltip: 'Image or media has neither information on source nor its copyright status'
},
{
label: 'Orphaned fair use (CSD F5)',
value: 'orphaned fair use',
tooltip: 'Image or media is unlicensed for use on Wikipedia and allowed only under a claim of fair use per Wikipedia:Non-free content, but it is not used in any articles'
},
{
label: 'No fair use rationale (CSD F6)',
value: 'no fair use rationale',
tooltip: 'Image or media is claimed to be used under Wikipedia\'s fair use policy but has no explanation as to why it is permitted under the policy'
},
{
label: 'Disputed fair use rationale (CSD F7)',
value: 'disputed fair use rationale',
tooltip: 'Image or media has a fair use rationale that is disputed'
},
{
label: 'Replaceable fair use (CSD F7)',
value: 'replaceable fair use',
tooltip: 'Image or media may fail Wikipedia\'s first non-free content criterion ([[WP:NFCC#1]]) in that it illustrates a subject for which a free image might reasonably be found or created that adequately provides the same information'
},
{
label: 'No evidence of permission (CSD F11)',
value: 'no permission',
tooltip: 'Image or media does not have proof that the author agreed to licence the file'
}
]
} );
form.append( {
type: 'div',
label: 'Work area',
name: 'work_area'
} );
form.append( { type:'submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
// We must init the parameters
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.type[0].dispatchEvent( evt );
};
Twinkle.image.callback.choice = function twinkleimageCallbackChoose(event) {
var value = event.target.values;
var root = event.target.form;
var work_area = new Morebits.quickForm.element( {
type: 'div',
name: 'work_area'
} );
switch( value ) {
case 'no source no license':
case 'no source':
work_area.append( {
type: 'checkbox',
name: 'non_free',
list: [
{
label: 'Non-free',
tooltip: 'Image is licensed under a fair use claim'
}
]
} );
break;
case 'no permission':
work_area.append( {
type: 'input',
name: 'source',
label: 'Source: '
} );
break;
case 'disputed fair use rationale':
work_area.append( {
type: 'textarea',
name: 'reason',
label: 'Concern: '
} );
break;
case 'orphaned fair use':
work_area.append( {
type: 'input',
name: 'replacement',
label: 'Replacement: '
} );
break;
case 'replaceable fair use':
work_area.append( {
type: 'checkbox',
name: 'old_image',
list: [
{
label: 'Old image',
tooltip: 'Image was uploaded before 2006-07-13'
}
]
} );
break;
default:
break;
}
root.replaceChild( work_area.render(), $(root).find('div[name="work_area"]')[0] );
};
Twinkle.image.callback.evaluate = function twinkleimageCallbackEvaluate(event) {
var type, non_free, source, reason, replacement, old_image;
var notify = event.target.notify.checked;
var types = event.target.type;
for( var i = 0; i < types.length; ++i ) {
if( types[i].checked ) {
type = types[i].values;
break;
}
}
if( event.target.non_free ) {
non_free = event.target.non_free.checked;
}
if( event.target.source ) {
source = event.target.source.value;
}
if( event.target.reason ) {
reason = event.target.reason.value;
}
if( event.target.replacement ) {
replacement = event.target.replacement.value;
}
if( event.target.old_image ) {
old_image = event.target.old_image.checked;
}
var csdcrit;
switch( type ) {
case 'no source no license':
case 'no source':
case 'no license':
csdcrit = "F4";
break;
case 'orphaned fair use':
csdcrit = "F5";
break;
case 'no fair use rationale':
csdcrit = "F6";
break;
case 'disputed fair use rationale':
case 'replaceable fair use':
csdcrit = "F7";
break;
case 'no permission':
csdcrit = "F11";
break;
default:
throw new Error( "Twinkle.image.callback.evaluate: unknown criterion" );
}
var lognomination = Twinkle.getPref('logSpeedyNominations') && Twinkle.getPref('noLogOnSpeedyNomination').indexOf(csdcrit.toLowerCase()) === -1;
var params = {
'type': type,
'normalized': csdcrit,
'non_free': non_free,
'source': source,
'reason': reason,
'replacement': replacement,
'old_image': old_image,
'lognomination': lognomination
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( event.target );
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Tagging complete";
// Tagging image
var wikipedia_page = new Morebits.wiki.page( mw.config.get('wgPageName'), 'Tagging file with deletion tag' );
wikipedia_page.setCallbackParameters( params );
wikipedia_page.load( Twinkle.image.callbacks.taggingImage );
// Notifying uploader
if( notify ) {
wikipedia_page.lookupCreator(Twinkle.image.callbacks.userNotification);
} else {
// add to CSD log if desired
if (lognomination) {
params.fromDI = true;
Twinkle.speedy.callbacks.user.addToLog(params, null);
}
// No auto-notification, display what was going to be added.
var noteData = document.createElement( 'pre' );
noteData.appendChild( document.createTextNode( "{{subst:di-" + type + "-notice|1=" + mw.config.get('wgTitle') + "}} ~~~~" ) );
Morebits.status.info( 'Notification', [ 'Following/similar data should be posted to the original uploader:', document.createElement( 'br' ), noteData ] );
}
};
Twinkle.image.callbacks = {
taggingImage: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
// remove "move to Commons" tag - deletion-tagged files cannot be moved to Commons
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, "");
var tag = "{{di-" + params.type + "|date={{subst:#time:j F Y}}";
switch( params.type ) {
case 'no source no license':
case 'no source':
tag += params.non_free ? "|non-free=yes" : "";
break;
case 'no permission':
tag += params.source ? "|source=" + params.source : "";
break;
case 'disputed fair use rationale':
tag += params.reason ? "|concern=" + params.reason : "";
break;
case 'orphaned fair use':
tag += params.replacement ? "|replacement=" + params.replacement : "";
break;
case 'replaceable fair use':
tag += params.old_image ? "|old image=yes" : "";
break;
default:
break; // doesn't matter
}
tag += "}}\n";
pageobj.setPageText(tag + text);
pageobj.setEditSummary("This file is up for deletion, per [[WP:CSD#" + params.normalized + "|CSD " + params.normalized + "]] (" + params.type + ")." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('deliWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('nocreate');
pageobj.save();
},
userNotification: function(pageobj) {
var params = pageobj.getCallbackParameters();
var initialContrib = pageobj.getCreator();
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:di-" + params.type + "-notice|1=" + mw.config.get('wgTitle');
if (params.type === 'no permission') {
notifytext += params.source ? "|source=" + params.source : "";
}
notifytext += "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: tagging for deletion of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('deliWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
// add this nomination to the user's userspace log, if the user has enabled it
if (params.lognomination) {
params.fromDI = true;
Twinkle.speedy.callbacks.user.addToLog(params, initialContrib);
}
}
};
})(jQuery);
//</nowiki>
46c873e63a4c6e5bc528a4c509a883b9b4fb6d1f
MediaWiki:Gadget-twinkleprod.js
8
118
306
305
2014-01-17T00:43:56Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkleprod.js: PROD module
****************************************
* Mode of invocation: Tab ("PROD")
* Active on: Existing articles which are not redirects
* Config directives in: TwinkleConfig
*/
Twinkle.prod = function twinkleprod() {
if( mw.config.get('wgNamespaceNumber') !== 0 || !mw.config.get('wgCurRevisionId') || Morebits.wiki.isPageRedirect() ) {
return;
}
Twinkle.addPortletLink( Twinkle.prod.callback, "PROD", "tw-prod", "Propose deletion via WP:PROD" );
};
Twinkle.prod.callback = function twinkleprodCallback() {
Twinkle.prod.defaultReason = Twinkle.getPref('prodReasonDefault');
var Window = new Morebits.simpleWindow( 800, 410 );
Window.setTitle( "Proposed deletion (PROD)" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Proposed deletion policy", "WP:PROD" );
Window.addFooterLink( "BLP PROD policy", "WP:BLPPROD" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#prod" );
var form = new Morebits.quickForm( Twinkle.prod.callback.evaluate );
var field = form.append( {
type: 'field',
label: 'PROD type'
} );
field.append( {
type: 'radio',
name: 'prodtype',
event: Twinkle.prod.callback.prodtypechanged,
list: [
{
label: 'PROD (proposed deletion)',
value: 'prod',
checked: true,
tooltip: 'Normal proposed deletion, per [[WP:PROD]]'
},
{
label: 'BLP PROD (proposed deletion of unsourced BLPs)',
value: 'prodblp',
tooltip: 'Proposed deletion of new, completely unsourced biographies of living persons, per [[WP:BLPPROD]]'
}
]
} );
form.append( {
type: 'field',
label:'Work area',
name: 'work_area'
} );
form.append( { type:'submit', label:'Propose deletion' } );
var result = form.render();
Window.setContent( result );
Window.display();
// fake a change event on the first prod type radio, to initialize the type-dependent controls
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.prodtype[0].dispatchEvent( evt );
};
Twinkle.prod.callback.prodtypechanged = function(event) {
//prepare frame for prod type dependant controls
var field = new Morebits.quickForm.element( {
type: 'field',
label: 'Parameters',
name: 'work_area'
} );
// create prod type dependant controls
switch( event.target.values ) {
case 'prod':
field.append( {
type: 'checkbox',
list: [
{
label: 'Notify page creator if possible',
value: 'notify',
name: 'notify',
tooltip: "A notification template will be placed on the creator's talk page if this is true.",
checked: true
}
]
}
);
field.append( {
type: 'textarea',
name: 'reason',
label: 'Reason for proposed deletion:',
value: Twinkle.prod.defaultReason
} );
break;
case 'prodblp':
// first, remember the prod value that the user entered in the textarea, in case he wants to switch back. We can abuse the config field for that.
if (event.target.form.reason) {
Twinkle.prod.defaultReason = event.target.form.reason.value;
}
field.append( {
type: 'checkbox',
list: [
{
label: 'Notify page creator if possible',
value: 'notify',
name: 'notify',
tooltip: 'Creator of article has to be notified.',
checked: true,
disabled: true
}
]
}
);
//temp warning, can be removed down the line once BLPPROD is more established. Amalthea, May 2010.
var boldtext = document.createElement('b');
boldtext.appendChild(document.createTextNode('Please note that only unsourced biographies of living persons are eligible for this tag, narrowly construed.'));
field.append({
type: 'div',
label: boldtext
});
if (mw.config.get('wgArticleId') < 26596183) {
field.append({
type: 'header',
label: 'It appears that this article was created before March 18, 2010, and is thus ineligible for a BLP PROD. Please make sure that this is not the case, or use normal PROD instead.'
});
}
break;
default:
break;
}
event.target.form.replaceChild( field.render(), $(event.target.form).find('fieldset[name="work_area"]')[0] );
};
Twinkle.prod.callbacks = {
main: function(pageobj) {
var statelem = pageobj.getStatusElement();
if( !pageobj.exists() ) {
statelem.error( "It seems that the page doesn't exist. Perhaps it has already been deleted." );
return;
}
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var tag_re = /(\{\{(?:db-?|delete|[aitcmrs]fd|md1)[^{}]*?\|?[^{}]*?\}\})/i;
if( tag_re.test( text ) ) {
statelem.warn( 'Page already tagged with a deletion template, aborting procedure' );
return;
}
// Remove tags that become superfluous with this action
text = text.replace(/\{\{\s*([Nn]ew unreviewed article|[Uu]nreviewed|[Uu]serspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/g, "");
var prod_re = /\{\{\s*(?:dated prod|dated prod blp|Prod blp\/dated|Proposed deletion\/dated)\s*\|(?:\{\{[^\{\}]*\}\}|[^\}\{])*\}\}/i;
var summaryText;
if( !prod_re.test( text ) ) {
// Notification to first contributor
if( params.usertalk ) {
var thispage = new Morebits.wiki.page(mw.config.get('wgPageName'));
thispage.setCallbackParameters(params);
thispage.lookupCreator(Twinkle.prod.callbacks.userNotification);
}
// If not notifying, log this PROD
else if( Twinkle.getPref('logProdPages') ) {
Twinkle.prod.callbacks.addToLog(params);
}
summaryText = "Proposing article for deletion per [[WP:" + (params.blp ? "BLP" : "") + "PROD]].";
text = "{{subst:prod" + (params.blp ? " blp" : ("|1=" + Morebits.string.formatReasonText(params.reason))) + "}}\n" + text;
}
else { // already tagged for PROD, so try endorsing it
var prod2_re = /\{\{(?:Proposed deletion endorsed|prod-?2).*?\}\}/;
if( prod2_re.test( text ) ) {
statelem.warn( 'Page already tagged with {{prod}} and {{prod-2}} templates, aborting procedure' );
return;
}
var confirmtext = "A {{prod}} tag was already found on this article. \nWould you like to add a {{prod-2}} (PROD endorsement) tag with your explanation?";
if (params.blp) {
confirmtext = "A non-BLP {{prod}} tag was found on this article. \nWould you like to add a {{prod-2}} (PROD endorsement) tag with explanation \"article is a biography of a living person with no sources\"?";
}
if( !confirm( confirmtext ) ) {
statelem.warn( 'Aborted per user request' );
return;
}
summaryText = "Endorsing proposed deletion per [[WP:" + (params.blp ? "BLP" : "") + "PROD]].";
text = text.replace( prod_re, text.match( prod_re ) + "\n{{prod-2|1=" + (params.blp ?
"article is a [[WP:BLPPROD|biography of a living person with no sources]]" :
Morebits.string.formatReasonText(params.reason)) + "}}\n" );
if( Twinkle.getPref('logProdPages') ) {
params.logEndorsing = true;
Twinkle.prod.callbacks.addToLog(params);
}
}
pageobj.setPageText(text);
pageobj.setEditSummary(summaryText + Twinkle.getPref('summaryAd'));
pageobj.setWatchlist(Twinkle.getPref('watchProdPages'));
pageobj.setCreateOption('nocreate');
pageobj.save();
},
userNotification: function(pageobj) {
var params = pageobj.getCallbackParameters();
var initialContrib = pageobj.getCreator();
// Disallow warning yourself
if (initialContrib === mw.config.get("wgUserName")) {
if (Twinkle.getPref("logProdPages")) {
Twinkle.prod.callbacks.addToLog(params);
}
return;
}
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:prodwarning" + (params.blp ? "BLP" : "") + "|1=" + Morebits.pageNameNorm + "|concern=" + params.reason + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: proposed deletion of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
if (Twinkle.getPref('logProdPages')) {
params.logInitialContrib = initialContrib;
Twinkle.prod.callbacks.addToLog(params);
}
},
addToLog: function(params) {
var wikipedia_page = new Morebits.wiki.page("User:" + mw.config.get('wgUserName') + "/" + Twinkle.getPref('prodLogPageName'), "Adding entry to userspace log");
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.prod.callbacks.saveLog);
},
saveLog: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
// add blurb if log page doesn't exist
if (!pageobj.exists()) {
text =
"This is a log of all [[WP:PROD|proposed deletion]] tags applied or endorsed by this user using [[WP:TW|Twinkle]]'s PROD module.\n\n" +
"If you no longer wish to keep this log, you can turn it off using the [[Wikipedia:Twinkle/Preferences|preferences panel]], and " +
"nominate this page for speedy deletion under [[WP:CSD#U1|CSD U1]].\n";
}
// create monthly header
var date = new Date();
var headerRe = new RegExp("^==+\\s*" + date.getUTCMonthName() + "\\s+" + date.getUTCFullYear() + "\\s*==+", "m");
if (!headerRe.exec(text)) {
text += "\n\n=== " + date.getUTCMonthName() + " " + date.getUTCFullYear() + " ===";
}
var summarytext;
if (params.logEndorsing) {
text += "\n# [[" + Morebits.pageNameNorm + "]]: endorsed " + (params.blp ? "BLP " : "") + "PROD. ~~~~~";
if (params.reason) {
text += "\n#* '''Reason''': " + params.reason + "\n";
}
summarytext = "Logging endorsement of PROD nomination of [[" + Morebits.pageNameNorm + "]].";
} else {
text += "\n# [[" + Morebits.pageNameNorm + "]]: " + (params.blp ? "BLP " : "") + "PROD";
if (params.logInitialContrib) {
text += "; notified {{user|" + params.logInitialContrib + "}}";
}
text += " ~~~~~\n";
if (!params.blp) {
text += "#* '''Reason''': " + params.reason + "\n";
}
summarytext = "Logging PROD nomination of [[" + Morebits.pageNameNorm + "]].";
}
pageobj.setPageText(text);
pageobj.setEditSummary(summarytext + Twinkle.getPref('summaryAd'));
pageobj.setCreateOption("recreate");
pageobj.save();
}
};
Twinkle.prod.callback.evaluate = function twinkleprodCallbackEvaluate(e) {
var form = e.target;
var prodtype;
var prodtypes = form.prodtype;
for( var i = 0; i < prodtypes.length; i++ ) {
if( !prodtypes[i].checked ) {
continue;
}
prodtype = prodtypes[i].values;
break;
}
var params = {
usertalk: form.notify.checked,
blp: prodtype === 'prodblp',
reason: prodtype === 'prodblp' ? '' : form.reason.value // using an empty string here as fallback will help with prod-2.
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
if (prodtype === 'prodblp' && mw.config.get('wgArticleId') < 26596183) {
if (!confirm( "It appears that this article was created before March 18, 2010, and is thus ineligible for a BLP PROD. Do you want to continue tagging it?" )) {
Morebits.status.warn( 'Notice', 'Aborting per user input.' );
return;
}
}
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Tagging complete";
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging page");
wikipedia_page.setFollowRedirect(true); // for NPP, and also because redirects are ineligible for PROD
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.prod.callbacks.main);
};
})(jQuery);
//</nowiki>
c8dcc02dc4326b7cd6d7c7529547f34eca934098
305
2013-10-24T11:23:20Z
Amalthea
0
v2.0-624-ged31b2a: speedy, xfd, prod, tag: Add {{[[Template:unreviewed|unreviewed]]}} to list of auto-removed templates; speedy: sync F10 wording with [[WP:CSD]]
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkleprod.js: PROD module
****************************************
* Mode of invocation: Tab ("PROD")
* Active on: Existing articles which are not redirects
* Config directives in: TwinkleConfig
*/
Twinkle.prod = function twinkleprod() {
if( mw.config.get('wgNamespaceNumber') !== 0 || !mw.config.get('wgCurRevisionId') || Morebits.wiki.isPageRedirect() ) {
return;
}
Twinkle.addPortletLink( Twinkle.prod.callback, "PROD", "tw-prod", "Propose deletion via WP:PROD" );
};
Twinkle.prod.callback = function twinkleprodCallback() {
Twinkle.prod.defaultReason = Twinkle.getPref('prodReasonDefault');
var Window = new Morebits.simpleWindow( 800, 410 );
Window.setTitle( "Proposed deletion (PROD)" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Proposed deletion policy", "WP:PROD" );
Window.addFooterLink( "BLP PROD policy", "WP:BLPPROD" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#prod" );
var form = new Morebits.quickForm( Twinkle.prod.callback.evaluate );
var field = form.append( {
type: 'field',
label: 'PROD type'
} );
field.append( {
type: 'radio',
name: 'prodtype',
event: Twinkle.prod.callback.prodtypechanged,
list: [
{
label: 'PROD (proposed deletion)',
value: 'prod',
checked: true,
tooltip: 'Normal proposed deletion, per [[WP:PROD]]'
},
{
label: 'BLP PROD (proposed deletion of unsourced BLPs)',
value: 'prodblp',
tooltip: 'Proposed deletion of new, completely unsourced biographies of living persons, per [[WP:BLPPROD]]'
}
]
} );
form.append( {
type: 'field',
label:'Work area',
name: 'work_area'
} );
form.append( { type:'submit', label:'Propose deletion' } );
var result = form.render();
Window.setContent( result );
Window.display();
// fake a change event on the first prod type radio, to initialize the type-dependent controls
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.prodtype[0].dispatchEvent( evt );
};
Twinkle.prod.callback.prodtypechanged = function(event) {
//prepare frame for prod type dependant controls
var field = new Morebits.quickForm.element( {
type: 'field',
label: 'Parameters',
name: 'work_area'
} );
// create prod type dependant controls
switch( event.target.values ) {
case 'prod':
field.append( {
type: 'checkbox',
list: [
{
label: 'Notify page creator if possible',
value: 'notify',
name: 'notify',
tooltip: "A notification template will be placed on the creator's talk page if this is true.",
checked: true
}
]
}
);
field.append( {
type: 'textarea',
name: 'reason',
label: 'Reason for proposed deletion:',
value: Twinkle.prod.defaultReason
} );
break;
case 'prodblp':
// first, remember the prod value that the user entered in the textarea, in case he wants to switch back. We can abuse the config field for that.
if (event.target.form.reason) {
Twinkle.prod.defaultReason = event.target.form.reason.value;
}
field.append( {
type: 'checkbox',
list: [
{
label: 'Notify page creator if possible',
value: 'notify',
name: 'notify',
tooltip: 'Creator of article has to be notified.',
checked: true,
disabled: true
}
]
}
);
//temp warning, can be removed down the line once BLPPROD is more established. Amalthea, May 2010.
var boldtext = document.createElement('b');
boldtext.appendChild(document.createTextNode('Please note that only unsourced biographies of living persons are eligible for this tag, narrowly construed.'));
field.append({
type: 'div',
label: boldtext
});
if (mw.config.get('wgArticleId') < 26596183) {
field.append({
type: 'header',
label: 'It appears that this article was created before March 18, 2010, and is thus ineligible for a BLP PROD. Please make sure that this is not the case, or use normal PROD instead.'
});
}
break;
default:
break;
}
event.target.form.replaceChild( field.render(), $(event.target.form).find('fieldset[name="work_area"]')[0] );
};
Twinkle.prod.callbacks = {
main: function(pageobj) {
var statelem = pageobj.getStatusElement();
if( !pageobj.exists() ) {
statelem.error( "It seems that the page doesn't exist. Perhaps it has already been deleted." );
return;
}
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var tag_re = /(\{\{(?:db-?|delete|[aitcmrs]fd|md1)[^{}]*?\|?[^{}]*?\}\})/i;
if( tag_re.test( text ) ) {
statelem.warn( 'Page already tagged with a deletion template, aborting procedure' );
return;
}
// Remove tags that become superfluous with this action
text = text.replace(/\{\{\s*([Nn]ew unreviewed article|[Uu]nreviewed|[Uu]serspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/g, "");
var prod_re = /\{\{\s*(?:dated prod|dated prod blp|Prod blp\/dated|Proposed deletion\/dated)\s*\|(?:\{\{[^\{\}]*\}\}|[^\}\{])*\}\}/i;
var summaryText;
if( !prod_re.test( text ) ) {
// Notification to first contributor
if( params.usertalk ) {
var thispage = new Morebits.wiki.page(mw.config.get('wgPageName'));
thispage.setCallbackParameters(params);
thispage.lookupCreator(Twinkle.prod.callbacks.userNotification);
}
// If not notifying, log this PROD
else if( Twinkle.getPref('logProdPages') ) {
Twinkle.prod.callbacks.addToLog(params);
}
summaryText = "Proposing article for deletion per [[WP:" + (params.blp ? "BLP" : "") + "PROD]].";
text = "{{subst:prod" + (params.blp ? " blp" : ("|1=" + Morebits.string.formatReasonText(params.reason))) + "}}\n" + text;
}
else { // already tagged for PROD, so try endorsing it
var prod2_re = /\{\{(?:Proposed deletion endorsed|prod-?2).*?\}\}/;
if( prod2_re.test( text ) ) {
statelem.warn( 'Page already tagged with {{prod}} and {{prod-2}} templates, aborting procedure' );
return;
}
var confirmtext = "A {{prod}} tag was already found on this article. \nWould you like to add a {{prod-2}} (PROD endorsement) tag with your explanation?";
if (params.blp) {
confirmtext = "A non-BLP {{prod}} tag was found on this article. \nWould you like to add a {{prod-2}} (PROD endorsement) tag with explanation \"article is a biography of a living person with no sources\"?";
}
if( !confirm( confirmtext ) ) {
statelem.warn( 'Aborted per user request' );
return;
}
summaryText = "Endorsing proposed deletion per [[WP:" + (params.blp ? "BLP" : "") + "PROD]].";
text = text.replace( prod_re, text.match( prod_re ) + "\n{{prod-2|1=" + (params.blp ?
"article is a [[WP:BLPPROD|biography of a living person with no sources]]" :
Morebits.string.formatReasonText(params.reason)) + "}}\n" );
if( Twinkle.getPref('logProdPages') ) {
params.logEndorsing = true;
Twinkle.prod.callbacks.addToLog(params);
}
}
pageobj.setPageText(text);
pageobj.setEditSummary(summaryText + Twinkle.getPref('summaryAd'));
pageobj.setWatchlist(Twinkle.getPref('watchProdPages'));
pageobj.setCreateOption('nocreate');
pageobj.save();
},
userNotification: function(pageobj) {
var params = pageobj.getCallbackParameters();
var initialContrib = pageobj.getCreator();
// Disallow warning yourself
if (initialContrib === mw.config.get("wgUserName")) {
if (Twinkle.getPref("logProdPages")) {
Twinkle.prod.callbacks.addToLog(params);
}
return;
}
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:prodwarning" + (params.blp ? "BLP" : "") + "|1=" + Morebits.pageNameNorm + "|concern=" + params.reason + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: proposed deletion of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
if (Twinkle.getPref('logProdPages')) {
params.logInitialContrib = initialContrib;
Twinkle.prod.callbacks.addToLog(params);
}
},
addToLog: function(params) {
var wikipedia_page = new Morebits.wiki.page("User:" + mw.config.get('wgUserName') + "/" + Twinkle.getPref('prodLogPageName'), "Adding entry to userspace log");
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.prod.callbacks.saveLog);
},
saveLog: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
// add blurb if log page doesn't exist
if (!pageobj.exists()) {
text =
"This is a log of all [[WP:PROD|proposed deletion]] tags applied or endorsed by this user using [[WP:TW|Twinkle]]'s PROD module.\n\n" +
"If you no longer wish to keep this log, you can turn it off using the [[Wikipedia:Twinkle/Preferences|preferences panel]], and " +
"nominate this page for speedy deletion under [[WP:CSD#U1|CSD U1]].\n";
}
// create monthly header
var date = new Date();
var headerRe = new RegExp("^==+\\s*" + date.getUTCMonthName() + "\\s+" + date.getUTCFullYear() + "\\s*==+", "m");
if (!headerRe.exec(text)) {
text += "\n\n=== " + date.getUTCMonthName() + " " + date.getUTCFullYear() + " ===";
}
var summarytext;
if (params.logEndorsing) {
text += "\n# [[" + Morebits.pageNameNorm + "]]: endorsed " + (params.blp ? "BLP " : "") + "PROD. ~~~~~";
if (params.reason) {
text += "\n#* '''Reason''': " + params.reason + "\n";
}
summarytext = "Logging endorsement of PROD nomination of [[" + Morebits.pageNameNorm + "]].";
} else {
text += "\n# [[" + Morebits.pageNameNorm + "]]: " + (params.blp ? "BLP " : "") + "PROD";
if (params.logInitialContrib) {
text += "; notified {{user|" + params.logInitialContrib + "}}";
}
text += " ~~~~~\n";
if (!params.blp) {
text += "#* '''Reason''': " + params.reason + "\n";
}
summarytext = "Logging PROD nomination of [[" + Morebits.pageNameNorm + "]].";
}
pageobj.setPageText(text);
pageobj.setEditSummary(summarytext + Twinkle.getPref('summaryAd'));
pageobj.setCreateOption("recreate");
pageobj.save();
}
};
Twinkle.prod.callback.evaluate = function twinkleprodCallbackEvaluate(e) {
var form = e.target;
var prodtype;
var prodtypes = form.prodtype;
for( var i = 0; i < prodtypes.length; i++ ) {
if( !prodtypes[i].checked ) {
continue;
}
prodtype = prodtypes[i].values;
break;
}
var params = {
usertalk: form.notify.checked,
blp: prodtype === 'prodblp',
reason: prodtype === 'prodblp' ? '' : form.reason.value // using an empty string here as fallback will help with prod-2.
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
if (prodtype === 'prodblp' && mw.config.get('wgArticleId') < 26596183) {
if (!confirm( "It appears that this article was created before March 18, 2010, and is thus ineligible for a BLP PROD. Do you want to continue tagging it?" )) {
Morebits.status.warn( 'Notice', 'Aborting per user input.' );
return;
}
}
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Tagging complete";
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging page");
wikipedia_page.setFollowRedirect(true); // for NPP, and also because redirects are ineligible for PROD
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.prod.callbacks.main);
};
})(jQuery);
//</nowiki>
c8dcc02dc4326b7cd6d7c7529547f34eca934098
MediaWiki:Gadget-twinkleprotect.js
8
135
340
339
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkleprotect.js: Protect/RPP module
****************************************
* Mode of invocation: Tab ("PP"/"RPP")
* Active on: Non-special pages
* Config directives in: TwinkleConfig
*/
// Note: a lot of code in this module is re-used/called by batchprotect.
Twinkle.protect = function twinkleprotect() {
if ( mw.config.get('wgNamespaceNumber') < 0 ) {
return;
}
Twinkle.addPortletLink(Twinkle.protect.callback, Morebits.userIsInGroup('sysop') ? "PP" : "RPP", "tw-rpp",
Morebits.userIsInGroup('sysop') ? "Protect page" : "Request page protection" );
};
Twinkle.protect.callback = function twinkleprotectCallback() {
Twinkle.protect.protectionLevel = null;
var Window = new Morebits.simpleWindow( 620, 530 );
Window.setTitle( Morebits.userIsInGroup( 'sysop' ) ? "Apply, request or tag page protection" : "Request or tag page protection" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Protection templates", "Template:Protection templates" );
Window.addFooterLink( "Protection policy", "WP:PROT" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#protect" );
var form = new Morebits.quickForm( Twinkle.protect.callback.evaluate );
var actionfield = form.append( {
type: 'field',
label: 'Type of action'
} );
if( Morebits.userIsInGroup( 'sysop' ) ) {
actionfield.append( {
type: 'radio',
name: 'actiontype',
event: Twinkle.protect.callback.changeAction,
list: [
{
label: 'Protect page',
value: 'protect',
tooltip: 'Apply actual protection to the page.',
checked: true
}
]
} );
}
actionfield.append( {
type: 'radio',
name: 'actiontype',
event: Twinkle.protect.callback.changeAction,
list: [
{
label: 'Request page protection',
value: 'request',
tooltip: 'If you want to request protection via WP:RPP' + (Morebits.userIsInGroup('sysop') ? ' instead of doing the protection by yourself.' : '.'),
checked: !Morebits.userIsInGroup('sysop')
},
{
label: 'Tag page with protection template',
value: 'tag',
tooltip: 'If the protecting admin forgot to apply a protection template, or you have just protected the page without tagging, you can use this to apply the appropriate protection tag.',
disabled: mw.config.get('wgArticleId') === 0
}
]
} );
form.append({ type: 'field', label: 'Preset', name: 'field_preset' });
form.append({ type: 'field', label: '1', name: 'field1' });
form.append({ type: 'field', label: '2', name: 'field2' });
form.append( { type:'submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
// We must init the controls
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.actiontype[0].dispatchEvent( evt );
// get current protection level asynchronously
if (Morebits.userIsInGroup('sysop')) {
Morebits.wiki.actionCompleted.postfix = false; // avoid Action: completed notice
Morebits.status.init($('div[name="currentprot"] span').last()[0]);
}
Twinkle.protect.fetchProtectionLevel();
};
// Current protection level in a human-readable format
// (a string, or null if no protection; only filled for sysops)
Twinkle.protect.protectionLevel = null;
// Contains the current protection level in an object
// Once filled, it will look something like:
// { edit: { level: "sysop", expiry: <some date>, cascade: true }, ... }
Twinkle.protect.currentProtectionLevels = {};
Twinkle.protect.fetchProtectionLevel = function twinkleprotectFetchProtectionLevel() {
var api = new mw.Api();
api.get({
format: 'json',
indexpageids: true,
action: 'query',
prop: 'info|flagged',
inprop: 'protection',
titles: mw.config.get('wgPageName')
})
.done(function(data){
var pageid = data.query.pageids[0];
var page = data.query.pages[pageid];
var result = [];
var current = {};
var updateResult = function(label, level, expiry, cascade) {
// for sysops, stringify, so they can base their decision on existing protection
if (Morebits.userIsInGroup('sysop')) {
var boldnode = document.createElement('b');
boldnode.textContent = label + ": " + level;
result.push(boldnode);
if (expiry === 'infinity') {
result.push(" (indefinite) ");
} else {
result.push(" (expires " + new Date(expiry).toUTCString() + ") ");
}
if (cascade) {
result.push("(cascading) ");
}
}
};
$.each(page.protection, function( index, protection ) {
if (protection.type !== "aft") {
current[protection.type] = {
level: protection.level,
expiry: protection.expiry,
cascade: protection.cascade === ''
};
updateResult( Morebits.string.toUpperCaseFirstChar(protection.type), protection.level, protection.expiry, protection.cascade );
}
});
if (page.flagged) {
current.stabilize = {
level: page.flagged.protection_level,
expiry: page.flagged.protection_expiry
};
// FlaggedRevision gives bad date
updateResult( 'Pending Changes', page.flagged.protection_level, page.flagged.protection_expiry, false );
}
// show the protection level to sysops
if (Morebits.userIsInGroup('sysop')) {
if (!result.length) {
var boldnode = document.createElement('b');
boldnode.textContent = "no protection";
result.push(boldnode);
}
Twinkle.protect.protectionLevel = result;
Morebits.status.init($('div[name="currentprot"] span').last()[0]);
Morebits.status.info("Current protection level", Twinkle.protect.protectionLevel);
}
Twinkle.protect.currentProtectionLevels = current;
});
};
Twinkle.protect.callback.changeAction = function twinkleprotectCallbackChangeAction(e) {
var field_preset;
var field1;
var field2;
var isTemplate = mw.config.get("wgNamespaceNumber") === 10 || mw.config.get("wgNamespaceNumber") === 828;
switch (e.target.values) {
case 'protect':
field_preset = new Morebits.quickForm.element({ type: 'field', label: 'Preset', name: 'field_preset' });
field_preset.append({
type: 'select',
name: 'category',
label: 'Choose a preset:',
event: Twinkle.protect.callback.changePreset,
list: (mw.config.get('wgArticleId') ?
Twinkle.protect.protectionTypes.filter(function(v) {
return isTemplate || v.label !== 'Template protection';
}) :
Twinkle.protect.protectionTypesCreate)
});
field2 = new Morebits.quickForm.element({ type: 'field', label: 'Protection options', name: 'field2' });
field2.append({ type: 'div', name: 'currentprot', label: ' ' }); // holds the current protection level, as filled out by the async callback
// for existing pages
if (mw.config.get('wgArticleId')) {
field2.append({
type: 'checkbox',
name: 'editmodify',
event: Twinkle.protect.formevents.editmodify,
list: [
{
label: 'Modify edit protection',
value: 'editmodify',
tooltip: 'If this is turned off, the edit protection level, and expiry time, will be left as is.',
checked: true
}
]
});
var editlevel = field2.append({
type: 'select',
name: 'editlevel',
label: 'Edit protection:',
event: Twinkle.protect.formevents.editlevel
});
editlevel.append({
type: 'option',
label: 'All',
value: 'all'
});
editlevel.append({
type: 'option',
label: 'Autoconfirmed',
value: 'autoconfirmed'
});
if (isTemplate) {
editlevel.append({
type: 'option',
label: 'Template editor',
value: 'templateeditor'
});
}
editlevel.append({
type: 'option',
label: 'Sysop',
value: 'sysop',
selected: true
});
field2.append({
type: 'select',
name: 'editexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', selected: true, value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', value:'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
field2.append({
type: 'checkbox',
name: 'movemodify',
event: Twinkle.protect.formevents.movemodify,
list: [
{
label: 'Modify move protection',
value: 'movemodify',
tooltip: 'If this is turned off, the move protection level, and expiry time, will be left as is.',
checked: true
}
]
});
var movelevel = field2.append({
type: 'select',
name: 'movelevel',
label: 'Move protection:',
event: Twinkle.protect.formevents.movelevel
});
movelevel.append({
type: 'option',
label: 'All',
value: 'all'
});
movelevel.append({
type: 'option',
label: 'Autoconfirmed',
value: 'autoconfirmed'
});
if (isTemplate) {
movelevel.append({
type: 'option',
label: 'Template editor',
value: 'templateeditor'
});
}
movelevel.append({
type: 'option',
label: 'Sysop',
value: 'sysop',
selected: true
});
field2.append({
type: 'select',
name: 'moveexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', selected: true, value:'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
field2.append({
type: 'checkbox',
name: 'pcmodify',
event: Twinkle.protect.formevents.pcmodify,
list: [
{
label: 'Modify pending changes protection',
value: 'pcmodify',
tooltip: 'If this is turned off, the pending changes level, and expiry time, will be left as is.',
checked: true
}
]
});
var pclevel = field2.append({
type: 'select',
name: 'pclevel',
label: 'Pending changes:',
event: Twinkle.protect.formevents.pclevel
});
pclevel.append({
type: 'option',
label: 'None',
value: 'none'
});
pclevel.append({
type: 'option',
label: 'Level 1',
value: 'autoconfirmed',
selected: true
});
pclevel.append({
type: 'option',
label: 'Level 2 (do not use)',
value: 'review'
});
field2.append({
type: 'select',
name: 'pcexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', selected: true, value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', value:'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
} else { // for non-existing pages
var createlevel = field2.append({
type: 'select',
name: 'createlevel',
label: 'Create protection:',
event: Twinkle.protect.formevents.createlevel
});
createlevel.append({
type: 'option',
label: 'All',
value: 'all'
});
createlevel.append({
type: 'option',
label: 'Autoconfirmed',
value: 'autoconfirmed'
});
if (isTemplate) {
createlevel.append({
type: 'option',
label: 'Template editor',
value: 'templateeditor'
});
}
createlevel.append({
type: 'option',
label: 'Sysop',
value: 'sysop',
selected: true
});
field2.append({
type: 'select',
name: 'createexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', selected: true, value: 'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
}
field2.append({
type: 'textarea',
name: 'protectReason',
label: 'Reason (for protection log):'
});
if (!mw.config.get('wgArticleId')) { // tagging isn't relevant for non-existing pages
break;
}
/* falls through */
case 'tag':
field1 = new Morebits.quickForm.element({ type: 'field', label: 'Tagging options', name: 'field1' });
field1.append( {
type: 'select',
name: 'tagtype',
label: 'Choose protection template:',
list: Twinkle.protect.protectionTags,
event: Twinkle.protect.formevents.tagtype
} );
field1.append( {
type: 'checkbox',
list: [
{
name: 'small',
label: 'Iconify (small=yes)',
tooltip: 'Will use the |small=yes feature of the template, and only render it as a keylock',
checked: true
},
{
name: 'noinclude',
label: 'Wrap protection template with <noinclude>',
tooltip: 'Will wrap the protection template in <noinclude> tags, so that it won\'t transclude',
checked: (mw.config.get('wgNamespaceNumber') === 10)
}
]
} );
break;
case 'request':
field_preset = new Morebits.quickForm.element({ type: 'field', label: 'Type of protection', name: 'field_preset' });
field_preset.append({
type: 'select',
name: 'category',
label: 'Type and reason:',
event: Twinkle.protect.callback.changePreset,
list: (mw.config.get('wgArticleId') ? Twinkle.protect.protectionTypes : Twinkle.protect.protectionTypesCreate)
});
field1 = new Morebits.quickForm.element({ type: 'field', label: 'Options', name: 'field1' });
field1.append( {
type: 'select',
name: 'expiry',
label: 'Duration: ',
list: [
{ label: 'Temporary', value: 'temporary' },
{ label: 'Indefinite', value: 'indefinite' },
{ label: '', selected: true, value: '' }
]
} );
field1.append({
type: 'textarea',
name: 'reason',
label: 'Reason: '
});
break;
default:
alert("Something's afoot in twinkleprotect");
break;
}
var oldfield;
if (field_preset) {
oldfield = $(e.target.form).find('fieldset[name="field_preset"]')[0];
oldfield.parentNode.replaceChild(field_preset.render(), oldfield);
} else {
$(e.target.form).find('fieldset[name="field_preset"]').css('display', 'none');
}
if (field1) {
oldfield = $(e.target.form).find('fieldset[name="field1"]')[0];
oldfield.parentNode.replaceChild(field1.render(), oldfield);
} else {
$(e.target.form).find('fieldset[name="field1"]').css('display', 'none');
}
if (field2) {
oldfield = $(e.target.form).find('fieldset[name="field2"]')[0];
oldfield.parentNode.replaceChild(field2.render(), oldfield);
} else {
$(e.target.form).find('fieldset[name="field2"]').css('display', 'none');
}
if (e.target.values === 'protect') {
// fake a change event on the preset dropdown
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
e.target.form.category.dispatchEvent( evt );
// re-add protection level text, if it's available
if (Twinkle.protect.protectionLevel) {
Morebits.status.init($('div[name="currentprot"] span').last()[0]);
Morebits.status.info("Current protection level", Twinkle.protect.protectionLevel);
}
// reduce vertical height of dialog
$(e.target.form).find('fieldset[name="field2"] select').parent().css({ display: 'inline-block', marginRight: '0.5em' });
}
};
Twinkle.protect.formevents = {
editmodify: function twinkleprotectFormEditmodifyEvent(e) {
e.target.form.editlevel.disabled = !e.target.checked;
e.target.form.editexpiry.disabled = !e.target.checked || (e.target.form.editlevel.value === 'all');
e.target.form.editlevel.style.color = e.target.form.editexpiry.style.color = (e.target.checked ? "" : "transparent");
},
editlevel: function twinkleprotectFormEditlevelEvent(e) {
e.target.form.editexpiry.disabled = (e.target.value === 'all');
},
movemodify: function twinkleprotectFormMovemodifyEvent(e) {
e.target.form.movelevel.disabled = !e.target.checked;
e.target.form.moveexpiry.disabled = !e.target.checked || (e.target.form.movelevel.value === 'all');
e.target.form.movelevel.style.color = e.target.form.moveexpiry.style.color = (e.target.checked ? "" : "transparent");
},
movelevel: function twinkleprotectFormMovelevelEvent(e) {
e.target.form.moveexpiry.disabled = (e.target.value === 'all');
},
pcmodify: function twinkleprotectFormPcmodifyEvent(e) {
e.target.form.pclevel.disabled = !e.target.checked;
e.target.form.pcexpiry.disabled = !e.target.checked || (e.target.form.pclevel.value === 'none');
e.target.form.pclevel.style.color = e.target.form.pcexpiry.style.color = (e.target.checked ? "" : "transparent");
},
pclevel: function twinkleprotectFormPclevelEvent(e) {
e.target.form.pcexpiry.disabled = (e.target.value === 'none');
},
createlevel: function twinkleprotectFormCreatelevelEvent(e) {
e.target.form.createexpiry.disabled = (e.target.value === 'all');
},
tagtype: function twinkleprotectFormTagtypeEvent(e) {
e.target.form.small.disabled = e.target.form.noinclude.disabled = (e.target.value === 'none') || (e.target.value === 'noop');
}
};
Twinkle.protect.doCustomExpiry = function twinkleprotectDoCustomExpiry(target) {
var custom = prompt('Enter a custom expiry time. \nYou can use relative times, like "1 minute" or "19 days", or absolute timestamps, "yyyymmddhhmm" (e.g. "200602011405" is Feb 1, 2006, at 14:05 UTC).', '');
if (custom) {
var option = document.createElement('option');
option.setAttribute('value', custom);
option.textContent = custom;
target.appendChild(option);
target.value = custom;
} else {
target.selectedIndex = 0;
}
};
Twinkle.protect.protectionTypes = [
{ label: 'Unprotection', value: 'unprotect' },
{
label: 'Full protection',
list: [
{ label: 'Generic (full)', value: 'pp-protected' },
{ label: 'Content dispute/edit warring (full)', value: 'pp-dispute' },
{ label: 'Persistent vandalism (full)', value: 'pp-vandalism' },
{ label: 'User talk of blocked user (full)', value: 'pp-usertalk' }
]
},
{
label: 'Template protection',
list: [
{ label: 'Highly visible template (TE)', value: 'pp-template' }
]
},
{
label: 'Semi-protection',
list: [
{ label: 'Generic (semi)', value: 'pp-semi-protected' },
{ label: 'Persistent vandalism (semi)', selected: true, value: 'pp-semi-vandalism' },
{ label: 'BLP policy violations (semi)', value: 'pp-semi-blp' },
{ label: 'Sockpuppetry (semi)', value: 'pp-semi-sock' },
{ label: 'User talk of blocked user (semi)', value: 'pp-semi-usertalk' }
]
},
{
label: 'Pending changes',
list: [
{ label: 'Generic (PC)', value: 'pp-pc-protected' },
{ label: 'Persistent vandalism (PC)', value: 'pp-pc-vandalism' },
{ label: 'BLP policy violations (PC)', value: 'pp-pc-blp' }
]
},
{
label: 'Move protection',
list: [
{ label: 'Generic (move)', value: 'pp-move' },
{ label: 'Dispute/move warring (move)', value: 'pp-move-dispute' },
{ label: 'Page-move vandalism (move)', value: 'pp-move-vandalism' },
{ label: 'Highly visible page (move)', value: 'pp-move-indef' }
]
}
];
Twinkle.protect.protectionTypesCreate = [
{ label: 'Unprotection', value: 'unprotect' },
{
label: 'Create protection',
list: [
{ label: 'Generic ({{pp-create}})', value: 'pp-create' },
{ label: 'Offensive name', value: 'pp-create-offensive' },
{ label: 'Repeatedly recreated', selected: true, value: 'pp-create-salt' },
{ label: 'Recently deleted BLP', value: 'pp-create-blp' }
]
}
];
// A page with both regular and PC protection will be assigned its regular
// protection weight plus 2 (for PC1) or 7 (for PC2)
Twinkle.protect.protectionWeight = {
sysop: 30,
templateeditor: 20,
flaggedrevs_review: 15, // Pending Changes level 2 protection alone
autoconfirmed: 10,
flaggedrevs_autoconfirmed: 5, // Pending Changes level 1 protection alone
all: 0,
flaggedrevs_none: 0 // just in case
};
// NOTICE: keep this synched with [[MediaWiki:Protect-dropdown]]
// Also note: stabilize = Pending Changes level
Twinkle.protect.protectionPresetsInfo = {
'pp-protected': {
edit: 'sysop',
move: 'sysop',
reason: null
},
'pp-dispute': {
edit: 'sysop',
move: 'sysop',
reason: '[[WP:PP#Content disputes|Edit warring / content dispute]]'
},
'pp-vandalism': {
edit: 'sysop',
move: 'sysop',
reason: 'Persistent [[WP:Vandalism|vandalism]]'
},
'pp-usertalk': {
edit: 'sysop',
move: 'sysop',
reason: '[[WP:PP#Talk-page protection|Inappropriate use of user talk page while blocked]]'
},
'pp-template': {
edit: 'templateeditor',
move: 'templateeditor',
reason: '[[WP:High-risk templates|Highly visible template]]'
},
'pp-semi-vandalism': {
edit: 'autoconfirmed',
reason: 'Persistent [[WP:Vandalism|vandalism]]',
template: 'pp-vandalism'
},
'pp-semi-blp': {
edit: 'autoconfirmed',
reason: 'Violations of the [[WP:BLP|biographies of living persons policy]]'
},
'pp-semi-usertalk': {
edit: 'autoconfirmed',
move: 'sysop',
reason: '[[WP:PP#Talk-page protection|Inappropriate use of user talk page while blocked]]'
},
'pp-semi-template': { // removed for now
edit: 'autoconfirmed',
move: 'sysop',
reason: '[[WP:High-risk templates|Highly visible template]]',
template: 'pp-template'
},
'pp-semi-sock': {
edit: 'autoconfirmed',
reason: 'Persistent [[WP:Sock puppetry|sock puppetry]]'
},
'pp-semi-protected': {
edit: 'autoconfirmed',
reason: null,
template: 'pp-protected'
},
'pp-pc-vandalism': {
stabilize: 'autoconfirmed', // stabilize = Pending Changes
reason: 'Persistent [[WP:Vandalism|vandalism]]',
template: 'pp-pc1'
},
'pp-pc-blp': {
stabilize: 'autoconfirmed',
reason: 'Violations of the [[WP:BLP|biographies of living persons policy]]',
template: 'pp-pc1'
},
'pp-pc-protected': {
stabilize: 'autoconfirmed',
reason: null,
template: 'pp-pc1'
},
'pp-move': {
move: 'sysop',
reason: null
},
'pp-move-dispute': {
move: 'sysop',
reason: '[[WP:MOVP|Move warring]]'
},
'pp-move-vandalism': {
move: 'sysop',
reason: '[[WP:MOVP|Page-move vandalism]]'
},
'pp-move-indef': {
move: 'sysop',
reason: '[[WP:MOVP|Highly visible page]]'
},
'unprotect': {
edit: 'all',
move: 'all',
stabilize: 'none',
create: 'all',
reason: null,
template: 'none'
},
'pp-create-offensive': {
create: 'sysop',
reason: '[[WP:SALT|Offensive name]]'
},
'pp-create-salt': {
create: 'sysop',
reason: '[[WP:SALT|Repeatedly recreated]]'
},
'pp-create-blp': {
create: 'sysop',
reason: '[[WP:BLPDEL|Recently deleted BLP]]'
},
'pp-create': {
create: 'sysop',
reason: '{{pp-create}}'
}
};
Twinkle.protect.protectionTags = [
{
label: 'None (remove existing protection templates)',
value: 'none'
},
{
label: 'None (do not remove existing protection templates)',
value: 'noop'
},
{
label: 'Full protection templates',
list: [
{ label: '{{pp-dispute}}: dispute/edit war', value: 'pp-dispute', selected: true },
{ label: '{{pp-usertalk}}: blocked user talk', value: 'pp-usertalk' }
]
},
{
label: 'Full/semi-protection templates',
list: [
{ label: '{{pp-vandalism}}: vandalism', value: 'pp-vandalism' },
{ label: '{{pp-template}}: high-risk template', value: 'pp-template' },
{ label: '{{pp-protected}}: general protection', value: 'pp-protected' }
]
},
{
label: 'Semi-protection templates',
list: [
{ label: '{{pp-semi-usertalk}}: blocked user talk', value: 'pp-semi-usertalk' },
{ label: '{{pp-semi-sock}}: sockpuppetry', value: 'pp-semi-sock' },
{ label: '{{pp-semi-blp}}: BLP violations', value: 'pp-semi-blp' },
{ label: '{{pp-semi-indef}}: general long-term', value: 'pp-semi-indef' }
]
},
{
label: 'Pending changes templates',
list: [
{ label: '{{pp-pc1}}: pending changes level 1', value: 'pp-pc1' }
]
},
{
label: 'Move protection templates',
list: [
{ label: '{{pp-move-dispute}}: dispute/move war', value: 'pp-move-dispute' },
{ label: '{{pp-move-vandalism}}: page-move vandalism', value: 'pp-move-vandalism' },
{ label: '{{pp-move-indef}}: general long-term', value: 'pp-move-indef' },
{ label: '{{pp-move}}: other', value: 'pp-move' }
]
}
];
Twinkle.protect.callback.changePreset = function twinkleprotectCallbackChangePreset(e) {
var form = e.target.form;
var actiontypes = form.actiontype;
var actiontype;
for( var i = 0; i < actiontypes.length; i++ )
{
if( !actiontypes[i].checked ) {
continue;
}
actiontype = actiontypes[i].values;
break;
}
if (actiontype === 'protect') { // actually protecting the page
var item = Twinkle.protect.protectionPresetsInfo[form.category.value];
if (mw.config.get('wgArticleId')) {
if (item.edit) {
form.editmodify.checked = true;
Twinkle.protect.formevents.editmodify({ target: form.editmodify });
form.editlevel.value = item.edit;
Twinkle.protect.formevents.editlevel({ target: form.editlevel });
} else {
form.editmodify.checked = false;
Twinkle.protect.formevents.editmodify({ target: form.editmodify });
}
if (item.move) {
form.movemodify.checked = true;
Twinkle.protect.formevents.movemodify({ target: form.movemodify });
form.movelevel.value = item.move;
Twinkle.protect.formevents.movelevel({ target: form.movelevel });
} else {
form.movemodify.checked = false;
Twinkle.protect.formevents.movemodify({ target: form.movemodify });
}
if (item.stabilize) {
form.pcmodify.checked = true;
Twinkle.protect.formevents.pcmodify({ target: form.pcmodify });
form.pclevel.value = item.stabilize;
Twinkle.protect.formevents.pclevel({ target: form.pclevel });
} else {
form.pcmodify.checked = false;
Twinkle.protect.formevents.pcmodify({ target: form.pcmodify });
}
} else {
if (item.create) {
form.createlevel.value = item.create;
Twinkle.protect.formevents.createlevel({ target: form.createlevel });
}
}
var reasonField = (actiontype === "protect" ? form.protectReason : form.reason);
if (item.reason) {
reasonField.value = item.reason;
} else {
reasonField.value = '';
}
// sort out tagging options
if (mw.config.get('wgArticleId')) {
if( form.category.value === 'unprotect' ) {
form.tagtype.value = 'none';
} else {
form.tagtype.value = (item.template ? item.template : form.category.value);
}
Twinkle.protect.formevents.tagtype({ target: form.tagtype });
if( /template/.test( form.category.value ) ) {
form.noinclude.checked = true;
form.editexpiry.value = form.moveexpiry.value = form.pcexpiry.value = "indefinite";
} else {
form.noinclude.checked = false;
}
}
} else { // RPP request
if( form.category.value === 'unprotect' ) {
form.expiry.value = '';
form.expiry.disabled = true;
} else {
form.expiry.disabled = false;
}
}
};
Twinkle.protect.callback.evaluate = function twinkleprotectCallbackEvaluate(e) {
var form = e.target;
var actiontypes = form.actiontype;
var actiontype;
for( var i = 0; i < actiontypes.length; i++ )
{
if( !actiontypes[i].checked ) {
continue;
}
actiontype = actiontypes[i].values;
break;
}
var tagparams;
if( actiontype === 'tag' || (actiontype === 'protect' && mw.config.get('wgArticleId')) ) {
tagparams = {
tag: form.tagtype.value,
reason: ((form.tagtype.value === 'pp-protected' || form.tagtype.value === 'pp-semi-protected' || form.tagtype.value === 'pp-move') && form.protectReason) ? form.protectReason.value : null,
expiry: (actiontype === 'protect') ? (form.editmodify.checked ? form.editexpiry.value : (form.movemodify.checked ?
form.moveexpiry.value : null)) : null,
small: form.small.checked,
noinclude: form.noinclude.checked
};
}
switch (actiontype) {
case 'protect':
// protect the page
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Protection complete";
var statusInited = false;
var thispage;
var allDone = function twinkleprotectCallbackAllDone() {
if (thispage) {
thispage.getStatusElement().info("done");
}
if (tagparams) {
Twinkle.protect.callbacks.taggingPageInitial(tagparams);
}
};
var protectIt = function twinkleprotectCallbackProtectIt(next) {
thispage = new Morebits.wiki.page(mw.config.get('wgPageName'), "Protecting page");
if (mw.config.get('wgArticleId')) {
if (form.editmodify.checked) {
thispage.setEditProtection(form.editlevel.value, form.editexpiry.value);
}
if (form.movemodify.checked) {
thispage.setMoveProtection(form.movelevel.value, form.moveexpiry.value);
}
} else {
thispage.setCreateProtection(form.createlevel.value, form.createexpiry.value);
thispage.setWatchlist(false);
}
if (form.protectReason.value) {
thispage.setEditSummary(form.protectReason.value);
} else {
alert("You must enter a protect reason, which will be inscribed into the protection log.");
return;
}
if (!statusInited) {
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
statusInited = true;
}
thispage.protect(next);
};
var stabilizeIt = function twinkleprotectCallbackStabilizeIt() {
if (thispage) {
thispage.getStatusElement().info("done");
}
thispage = new Morebits.wiki.page(mw.config.get('wgPageName'), "Applying pending changes protection");
thispage.setFlaggedRevs(form.pclevel.value, form.pcexpiry.value);
if (form.protectReason.value) {
thispage.setEditSummary(form.protectReason.value);
} else {
alert("You must enter a protect reason, which will be inscribed into the protection log.");
return;
}
if (!statusInited) {
Morebits.simpleWindow.setButtonsEnabled(false);
Morebits.status.init(form);
statusInited = true;
}
thispage.stabilize(allDone);
};
if ((form.editmodify && form.editmodify.checked) || (form.movemodify && form.movemodify.checked) ||
!mw.config.get('wgArticleId')) {
if (form.pcmodify && form.pcmodify.checked) {
protectIt(stabilizeIt);
} else {
protectIt(allDone);
}
} else if (form.pcmodify && form.pcmodify.checked) {
stabilizeIt();
} else {
alert("Please give Twinkle something to do! \nIf you just want to tag the page, you can choose the 'Tag page with protection template' option at the top.");
}
break;
case 'tag':
// apply a protection template
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.followRedirect = false;
Morebits.wiki.actionCompleted.notice = "Tagging complete";
Twinkle.protect.callbacks.taggingPageInitial(tagparams);
break;
case 'request':
// file request at RPP
var typename, typereason;
switch( form.category.value ) {
case 'pp-dispute':
case 'pp-vandalism':
case 'pp-usertalk':
case 'pp-protected':
typename = 'full protection';
break;
case 'pp-template':
typename = 'template protection';
break;
case 'pp-semi-vandalism':
case 'pp-semi-usertalk':
case 'pp-semi-sock':
case 'pp-semi-blp':
case 'pp-semi-protected':
typename = 'semi-protection';
break;
case 'pp-pc-vandalism':
case 'pp-pc-blp':
case 'pp-pc-protected':
typename = 'pending changes';
break;
case 'pp-move':
case 'pp-move-dispute':
case 'pp-move-indef':
case 'pp-move-vandalism':
typename = 'move protection';
break;
case 'pp-create':
case 'pp-create-offensive':
case 'pp-create-blp':
case 'pp-create-salt':
typename = 'create protection';
break;
case 'unprotect':
/* falls through */
default:
typename = 'unprotection';
break;
}
switch (form.category.value) {
case 'pp-dispute':
typereason = 'Content dispute/edit warring';
break;
case 'pp-vandalism':
case 'pp-semi-vandalism':
case 'pp-pc-vandalism':
typereason = 'Persistent vandalism';
break;
case 'pp-template':
typereason = 'Highly visible template';
break;
case 'pp-usertalk':
case 'pp-semi-usertalk':
typereason = 'Inappropriate use of user talk page while blocked';
break;
case 'pp-semi-sock':
typereason = 'Persistent sockpuppetry';
break;
case 'pp-semi-blp':
case 'pp-pc-blp':
typereason = '[[WP:BLP|BLP]] policy violations';
break;
case 'pp-move-dispute':
typereason = 'Page title dispute/move warring';
break;
case 'pp-move-vandalism':
typereason = 'Page-move vandalism';
break;
case 'pp-move-indef':
typereason = 'Highly visible page';
break;
case 'pp-create-offensive':
typereason = 'Offensive name';
break;
case 'pp-create-blp':
typereason = 'Recently deleted [[WP:BLP|BLP]]';
break;
case 'pp-create-salt':
typereason = 'Repeatedly recreated';
break;
default:
typereason = '';
break;
}
var reason = typereason;
if( form.reason.value !== '') {
if ( typereason !== '' ) {
reason += "\u00A0\u2013 "; // U+00A0 NO-BREAK SPACE; U+2013 EN RULE
}
reason += form.reason.value;
}
if( reason !== '' && reason.charAt( reason.length - 1 ) !== '.' ) {
reason += '.';
}
var rppparams = {
reason: reason,
typename: typename,
category: form.category.value,
expiry: form.expiry.value
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
var rppName = 'Wikipedia:Requests for page protection';
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = rppName;
Morebits.wiki.actionCompleted.notice = "Nomination completed, redirecting now to the discussion page";
var rppPage = new Morebits.wiki.page( rppName, 'Requesting protection of page');
rppPage.setFollowRedirect( true );
rppPage.setCallbackParameters( rppparams );
rppPage.load( Twinkle.protect.callbacks.fileRequest );
break;
default:
alert("twinkleprotect: unknown kind of action");
break;
}
};
Twinkle.protect.callbacks = {
taggingPageInitial: function( tagparams ) {
if (tagparams.tag === 'noop') {
Morebits.status.info("Applying protection template", "nothing to do");
return;
}
var protectedPage = new Morebits.wiki.page( mw.config.get('wgPageName'), 'Tagging page');
protectedPage.setCallbackParameters( tagparams );
protectedPage.load( Twinkle.protect.callbacks.taggingPage );
},
taggingPage: function( protectedPage ) {
var params = protectedPage.getCallbackParameters();
var text = protectedPage.getPageText();
var tag, summary;
var oldtag_re = /\s*(?:<noinclude>)?\s*\{\{\s*(pp-[^{}]*?|protected|(?:t|v|s|p-|usertalk-v|usertalk-s|sb|move)protected(?:2)?|protected template|privacy protection)\s*?\}\}\s*(?:<\/noinclude>)?\s*/gi;
var re_result = oldtag_re.exec(text);
if (re_result) {
if (confirm("{{" + re_result[1] + "}} was found on the page. \nClick OK to remove it, or click Cancel to leave it there.")) {
text = text.replace( oldtag_re, '' );
}
}
if ( params.tag !== 'none' ) {
tag = params.tag;
if( params.reason ) {
tag += '|reason=' + params.reason;
}
if( ['indefinite', 'infinite', 'never', null].indexOf(params.expiry) === -1 ) {
tag += '|expiry={{subst:#time:j F Y|' + (/^\s*\d+\s*$/.exec(params.expiry) ? params.expiry : '+' + params.expiry) + '}}';
}
if( params.small ) {
tag += '|small=yes';
}
}
if( params.tag === 'none' ) {
summary = 'Removing protection template' + Twinkle.getPref('summaryAd');
} else {
if( params.noinclude ) {
text = "<noinclude>{{" + tag + "}}</noinclude>" + text;
} else if( Morebits.wiki.isPageRedirect() ) {
text = text + "\n{{" + tag + "}}";
} else {
text = "{{" + tag + "}}\n" + text;
}
summary = "Adding {{" + params.tag + "}}" + Twinkle.getPref('summaryAd');
}
protectedPage.setEditSummary( summary );
protectedPage.setPageText( text );
protectedPage.setCreateOption( 'nocreate' );
protectedPage.suppressProtectWarning(); // no need to let admins know they are editing through protection
protectedPage.save();
},
fileRequest: function( rppPage ) {
var params = rppPage.getCallbackParameters();
var text = rppPage.getPageText();
var statusElement = rppPage.getStatusElement();
var ns2tag = {
'0': 'la',
'1': 'lat',
'2': 'lu',
'3': 'lut',
'4': 'lw',
'5': 'lwt',
'6': 'lf',
'7': 'lft',
'8': 'lm',
'9': 'lmt',
'10': 'lt',
'11': 'ltt',
'12': 'lh',
'13': 'lht',
'14': 'lc',
'15': 'lct',
'100': 'lp',
'101': 'lpt',
'108': 'lb',
'109': 'lbt',
'118': 'ld',
'119': 'ldt',
'710': 'lttxt',
'711': 'lttxtt',
'828': 'lmd',
'829': 'lmdt'
};
var linkTemplate = ns2tag[ mw.config.get('wgNamespaceNumber') ];
// support other namespaces like TimedText
// (this could support talk spaces better, but doesn't seem worth it)
if (!linkTemplate) {
linkTemplate = 'ln|' + Morebits.pageNameNorm.substring(0, Morebits.pageNameNorm.indexOf(':'));
}
var rppRe = new RegExp( '====\\s*\\{\\{\\s*' + linkTemplate + '\\s*\\|\\s*' + RegExp.escape( mw.config.get('wgTitle'), true ) + '\\s*\\}\\}\\s*====', 'm' );
var tag = rppRe.exec( text );
var rppLink = document.createElement('a');
rppLink.setAttribute('href', mw.util.getUrl(rppPage.getPageName()) );
rppLink.appendChild(document.createTextNode(rppPage.getPageName()));
if ( tag ) {
statusElement.error( [ 'There is already a protection request for this page at ', rppLink, ', aborting.' ] );
return;
}
var newtag = '==== {{' + linkTemplate + '|' + mw.config.get('wgTitle') + '}} ====' + "\n";
if( ( new RegExp( '^' + RegExp.escape( newtag ).replace( /\s+/g, '\\s*' ), 'm' ) ).test( text ) ) {
statusElement.error( [ 'There is already a protection request for this page at ', rppLink, ', aborting.' ] );
return;
}
var words;
switch( params.expiry ) {
case 'temporary':
words = "Temporary ";
break;
case 'indefinite':
words = "Indefinite ";
break;
default:
words = "";
break;
}
words += params.typename;
newtag += "'''" + Morebits.string.toUpperCaseFirstChar(words) + ( params.reason !== '' ? ( ":''' " +
Morebits.string.formatReasonText(params.reason) ) : ".'''" ) + " ~~~~";
// If either protection type results in a increased status, then post it under increase
// else we post it under decrease
var increase = false;
var protInfo = Twinkle.protect.protectionPresetsInfo[params.category];
// function to compute protection weights (see comment at Twinkle.protect.protectionWeight)
var computeWeight = function(mainLevel, stabilizeLevel) {
var result = Twinkle.protect.protectionWeight[mainLevel || 'all'];
if (stabilizeLevel) {
if (result) {
if (stabilizeLevel.level === "autoconfirmed") {
result += 2;
} else if (stabilizeLevel.level === "review") {
result += 7;
}
} else {
result = Twinkle.protect.protectionWeight["flaggedrevs_" + stabilizeLevel];
}
}
return result;
};
// compare the page's current protection weights with the protection we are requesting
var editWeight = computeWeight(Twinkle.protect.currentProtectionLevels.edit &&
Twinkle.protect.currentProtectionLevels.edit.level,
Twinkle.protect.currentProtectionLevels.stabilize &&
Twinkle.protect.currentProtectionLevels.stabilize.level);
if (computeWeight(protInfo.edit, protInfo.stabilize) > editWeight ||
computeWeight(protInfo.move) > computeWeight(Twinkle.protect.currentProtectionLevels.move &&
Twinkle.protect.currentProtectionLevels.move.level) ||
computeWeight(protInfo.create) > computeWeight(Twinkle.protect.currentProtectionLevels.create &&
Twinkle.protect.currentProtectionLevels.create.level)) {
increase = true;
}
var reg;
if ( increase ) {
reg = /(\n==\s*Current requests for increase in protection level\s*==\s*\n\s*\{\{[^\}\}]+\}\}\s*\n)/;
} else {
reg = /(\n==\s*Current requests for reduction in protection level\s*==\s*\n\s*\{\{[^\}\}]+\}\}\s*\n)/;
}
var originalTextLength = text.length;
text = text.replace( reg, "$1" + newtag + "\n");
if (text.length === originalTextLength)
{
var linknode = document.createElement('a');
linknode.setAttribute("href", mw.util.getUrl("Wikipedia:Twinkle/Fixing RPP") );
linknode.appendChild(document.createTextNode('How to fix RPP'));
statusElement.error( [ 'Could not find relevant heading on WP:RPP. To fix this problem, please see ', linknode, '.' ] );
return;
}
statusElement.status( 'Adding new request...' );
rppPage.setEditSummary( "Requesting " + params.typename + (params.typename === "pending changes" ? ' on [[' : ' of [[') +
Morebits.pageNameNorm + ']].' + Twinkle.getPref('summaryAd') );
rppPage.setPageText( text );
rppPage.setCreateOption( 'recreate' );
rppPage.save();
}
};
})(jQuery);
//</nowiki>
15c9817c92d383ac0b7db07deae94e43f7757da9
339
2014-01-07T11:39:00Z
Amalthea
0
v2.0-682-ge4735d6: Linting
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkleprotect.js: Protect/RPP module
****************************************
* Mode of invocation: Tab ("PP"/"RPP")
* Active on: Non-special pages
* Config directives in: TwinkleConfig
*/
// Note: a lot of code in this module is re-used/called by batchprotect.
Twinkle.protect = function twinkleprotect() {
if ( mw.config.get('wgNamespaceNumber') < 0 ) {
return;
}
Twinkle.addPortletLink(Twinkle.protect.callback, Morebits.userIsInGroup('sysop') ? "PP" : "RPP", "tw-rpp",
Morebits.userIsInGroup('sysop') ? "Protect page" : "Request page protection" );
};
Twinkle.protect.callback = function twinkleprotectCallback() {
Twinkle.protect.protectionLevel = null;
var Window = new Morebits.simpleWindow( 620, 530 );
Window.setTitle( Morebits.userIsInGroup( 'sysop' ) ? "Apply, request or tag page protection" : "Request or tag page protection" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Protection templates", "Template:Protection templates" );
Window.addFooterLink( "Protection policy", "WP:PROT" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#protect" );
var form = new Morebits.quickForm( Twinkle.protect.callback.evaluate );
var actionfield = form.append( {
type: 'field',
label: 'Type of action'
} );
if( Morebits.userIsInGroup( 'sysop' ) ) {
actionfield.append( {
type: 'radio',
name: 'actiontype',
event: Twinkle.protect.callback.changeAction,
list: [
{
label: 'Protect page',
value: 'protect',
tooltip: 'Apply actual protection to the page.',
checked: true
}
]
} );
}
actionfield.append( {
type: 'radio',
name: 'actiontype',
event: Twinkle.protect.callback.changeAction,
list: [
{
label: 'Request page protection',
value: 'request',
tooltip: 'If you want to request protection via WP:RPP' + (Morebits.userIsInGroup('sysop') ? ' instead of doing the protection by yourself.' : '.'),
checked: !Morebits.userIsInGroup('sysop')
},
{
label: 'Tag page with protection template',
value: 'tag',
tooltip: 'If the protecting admin forgot to apply a protection template, or you have just protected the page without tagging, you can use this to apply the appropriate protection tag.',
disabled: mw.config.get('wgArticleId') === 0
}
]
} );
form.append({ type: 'field', label: 'Preset', name: 'field_preset' });
form.append({ type: 'field', label: '1', name: 'field1' });
form.append({ type: 'field', label: '2', name: 'field2' });
form.append( { type:'submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
// We must init the controls
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.actiontype[0].dispatchEvent( evt );
// get current protection level asynchronously
if (Morebits.userIsInGroup('sysop')) {
Morebits.wiki.actionCompleted.postfix = false; // avoid Action: completed notice
Morebits.status.init($('div[name="currentprot"] span').last()[0]);
}
Twinkle.protect.fetchProtectionLevel();
};
// Current protection level in a human-readable format
// (a string, or null if no protection; only filled for sysops)
Twinkle.protect.protectionLevel = null;
// Contains the current protection level in an object
// Once filled, it will look something like:
// { edit: { level: "sysop", expiry: <some date>, cascade: true }, ... }
Twinkle.protect.currentProtectionLevels = {};
Twinkle.protect.fetchProtectionLevel = function twinkleprotectFetchProtectionLevel() {
var api = new mw.Api();
api.get({
format: 'json',
indexpageids: true,
action: 'query',
prop: 'info|flagged',
inprop: 'protection',
titles: mw.config.get('wgPageName')
})
.done(function(data){
var pageid = data.query.pageids[0];
var page = data.query.pages[pageid];
var result = [];
var current = {};
var updateResult = function(label, level, expiry, cascade) {
// for sysops, stringify, so they can base their decision on existing protection
if (Morebits.userIsInGroup('sysop')) {
var boldnode = document.createElement('b');
boldnode.textContent = label + ": " + level;
result.push(boldnode);
if (expiry === 'infinity') {
result.push(" (indefinite) ");
} else {
result.push(" (expires " + new Date(expiry).toUTCString() + ") ");
}
if (cascade) {
result.push("(cascading) ");
}
}
};
$.each(page.protection, function( index, protection ) {
if (protection.type !== "aft") {
current[protection.type] = {
level: protection.level,
expiry: protection.expiry,
cascade: protection.cascade === ''
};
updateResult( Morebits.string.toUpperCaseFirstChar(protection.type), protection.level, protection.expiry, protection.cascade );
}
});
if (page.flagged) {
current.stabilize = {
level: page.flagged.protection_level,
expiry: page.flagged.protection_expiry
};
// FlaggedRevision gives bad date
updateResult( 'Pending Changes', page.flagged.protection_level, page.flagged.protection_expiry, false );
}
// show the protection level to sysops
if (Morebits.userIsInGroup('sysop')) {
if (!result.length) {
var boldnode = document.createElement('b');
boldnode.textContent = "no protection";
result.push(boldnode);
}
Twinkle.protect.protectionLevel = result;
Morebits.status.init($('div[name="currentprot"] span').last()[0]);
Morebits.status.info("Current protection level", Twinkle.protect.protectionLevel);
}
Twinkle.protect.currentProtectionLevels = current;
});
};
Twinkle.protect.callback.changeAction = function twinkleprotectCallbackChangeAction(e) {
var field_preset;
var field1;
var field2;
var isTemplate = mw.config.get("wgNamespaceNumber") === 10 || mw.config.get("wgNamespaceNumber") === 828;
switch (e.target.values) {
case 'protect':
field_preset = new Morebits.quickForm.element({ type: 'field', label: 'Preset', name: 'field_preset' });
field_preset.append({
type: 'select',
name: 'category',
label: 'Choose a preset:',
event: Twinkle.protect.callback.changePreset,
list: (mw.config.get('wgArticleId') ?
Twinkle.protect.protectionTypes.filter(function(v) {
return isTemplate || v.label !== 'Template protection';
}) :
Twinkle.protect.protectionTypesCreate)
});
field2 = new Morebits.quickForm.element({ type: 'field', label: 'Protection options', name: 'field2' });
field2.append({ type: 'div', name: 'currentprot', label: ' ' }); // holds the current protection level, as filled out by the async callback
// for existing pages
if (mw.config.get('wgArticleId')) {
field2.append({
type: 'checkbox',
name: 'editmodify',
event: Twinkle.protect.formevents.editmodify,
list: [
{
label: 'Modify edit protection',
value: 'editmodify',
tooltip: 'If this is turned off, the edit protection level, and expiry time, will be left as is.',
checked: true
}
]
});
var editlevel = field2.append({
type: 'select',
name: 'editlevel',
label: 'Edit protection:',
event: Twinkle.protect.formevents.editlevel
});
editlevel.append({
type: 'option',
label: 'All',
value: 'all'
});
editlevel.append({
type: 'option',
label: 'Autoconfirmed',
value: 'autoconfirmed'
});
if (isTemplate) {
editlevel.append({
type: 'option',
label: 'Template editor',
value: 'templateeditor'
});
}
editlevel.append({
type: 'option',
label: 'Sysop',
value: 'sysop',
selected: true
});
field2.append({
type: 'select',
name: 'editexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', selected: true, value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', value:'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
field2.append({
type: 'checkbox',
name: 'movemodify',
event: Twinkle.protect.formevents.movemodify,
list: [
{
label: 'Modify move protection',
value: 'movemodify',
tooltip: 'If this is turned off, the move protection level, and expiry time, will be left as is.',
checked: true
}
]
});
var movelevel = field2.append({
type: 'select',
name: 'movelevel',
label: 'Move protection:',
event: Twinkle.protect.formevents.movelevel
});
movelevel.append({
type: 'option',
label: 'All',
value: 'all'
});
movelevel.append({
type: 'option',
label: 'Autoconfirmed',
value: 'autoconfirmed'
});
if (isTemplate) {
movelevel.append({
type: 'option',
label: 'Template editor',
value: 'templateeditor'
});
}
movelevel.append({
type: 'option',
label: 'Sysop',
value: 'sysop',
selected: true
});
field2.append({
type: 'select',
name: 'moveexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', selected: true, value:'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
field2.append({
type: 'checkbox',
name: 'pcmodify',
event: Twinkle.protect.formevents.pcmodify,
list: [
{
label: 'Modify pending changes protection',
value: 'pcmodify',
tooltip: 'If this is turned off, the pending changes level, and expiry time, will be left as is.',
checked: true
}
]
});
var pclevel = field2.append({
type: 'select',
name: 'pclevel',
label: 'Pending changes:',
event: Twinkle.protect.formevents.pclevel
});
pclevel.append({
type: 'option',
label: 'None',
value: 'none'
});
pclevel.append({
type: 'option',
label: 'Level 1',
value: 'autoconfirmed',
selected: true
});
pclevel.append({
type: 'option',
label: 'Level 2 (do not use)',
value: 'review'
});
field2.append({
type: 'select',
name: 'pcexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', selected: true, value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', value:'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
} else { // for non-existing pages
var createlevel = field2.append({
type: 'select',
name: 'createlevel',
label: 'Create protection:',
event: Twinkle.protect.formevents.createlevel
});
createlevel.append({
type: 'option',
label: 'All',
value: 'all'
});
createlevel.append({
type: 'option',
label: 'Autoconfirmed',
value: 'autoconfirmed'
});
if (isTemplate) {
createlevel.append({
type: 'option',
label: 'Template editor',
value: 'templateeditor'
});
}
createlevel.append({
type: 'option',
label: 'Sysop',
value: 'sysop',
selected: true
});
field2.append({
type: 'select',
name: 'createexpiry',
label: 'Expires:',
event: function(e) {
if (e.target.value === 'custom') {
Twinkle.protect.doCustomExpiry(e.target);
}
},
list: [
{ label: '1 hour', value: '1 hour' },
{ label: '2 hours', value: '2 hours' },
{ label: '3 hours', value: '3 hours' },
{ label: '6 hours', value: '6 hours' },
{ label: '12 hours', value: '12 hours' },
{ label: '1 day', value: '1 day' },
{ label: '2 days', value: '2 days' },
{ label: '3 days', value: '3 days' },
{ label: '4 days', value: '4 days' },
{ label: '1 week', value: '1 week' },
{ label: '2 weeks', value: '2 weeks' },
{ label: '1 month', value: '1 month' },
{ label: '2 months', value: '2 months' },
{ label: '3 months', value: '3 months' },
{ label: '1 year', value: '1 year' },
{ label: 'indefinite', selected: true, value: 'indefinite' },
{ label: 'Custom...', value: 'custom' }
]
});
}
field2.append({
type: 'textarea',
name: 'protectReason',
label: 'Reason (for protection log):'
});
if (!mw.config.get('wgArticleId')) { // tagging isn't relevant for non-existing pages
break;
}
/* falls through */
case 'tag':
field1 = new Morebits.quickForm.element({ type: 'field', label: 'Tagging options', name: 'field1' });
field1.append( {
type: 'select',
name: 'tagtype',
label: 'Choose protection template:',
list: Twinkle.protect.protectionTags,
event: Twinkle.protect.formevents.tagtype
} );
field1.append( {
type: 'checkbox',
list: [
{
name: 'small',
label: 'Iconify (small=yes)',
tooltip: 'Will use the |small=yes feature of the template, and only render it as a keylock',
checked: true
},
{
name: 'noinclude',
label: 'Wrap protection template with <noinclude>',
tooltip: 'Will wrap the protection template in <noinclude> tags, so that it won\'t transclude',
checked: (mw.config.get('wgNamespaceNumber') === 10)
}
]
} );
break;
case 'request':
field_preset = new Morebits.quickForm.element({ type: 'field', label: 'Type of protection', name: 'field_preset' });
field_preset.append({
type: 'select',
name: 'category',
label: 'Type and reason:',
event: Twinkle.protect.callback.changePreset,
list: (mw.config.get('wgArticleId') ? Twinkle.protect.protectionTypes : Twinkle.protect.protectionTypesCreate)
});
field1 = new Morebits.quickForm.element({ type: 'field', label: 'Options', name: 'field1' });
field1.append( {
type: 'select',
name: 'expiry',
label: 'Duration: ',
list: [
{ label: 'Temporary', value: 'temporary' },
{ label: 'Indefinite', value: 'indefinite' },
{ label: '', selected: true, value: '' }
]
} );
field1.append({
type: 'textarea',
name: 'reason',
label: 'Reason: '
});
break;
default:
alert("Something's afoot in twinkleprotect");
break;
}
var oldfield;
if (field_preset) {
oldfield = $(e.target.form).find('fieldset[name="field_preset"]')[0];
oldfield.parentNode.replaceChild(field_preset.render(), oldfield);
} else {
$(e.target.form).find('fieldset[name="field_preset"]').css('display', 'none');
}
if (field1) {
oldfield = $(e.target.form).find('fieldset[name="field1"]')[0];
oldfield.parentNode.replaceChild(field1.render(), oldfield);
} else {
$(e.target.form).find('fieldset[name="field1"]').css('display', 'none');
}
if (field2) {
oldfield = $(e.target.form).find('fieldset[name="field2"]')[0];
oldfield.parentNode.replaceChild(field2.render(), oldfield);
} else {
$(e.target.form).find('fieldset[name="field2"]').css('display', 'none');
}
if (e.target.values === 'protect') {
// fake a change event on the preset dropdown
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
e.target.form.category.dispatchEvent( evt );
// re-add protection level text, if it's available
if (Twinkle.protect.protectionLevel) {
Morebits.status.init($('div[name="currentprot"] span').last()[0]);
Morebits.status.info("Current protection level", Twinkle.protect.protectionLevel);
}
// reduce vertical height of dialog
$(e.target.form).find('fieldset[name="field2"] select').parent().css({ display: 'inline-block', marginRight: '0.5em' });
}
};
Twinkle.protect.formevents = {
editmodify: function twinkleprotectFormEditmodifyEvent(e) {
e.target.form.editlevel.disabled = !e.target.checked;
e.target.form.editexpiry.disabled = !e.target.checked || (e.target.form.editlevel.value === 'all');
e.target.form.editlevel.style.color = e.target.form.editexpiry.style.color = (e.target.checked ? "" : "transparent");
},
editlevel: function twinkleprotectFormEditlevelEvent(e) {
e.target.form.editexpiry.disabled = (e.target.value === 'all');
},
movemodify: function twinkleprotectFormMovemodifyEvent(e) {
e.target.form.movelevel.disabled = !e.target.checked;
e.target.form.moveexpiry.disabled = !e.target.checked || (e.target.form.movelevel.value === 'all');
e.target.form.movelevel.style.color = e.target.form.moveexpiry.style.color = (e.target.checked ? "" : "transparent");
},
movelevel: function twinkleprotectFormMovelevelEvent(e) {
e.target.form.moveexpiry.disabled = (e.target.value === 'all');
},
pcmodify: function twinkleprotectFormPcmodifyEvent(e) {
e.target.form.pclevel.disabled = !e.target.checked;
e.target.form.pcexpiry.disabled = !e.target.checked || (e.target.form.pclevel.value === 'none');
e.target.form.pclevel.style.color = e.target.form.pcexpiry.style.color = (e.target.checked ? "" : "transparent");
},
pclevel: function twinkleprotectFormPclevelEvent(e) {
e.target.form.pcexpiry.disabled = (e.target.value === 'none');
},
createlevel: function twinkleprotectFormCreatelevelEvent(e) {
e.target.form.createexpiry.disabled = (e.target.value === 'all');
},
tagtype: function twinkleprotectFormTagtypeEvent(e) {
e.target.form.small.disabled = e.target.form.noinclude.disabled = (e.target.value === 'none') || (e.target.value === 'noop');
}
};
Twinkle.protect.doCustomExpiry = function twinkleprotectDoCustomExpiry(target) {
var custom = prompt('Enter a custom expiry time. \nYou can use relative times, like "1 minute" or "19 days", or absolute timestamps, "yyyymmddhhmm" (e.g. "200602011405" is Feb 1, 2006, at 14:05 UTC).', '');
if (custom) {
var option = document.createElement('option');
option.setAttribute('value', custom);
option.textContent = custom;
target.appendChild(option);
target.value = custom;
} else {
target.selectedIndex = 0;
}
};
Twinkle.protect.protectionTypes = [
{ label: 'Unprotection', value: 'unprotect' },
{
label: 'Full protection',
list: [
{ label: 'Generic (full)', value: 'pp-protected' },
{ label: 'Content dispute/edit warring (full)', value: 'pp-dispute' },
{ label: 'Persistent vandalism (full)', value: 'pp-vandalism' },
{ label: 'User talk of blocked user (full)', value: 'pp-usertalk' }
]
},
{
label: 'Template protection',
list: [
{ label: 'Highly visible template (TE)', value: 'pp-template' }
]
},
{
label: 'Semi-protection',
list: [
{ label: 'Generic (semi)', value: 'pp-semi-protected' },
{ label: 'Persistent vandalism (semi)', selected: true, value: 'pp-semi-vandalism' },
{ label: 'BLP policy violations (semi)', value: 'pp-semi-blp' },
{ label: 'Sockpuppetry (semi)', value: 'pp-semi-sock' },
{ label: 'User talk of blocked user (semi)', value: 'pp-semi-usertalk' }
]
},
{
label: 'Pending changes',
list: [
{ label: 'Generic (PC)', value: 'pp-pc-protected' },
{ label: 'Persistent vandalism (PC)', value: 'pp-pc-vandalism' },
{ label: 'BLP policy violations (PC)', value: 'pp-pc-blp' }
]
},
{
label: 'Move protection',
list: [
{ label: 'Generic (move)', value: 'pp-move' },
{ label: 'Dispute/move warring (move)', value: 'pp-move-dispute' },
{ label: 'Page-move vandalism (move)', value: 'pp-move-vandalism' },
{ label: 'Highly visible page (move)', value: 'pp-move-indef' }
]
}
];
Twinkle.protect.protectionTypesCreate = [
{ label: 'Unprotection', value: 'unprotect' },
{
label: 'Create protection',
list: [
{ label: 'Generic ({{pp-create}})', value: 'pp-create' },
{ label: 'Offensive name', value: 'pp-create-offensive' },
{ label: 'Repeatedly recreated', selected: true, value: 'pp-create-salt' },
{ label: 'Recently deleted BLP', value: 'pp-create-blp' }
]
}
];
// A page with both regular and PC protection will be assigned its regular
// protection weight plus 2 (for PC1) or 7 (for PC2)
Twinkle.protect.protectionWeight = {
sysop: 30,
templateeditor: 20,
flaggedrevs_review: 15, // Pending Changes level 2 protection alone
autoconfirmed: 10,
flaggedrevs_autoconfirmed: 5, // Pending Changes level 1 protection alone
all: 0,
flaggedrevs_none: 0 // just in case
};
// NOTICE: keep this synched with [[MediaWiki:Protect-dropdown]]
// Also note: stabilize = Pending Changes level
Twinkle.protect.protectionPresetsInfo = {
'pp-protected': {
edit: 'sysop',
move: 'sysop',
reason: null
},
'pp-dispute': {
edit: 'sysop',
move: 'sysop',
reason: '[[WP:PP#Content disputes|Edit warring / content dispute]]'
},
'pp-vandalism': {
edit: 'sysop',
move: 'sysop',
reason: 'Persistent [[WP:Vandalism|vandalism]]'
},
'pp-usertalk': {
edit: 'sysop',
move: 'sysop',
reason: '[[WP:PP#Talk-page protection|Inappropriate use of user talk page while blocked]]'
},
'pp-template': {
edit: 'templateeditor',
move: 'templateeditor',
reason: '[[WP:High-risk templates|Highly visible template]]'
},
'pp-semi-vandalism': {
edit: 'autoconfirmed',
reason: 'Persistent [[WP:Vandalism|vandalism]]',
template: 'pp-vandalism'
},
'pp-semi-blp': {
edit: 'autoconfirmed',
reason: 'Violations of the [[WP:BLP|biographies of living persons policy]]'
},
'pp-semi-usertalk': {
edit: 'autoconfirmed',
move: 'sysop',
reason: '[[WP:PP#Talk-page protection|Inappropriate use of user talk page while blocked]]'
},
'pp-semi-template': { // removed for now
edit: 'autoconfirmed',
move: 'sysop',
reason: '[[WP:High-risk templates|Highly visible template]]',
template: 'pp-template'
},
'pp-semi-sock': {
edit: 'autoconfirmed',
reason: 'Persistent [[WP:Sock puppetry|sock puppetry]]'
},
'pp-semi-protected': {
edit: 'autoconfirmed',
reason: null,
template: 'pp-protected'
},
'pp-pc-vandalism': {
stabilize: 'autoconfirmed', // stabilize = Pending Changes
reason: 'Persistent [[WP:Vandalism|vandalism]]',
template: 'pp-pc1'
},
'pp-pc-blp': {
stabilize: 'autoconfirmed',
reason: 'Violations of the [[WP:BLP|biographies of living persons policy]]',
template: 'pp-pc1'
},
'pp-pc-protected': {
stabilize: 'autoconfirmed',
reason: null,
template: 'pp-pc1'
},
'pp-move': {
move: 'sysop',
reason: null
},
'pp-move-dispute': {
move: 'sysop',
reason: '[[WP:MOVP|Move warring]]'
},
'pp-move-vandalism': {
move: 'sysop',
reason: '[[WP:MOVP|Page-move vandalism]]'
},
'pp-move-indef': {
move: 'sysop',
reason: '[[WP:MOVP|Highly visible page]]'
},
'unprotect': {
edit: 'all',
move: 'all',
stabilize: 'none',
create: 'all',
reason: null,
template: 'none'
},
'pp-create-offensive': {
create: 'sysop',
reason: '[[WP:SALT|Offensive name]]'
},
'pp-create-salt': {
create: 'sysop',
reason: '[[WP:SALT|Repeatedly recreated]]'
},
'pp-create-blp': {
create: 'sysop',
reason: '[[WP:BLPDEL|Recently deleted BLP]]'
},
'pp-create': {
create: 'sysop',
reason: '{{pp-create}}'
}
};
Twinkle.protect.protectionTags = [
{
label: 'None (remove existing protection templates)',
value: 'none'
},
{
label: 'None (do not remove existing protection templates)',
value: 'noop'
},
{
label: 'Full protection templates',
list: [
{ label: '{{pp-dispute}}: dispute/edit war', value: 'pp-dispute', selected: true },
{ label: '{{pp-usertalk}}: blocked user talk', value: 'pp-usertalk' }
]
},
{
label: 'Full/semi-protection templates',
list: [
{ label: '{{pp-vandalism}}: vandalism', value: 'pp-vandalism' },
{ label: '{{pp-template}}: high-risk template', value: 'pp-template' },
{ label: '{{pp-protected}}: general protection', value: 'pp-protected' }
]
},
{
label: 'Semi-protection templates',
list: [
{ label: '{{pp-semi-usertalk}}: blocked user talk', value: 'pp-semi-usertalk' },
{ label: '{{pp-semi-sock}}: sockpuppetry', value: 'pp-semi-sock' },
{ label: '{{pp-semi-blp}}: BLP violations', value: 'pp-semi-blp' },
{ label: '{{pp-semi-indef}}: general long-term', value: 'pp-semi-indef' }
]
},
{
label: 'Pending changes templates',
list: [
{ label: '{{pp-pc1}}: pending changes level 1', value: 'pp-pc1' }
]
},
{
label: 'Move protection templates',
list: [
{ label: '{{pp-move-dispute}}: dispute/move war', value: 'pp-move-dispute' },
{ label: '{{pp-move-vandalism}}: page-move vandalism', value: 'pp-move-vandalism' },
{ label: '{{pp-move-indef}}: general long-term', value: 'pp-move-indef' },
{ label: '{{pp-move}}: other', value: 'pp-move' }
]
}
];
Twinkle.protect.callback.changePreset = function twinkleprotectCallbackChangePreset(e) {
var form = e.target.form;
var actiontypes = form.actiontype;
var actiontype;
for( var i = 0; i < actiontypes.length; i++ )
{
if( !actiontypes[i].checked ) {
continue;
}
actiontype = actiontypes[i].values;
break;
}
if (actiontype === 'protect') { // actually protecting the page
var item = Twinkle.protect.protectionPresetsInfo[form.category.value];
if (mw.config.get('wgArticleId')) {
if (item.edit) {
form.editmodify.checked = true;
Twinkle.protect.formevents.editmodify({ target: form.editmodify });
form.editlevel.value = item.edit;
Twinkle.protect.formevents.editlevel({ target: form.editlevel });
} else {
form.editmodify.checked = false;
Twinkle.protect.formevents.editmodify({ target: form.editmodify });
}
if (item.move) {
form.movemodify.checked = true;
Twinkle.protect.formevents.movemodify({ target: form.movemodify });
form.movelevel.value = item.move;
Twinkle.protect.formevents.movelevel({ target: form.movelevel });
} else {
form.movemodify.checked = false;
Twinkle.protect.formevents.movemodify({ target: form.movemodify });
}
if (item.stabilize) {
form.pcmodify.checked = true;
Twinkle.protect.formevents.pcmodify({ target: form.pcmodify });
form.pclevel.value = item.stabilize;
Twinkle.protect.formevents.pclevel({ target: form.pclevel });
} else {
form.pcmodify.checked = false;
Twinkle.protect.formevents.pcmodify({ target: form.pcmodify });
}
} else {
if (item.create) {
form.createlevel.value = item.create;
Twinkle.protect.formevents.createlevel({ target: form.createlevel });
}
}
var reasonField = (actiontype === "protect" ? form.protectReason : form.reason);
if (item.reason) {
reasonField.value = item.reason;
} else {
reasonField.value = '';
}
// sort out tagging options
if (mw.config.get('wgArticleId')) {
if( form.category.value === 'unprotect' ) {
form.tagtype.value = 'none';
} else {
form.tagtype.value = (item.template ? item.template : form.category.value);
}
Twinkle.protect.formevents.tagtype({ target: form.tagtype });
if( /template/.test( form.category.value ) ) {
form.noinclude.checked = true;
form.editexpiry.value = form.moveexpiry.value = form.pcexpiry.value = "indefinite";
} else {
form.noinclude.checked = false;
}
}
} else { // RPP request
if( form.category.value === 'unprotect' ) {
form.expiry.value = '';
form.expiry.disabled = true;
} else {
form.expiry.disabled = false;
}
}
};
Twinkle.protect.callback.evaluate = function twinkleprotectCallbackEvaluate(e) {
var form = e.target;
var actiontypes = form.actiontype;
var actiontype;
for( var i = 0; i < actiontypes.length; i++ )
{
if( !actiontypes[i].checked ) {
continue;
}
actiontype = actiontypes[i].values;
break;
}
var tagparams;
if( actiontype === 'tag' || (actiontype === 'protect' && mw.config.get('wgArticleId')) ) {
tagparams = {
tag: form.tagtype.value,
reason: ((form.tagtype.value === 'pp-protected' || form.tagtype.value === 'pp-semi-protected' || form.tagtype.value === 'pp-move') && form.protectReason) ? form.protectReason.value : null,
expiry: (actiontype === 'protect') ? (form.editmodify.checked ? form.editexpiry.value : (form.movemodify.checked ?
form.moveexpiry.value : null)) : null,
small: form.small.checked,
noinclude: form.noinclude.checked
};
}
switch (actiontype) {
case 'protect':
// protect the page
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Protection complete";
var statusInited = false;
var thispage;
var allDone = function twinkleprotectCallbackAllDone() {
if (thispage) {
thispage.getStatusElement().info("done");
}
if (tagparams) {
Twinkle.protect.callbacks.taggingPageInitial(tagparams);
}
};
var protectIt = function twinkleprotectCallbackProtectIt(next) {
thispage = new Morebits.wiki.page(mw.config.get('wgPageName'), "Protecting page");
if (mw.config.get('wgArticleId')) {
if (form.editmodify.checked) {
thispage.setEditProtection(form.editlevel.value, form.editexpiry.value);
}
if (form.movemodify.checked) {
thispage.setMoveProtection(form.movelevel.value, form.moveexpiry.value);
}
} else {
thispage.setCreateProtection(form.createlevel.value, form.createexpiry.value);
thispage.setWatchlist(false);
}
if (form.protectReason.value) {
thispage.setEditSummary(form.protectReason.value);
} else {
alert("You must enter a protect reason, which will be inscribed into the protection log.");
return;
}
if (!statusInited) {
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
statusInited = true;
}
thispage.protect(next);
};
var stabilizeIt = function twinkleprotectCallbackStabilizeIt() {
if (thispage) {
thispage.getStatusElement().info("done");
}
thispage = new Morebits.wiki.page(mw.config.get('wgPageName'), "Applying pending changes protection");
thispage.setFlaggedRevs(form.pclevel.value, form.pcexpiry.value);
if (form.protectReason.value) {
thispage.setEditSummary(form.protectReason.value);
} else {
alert("You must enter a protect reason, which will be inscribed into the protection log.");
return;
}
if (!statusInited) {
Morebits.simpleWindow.setButtonsEnabled(false);
Morebits.status.init(form);
statusInited = true;
}
thispage.stabilize(allDone);
};
if ((form.editmodify && form.editmodify.checked) || (form.movemodify && form.movemodify.checked) ||
!mw.config.get('wgArticleId')) {
if (form.pcmodify && form.pcmodify.checked) {
protectIt(stabilizeIt);
} else {
protectIt(allDone);
}
} else if (form.pcmodify && form.pcmodify.checked) {
stabilizeIt();
} else {
alert("Please give Twinkle something to do! \nIf you just want to tag the page, you can choose the 'Tag page with protection template' option at the top.");
}
break;
case 'tag':
// apply a protection template
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.followRedirect = false;
Morebits.wiki.actionCompleted.notice = "Tagging complete";
Twinkle.protect.callbacks.taggingPageInitial(tagparams);
break;
case 'request':
// file request at RPP
var typename, typereason;
switch( form.category.value ) {
case 'pp-dispute':
case 'pp-vandalism':
case 'pp-usertalk':
case 'pp-protected':
typename = 'full protection';
break;
case 'pp-template':
typename = 'template protection';
break;
case 'pp-semi-vandalism':
case 'pp-semi-usertalk':
case 'pp-semi-sock':
case 'pp-semi-blp':
case 'pp-semi-protected':
typename = 'semi-protection';
break;
case 'pp-pc-vandalism':
case 'pp-pc-blp':
case 'pp-pc-protected':
typename = 'pending changes';
break;
case 'pp-move':
case 'pp-move-dispute':
case 'pp-move-indef':
case 'pp-move-vandalism':
typename = 'move protection';
break;
case 'pp-create':
case 'pp-create-offensive':
case 'pp-create-blp':
case 'pp-create-salt':
typename = 'create protection';
break;
case 'unprotect':
/* falls through */
default:
typename = 'unprotection';
break;
}
switch (form.category.value) {
case 'pp-dispute':
typereason = 'Content dispute/edit warring';
break;
case 'pp-vandalism':
case 'pp-semi-vandalism':
case 'pp-pc-vandalism':
typereason = 'Persistent vandalism';
break;
case 'pp-template':
typereason = 'Highly visible template';
break;
case 'pp-usertalk':
case 'pp-semi-usertalk':
typereason = 'Inappropriate use of user talk page while blocked';
break;
case 'pp-semi-sock':
typereason = 'Persistent sockpuppetry';
break;
case 'pp-semi-blp':
case 'pp-pc-blp':
typereason = '[[WP:BLP|BLP]] policy violations';
break;
case 'pp-move-dispute':
typereason = 'Page title dispute/move warring';
break;
case 'pp-move-vandalism':
typereason = 'Page-move vandalism';
break;
case 'pp-move-indef':
typereason = 'Highly visible page';
break;
case 'pp-create-offensive':
typereason = 'Offensive name';
break;
case 'pp-create-blp':
typereason = 'Recently deleted [[WP:BLP|BLP]]';
break;
case 'pp-create-salt':
typereason = 'Repeatedly recreated';
break;
default:
typereason = '';
break;
}
var reason = typereason;
if( form.reason.value !== '') {
if ( typereason !== '' ) {
reason += "\u00A0\u2013 "; // U+00A0 NO-BREAK SPACE; U+2013 EN RULE
}
reason += form.reason.value;
}
if( reason !== '' && reason.charAt( reason.length - 1 ) !== '.' ) {
reason += '.';
}
var rppparams = {
reason: reason,
typename: typename,
category: form.category.value,
expiry: form.expiry.value
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
var rppName = 'Wikipedia:Requests for page protection';
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = rppName;
Morebits.wiki.actionCompleted.notice = "Nomination completed, redirecting now to the discussion page";
var rppPage = new Morebits.wiki.page( rppName, 'Requesting protection of page');
rppPage.setFollowRedirect( true );
rppPage.setCallbackParameters( rppparams );
rppPage.load( Twinkle.protect.callbacks.fileRequest );
break;
default:
alert("twinkleprotect: unknown kind of action");
break;
}
};
Twinkle.protect.callbacks = {
taggingPageInitial: function( tagparams ) {
if (tagparams.tag === 'noop') {
Morebits.status.info("Applying protection template", "nothing to do");
return;
}
var protectedPage = new Morebits.wiki.page( mw.config.get('wgPageName'), 'Tagging page');
protectedPage.setCallbackParameters( tagparams );
protectedPage.load( Twinkle.protect.callbacks.taggingPage );
},
taggingPage: function( protectedPage ) {
var params = protectedPage.getCallbackParameters();
var text = protectedPage.getPageText();
var tag, summary;
var oldtag_re = /\s*(?:<noinclude>)?\s*\{\{\s*(pp-[^{}]*?|protected|(?:t|v|s|p-|usertalk-v|usertalk-s|sb|move)protected(?:2)?|protected template|privacy protection)\s*?\}\}\s*(?:<\/noinclude>)?\s*/gi;
var re_result = oldtag_re.exec(text);
if (re_result) {
if (confirm("{{" + re_result[1] + "}} was found on the page. \nClick OK to remove it, or click Cancel to leave it there.")) {
text = text.replace( oldtag_re, '' );
}
}
if ( params.tag !== 'none' ) {
tag = params.tag;
if( params.reason ) {
tag += '|reason=' + params.reason;
}
if( ['indefinite', 'infinite', 'never', null].indexOf(params.expiry) === -1 ) {
tag += '|expiry={{subst:#time:j F Y|' + (/^\s*\d+\s*$/.exec(params.expiry) ? params.expiry : '+' + params.expiry) + '}}';
}
if( params.small ) {
tag += '|small=yes';
}
}
if( params.tag === 'none' ) {
summary = 'Removing protection template' + Twinkle.getPref('summaryAd');
} else {
if( params.noinclude ) {
text = "<noinclude>{{" + tag + "}}</noinclude>" + text;
} else if( Morebits.wiki.isPageRedirect() ) {
text = text + "\n{{" + tag + "}}";
} else {
text = "{{" + tag + "}}\n" + text;
}
summary = "Adding {{" + params.tag + "}}" + Twinkle.getPref('summaryAd');
}
protectedPage.setEditSummary( summary );
protectedPage.setPageText( text );
protectedPage.setCreateOption( 'nocreate' );
protectedPage.suppressProtectWarning(); // no need to let admins know they are editing through protection
protectedPage.save();
},
fileRequest: function( rppPage ) {
var params = rppPage.getCallbackParameters();
var text = rppPage.getPageText();
var statusElement = rppPage.getStatusElement();
var ns2tag = {
'0': 'la',
'1': 'lat',
'2': 'lu',
'3': 'lut',
'4': 'lw',
'5': 'lwt',
'6': 'lf',
'7': 'lft',
'8': 'lm',
'9': 'lmt',
'10': 'lt',
'11': 'ltt',
'12': 'lh',
'13': 'lht',
'14': 'lc',
'15': 'lct',
'100': 'lp',
'101': 'lpt',
'108': 'lb',
'109': 'lbt',
'118': 'ld',
'119': 'ldt',
'710': 'lttxt',
'711': 'lttxtt',
'828': 'lmd',
'829': 'lmdt'
};
var linkTemplate = ns2tag[ mw.config.get('wgNamespaceNumber') ];
// support other namespaces like TimedText
// (this could support talk spaces better, but doesn't seem worth it)
if (!linkTemplate) {
linkTemplate = 'ln|' + Morebits.pageNameNorm.substring(0, Morebits.pageNameNorm.indexOf(':'));
}
var rppRe = new RegExp( '====\\s*\\{\\{\\s*' + linkTemplate + '\\s*\\|\\s*' + RegExp.escape( mw.config.get('wgTitle'), true ) + '\\s*\\}\\}\\s*====', 'm' );
var tag = rppRe.exec( text );
var rppLink = document.createElement('a');
rppLink.setAttribute('href', mw.util.getUrl(rppPage.getPageName()) );
rppLink.appendChild(document.createTextNode(rppPage.getPageName()));
if ( tag ) {
statusElement.error( [ 'There is already a protection request for this page at ', rppLink, ', aborting.' ] );
return;
}
var newtag = '==== {{' + linkTemplate + '|' + mw.config.get('wgTitle') + '}} ====' + "\n";
if( ( new RegExp( '^' + RegExp.escape( newtag ).replace( /\s+/g, '\\s*' ), 'm' ) ).test( text ) ) {
statusElement.error( [ 'There is already a protection request for this page at ', rppLink, ', aborting.' ] );
return;
}
var words;
switch( params.expiry ) {
case 'temporary':
words = "Temporary ";
break;
case 'indefinite':
words = "Indefinite ";
break;
default:
words = "";
break;
}
words += params.typename;
newtag += "'''" + Morebits.string.toUpperCaseFirstChar(words) + ( params.reason !== '' ? ( ":''' " +
Morebits.string.formatReasonText(params.reason) ) : ".'''" ) + " ~~~~";
// If either protection type results in a increased status, then post it under increase
// else we post it under decrease
var increase = false;
var protInfo = Twinkle.protect.protectionPresetsInfo[params.category];
// function to compute protection weights (see comment at Twinkle.protect.protectionWeight)
var computeWeight = function(mainLevel, stabilizeLevel) {
var result = Twinkle.protect.protectionWeight[mainLevel || 'all'];
if (stabilizeLevel) {
if (result) {
if (stabilizeLevel.level === "autoconfirmed") {
result += 2;
} else if (stabilizeLevel.level === "review") {
result += 7;
}
} else {
result = Twinkle.protect.protectionWeight["flaggedrevs_" + stabilizeLevel];
}
}
return result;
};
// compare the page's current protection weights with the protection we are requesting
var editWeight = computeWeight(Twinkle.protect.currentProtectionLevels.edit &&
Twinkle.protect.currentProtectionLevels.edit.level,
Twinkle.protect.currentProtectionLevels.stabilize &&
Twinkle.protect.currentProtectionLevels.stabilize.level);
if (computeWeight(protInfo.edit, protInfo.stabilize) > editWeight ||
computeWeight(protInfo.move) > computeWeight(Twinkle.protect.currentProtectionLevels.move &&
Twinkle.protect.currentProtectionLevels.move.level) ||
computeWeight(protInfo.create) > computeWeight(Twinkle.protect.currentProtectionLevels.create &&
Twinkle.protect.currentProtectionLevels.create.level)) {
increase = true;
}
var reg;
if ( increase ) {
reg = /(\n==\s*Current requests for increase in protection level\s*==\s*\n\s*\{\{[^\}\}]+\}\}\s*\n)/;
} else {
reg = /(\n==\s*Current requests for reduction in protection level\s*==\s*\n\s*\{\{[^\}\}]+\}\}\s*\n)/;
}
var originalTextLength = text.length;
text = text.replace( reg, "$1" + newtag + "\n");
if (text.length === originalTextLength)
{
var linknode = document.createElement('a');
linknode.setAttribute("href", mw.util.getUrl("Wikipedia:Twinkle/Fixing RPP") );
linknode.appendChild(document.createTextNode('How to fix RPP'));
statusElement.error( [ 'Could not find relevant heading on WP:RPP. To fix this problem, please see ', linknode, '.' ] );
return;
}
statusElement.status( 'Adding new request...' );
rppPage.setEditSummary( "Requesting " + params.typename + (params.typename === "pending changes" ? ' on [[' : ' of [[') +
Morebits.pageNameNorm + ']].' + Twinkle.getPref('summaryAd') );
rppPage.setPageText( text );
rppPage.setCreateOption( 'recreate' );
rppPage.save();
}
};
})(jQuery);
//</nowiki>
15c9817c92d383ac0b7db07deae94e43f7757da9
MediaWiki:Gadget-twinklespeedy.js
8
122
314
313
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklespeedy.js: CSD module
****************************************
* Mode of invocation: Tab ("CSD")
* Active on: Non-special, existing pages
* Config directives in: TwinkleConfig
*
* NOTE FOR DEVELOPERS:
* If adding a new criterion, add it to the appropriate places at the top of
* twinkleconfig.js. Also check out the default values of the CSD preferences
* in twinkle.js, and add your new criterion to those if you think it would be
* good.
*/
Twinkle.speedy = function twinklespeedy() {
// Disable on:
// * special pages
// * non-existent pages
if (mw.config.get('wgNamespaceNumber') < 0 || !mw.config.get('wgArticleId')) {
return;
}
Twinkle.addPortletLink( Twinkle.speedy.callback, "CSD", "tw-csd", Morebits.userIsInGroup('sysop') ? "Delete page according to WP:CSD" : "Request speedy deletion according to WP:CSD" );
};
// This function is run when the CSD tab/header link is clicked
Twinkle.speedy.callback = function twinklespeedyCallback() {
Twinkle.speedy.initDialog(Morebits.userIsInGroup( 'sysop' ) ? Twinkle.speedy.callback.evaluateSysop : Twinkle.speedy.callback.evaluateUser, true);
};
// Used by unlink feature
Twinkle.speedy.dialog = null;
// The speedy criteria list can be in one of several modes
Twinkle.speedy.mode = {
sysopSubmit: 1, // radio buttons, no subgroups, submit when "Submit" button is clicked
sysopRadioClick: 2, // radio buttons, no subgroups, submit when a radio button is clicked
userMultipleSubmit: 3, // check boxes, subgroups, "Submit" button already pressent
userMultipleRadioClick: 4, // check boxes, subgroups, need to add a "Submit" button
userSingleSubmit: 5, // radio buttons, subgroups, submit when "Submit" button is clicked
userSingleRadioClick: 6, // radio buttons, subgroups, submit when a radio button is clicked
// are we in "delete page" mode?
// (sysops can access both "delete page" [sysop] and "tag page only" [user] modes)
isSysop: function twinklespeedyModeIsSysop(mode) {
return mode === Twinkle.speedy.mode.sysopSubmit ||
mode === Twinkle.speedy.mode.sysopRadioClick;
},
// do we have a "Submit" button once the form is created?
hasSubmitButton: function twinklespeedyModeHasSubmitButton(mode) {
return mode === Twinkle.speedy.mode.sysopSubmit ||
mode === Twinkle.speedy.mode.userMultipleSubmit ||
mode === Twinkle.speedy.mode.userMultipleRadioClick ||
mode === Twinkle.speedy.mode.userSingleSubmit;
},
// is db-multiple the outcome here?
isMultiple: function twinklespeedyModeIsMultiple(mode) {
return mode === Twinkle.speedy.mode.userMultipleSubmit ||
mode === Twinkle.speedy.mode.userMultipleRadioClick;
},
// do we want subgroups? (if not we have to use prompt())
wantSubgroups: function twinklespeedyModeWantSubgroups(mode) {
return !Twinkle.speedy.mode.isSysop(mode);
}
};
// Prepares the speedy deletion dialog and displays it
Twinkle.speedy.initDialog = function twinklespeedyInitDialog(callbackfunc) {
var dialog;
Twinkle.speedy.dialog = new Morebits.simpleWindow( Twinkle.getPref('speedyWindowWidth'), Twinkle.getPref('speedyWindowHeight') );
dialog = Twinkle.speedy.dialog;
dialog.setTitle( "Choose criteria for speedy deletion" );
dialog.setScriptName( "Twinkle" );
dialog.addFooterLink( "Speedy deletion policy", "WP:CSD" );
dialog.addFooterLink( "Twinkle help", "WP:TW/DOC#speedy" );
var form = new Morebits.quickForm( callbackfunc, (Twinkle.getPref('speedySelectionStyle') === 'radioClick' ? 'change' : null) );
if( Morebits.userIsInGroup( 'sysop' ) ) {
form.append( {
type: 'checkbox',
list: [
{
label: 'Tag page only, don\'t delete',
value: 'tag_only',
name: 'tag_only',
tooltip: 'If you just want to tag the page, instead of deleting it now',
checked : Twinkle.getPref('deleteSysopDefaultToTag'),
event: function( event ) {
var cForm = event.target.form;
var cChecked = event.target.checked;
// enable/disable talk page checkbox
if (cForm.talkpage) {
cForm.talkpage.disabled = cChecked;
cForm.talkpage.checked = !cChecked && Twinkle.getPref('deleteTalkPageOnDelete');
}
// enable/disable redirects checkbox
cForm.redirects.disabled = cChecked;
cForm.redirects.checked = !cChecked;
// enable/disable notify checkbox
cForm.notify.disabled = !cChecked;
cForm.notify.checked = cChecked;
// enable/disable multiple
cForm.multiple.disabled = !cChecked;
cForm.multiple.checked = false;
Twinkle.speedy.callback.modeChanged(cForm);
event.stopPropagation();
}
}
]
} );
form.append( { type: 'header', label: 'Delete-related options' } );
if (mw.config.get('wgNamespaceNumber') % 2 === 0 && (mw.config.get('wgNamespaceNumber') !== 2 || (/\//).test(mw.config.get('wgTitle')))) { // hide option for user pages, to avoid accidentally deleting user talk page
form.append( {
type: 'checkbox',
list: [
{
label: 'Also delete talk page',
value: 'talkpage',
name: 'talkpage',
tooltip: "This option deletes the page's talk page in addition. If you choose the F8 (moved to Commons) criterion, this option is ignored and the talk page is *not* deleted.",
checked: Twinkle.getPref('deleteTalkPageOnDelete'),
disabled: Twinkle.getPref('deleteSysopDefaultToTag'),
event: function( event ) {
event.stopPropagation();
}
}
]
} );
}
form.append( {
type: 'checkbox',
list: [
{
label: 'Also delete all redirects',
value: 'redirects',
name: 'redirects',
tooltip: "This option deletes all incoming redirects in addition. Avoid this option for procedural (e.g. move/merge) deletions.",
checked: Twinkle.getPref('deleteRedirectsOnDelete'),
disabled: Twinkle.getPref('deleteSysopDefaultToTag'),
event: function( event ) {
event.stopPropagation();
}
}
]
} );
form.append( { type: 'header', label: 'Tag-related options' } );
}
form.append( {
type: 'checkbox',
list: [
{
label: 'Notify page creator if possible',
value: 'notify',
name: 'notify',
tooltip: "A notification template will be placed on the talk page of the creator, IF you have a notification enabled in your Twinkle preferences " +
"for the criterion you choose AND this box is checked. The creator may be welcomed as well.",
checked: !Morebits.userIsInGroup( 'sysop' ) || Twinkle.getPref('deleteSysopDefaultToTag'),
disabled: Morebits.userIsInGroup( 'sysop' ) && !Twinkle.getPref('deleteSysopDefaultToTag'),
event: function( event ) {
event.stopPropagation();
}
}
]
} );
form.append( {
type: 'checkbox',
list: [
{
label: 'Tag with multiple criteria',
value: 'multiple',
name: 'multiple',
tooltip: "When selected, you can select several criteria that apply to the page. For example, G11 and A7 are a common combination for articles.",
disabled: Morebits.userIsInGroup( 'sysop' ) && !Twinkle.getPref('deleteSysopDefaultToTag'),
event: function( event ) {
Twinkle.speedy.callback.modeChanged( event.target.form );
event.stopPropagation();
}
}
]
} );
form.append( {
type: 'div',
name: 'work_area',
label: 'Failed to initialize the CSD module. Please try again, or tell the Twinkle developers about the issue.'
} );
if( Twinkle.getPref( 'speedySelectionStyle' ) !== 'radioClick' ) {
form.append( { type: 'submit' } );
}
var result = form.render();
dialog.setContent( result );
dialog.display();
Twinkle.speedy.callback.modeChanged( result );
};
Twinkle.speedy.callback.modeChanged = function twinklespeedyCallbackModeChanged(form) {
var namespace = mw.config.get('wgNamespaceNumber');
var form = form;
// first figure out what mode we're in
var mode = Twinkle.speedy.mode.userSingleSubmit;
if (form.tag_only && !form.tag_only.checked) {
mode = Twinkle.speedy.mode.sysopSubmit;
} else {
if (form.multiple.checked) {
mode = Twinkle.speedy.mode.userMultipleSubmit;
} else {
mode = Twinkle.speedy.mode.userSingleSubmit;
}
}
if (Twinkle.getPref('speedySelectionStyle') === 'radioClick') {
mode++;
}
var work_area = new Morebits.quickForm.element( {
type: 'div',
name: 'work_area'
} );
if (mode === Twinkle.speedy.mode.userMultipleRadioClick) {
work_area.append( {
type: 'div',
label: 'When finished choosing criteria, click:'
} );
work_area.append( {
type: 'button',
name: 'submit-multiple',
label: 'Submit Query',
event: function( event ) {
Twinkle.speedy.callback.evaluateUser( event );
event.stopPropagation();
}
} );
}
var radioOrCheckbox = (Twinkle.speedy.mode.isMultiple(mode) ? 'checkbox' : 'radio');
if (namespace % 2 === 1 && namespace !== 3) {
// show db-talk on talk pages, but not user talk pages
work_area.append( { type: 'header', label: 'Talk pages' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.talkList, mode) } );
}
switch (namespace) {
case 0: // article
case 1: // talk
work_area.append( { type: 'header', label: 'Articles' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.articleList, mode) } );
break;
case 2: // user
case 3: // user talk
work_area.append( { type: 'header', label: 'User pages' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.userList, mode) } );
break;
case 6: // file
case 7: // file talk
work_area.append( { type: 'header', label: 'Files' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.fileList, mode) } );
if (!Twinkle.speedy.mode.isSysop(mode)) {
work_area.append( { type: 'div', label: 'Tagging for CSD F4 (no license), F5 (orphaned fair use), F6 (no fair use rationale), and F11 (no permission) can be done using Twinkle\'s "DI" tab.' } );
}
break;
case 10: // template
case 11: // template talk
work_area.append( { type: 'header', label: 'Templates' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.templateList, mode) } );
break;
case 14: // category
case 15: // category talk
work_area.append( { type: 'header', label: 'Categories' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.categoryList, mode) } );
break;
case 100: // portal
case 101: // portal talk
work_area.append( { type: 'header', label: 'Portals' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.portalList, mode) } );
break;
default:
break;
}
work_area.append( { type: 'header', label: 'General criteria' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.generalList, mode) });
work_area.append( { type: 'header', label: 'Redirects' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.redirectList, mode) } );
var old_area = Morebits.quickForm.getElements(form, "work_area")[0];
form.replaceChild(work_area.render(), old_area);
};
Twinkle.speedy.generateCsdList = function twinklespeedyGenerateCsdList(list, mode) {
// mode switches
var isSysop = Twinkle.speedy.mode.isSysop(mode);
var multiple = Twinkle.speedy.mode.isMultiple(mode);
var wantSubgroups = Twinkle.speedy.mode.wantSubgroups(mode);
var hasSubmitButton = Twinkle.speedy.mode.hasSubmitButton(mode);
var openSubgroupHandler = function(e) {
$(e.target.form).find('input').attr('disabled', 'disabled');
$(e.target.form).children().css('color', 'gray');
$(e.target).parent().css('color', 'black').find('input').attr('disabled', false);
$(e.target).parent().find('input:text')[0].focus();
e.stopPropagation();
};
var submitSubgroupHandler = function(e) {
Twinkle.speedy.callback.evaluateUser(e);
e.stopPropagation();
}
return $.map(list, function(critElement) {
var criterion = $.extend({}, critElement);
if (!wantSubgroups) {
criterion.subgroup = null;
}
if (multiple) {
if (criterion.hideWhenMultiple) {
return null;
}
if (criterion.hideSubgroupWhenMultiple) {
criterion.subgroup = null;
}
} else {
if (criterion.hideWhenSingle) {
return null;
}
if (criterion.hideSubgroupWhenSingle) {
criterion.subgroup = null;
}
}
if (isSysop) {
if (criterion.hideWhenSysop) {
return null;
}
if (criterion.hideSubgroupWhenSysop) {
criterion.subgroup = null;
}
} else {
if (criterion.hideWhenUser) {
return null;
}
if (criterion.hideSubgroupWhenUser) {
criterion.subgroup = null;
}
}
if (criterion.subgroup && !hasSubmitButton) {
if ($.isArray(criterion.subgroup)) {
criterion.subgroup.push({
type: 'button',
name: 'submit',
label: 'Submit Query',
event: submitSubgroupHandler
});
} else {
criterion.subgroup = [
criterion.subgroup,
{
type: 'button',
name: 'submit', // ends up being called "csd.submit" so this is OK
label: 'Submit Query',
event: submitSubgroupHandler
}
];
}
criterion.event = openSubgroupHandler;
}
return criterion;
});
}
Twinkle.speedy.talkList = [
{
label: 'G8: Talk pages with no corresponding subject page',
value: 'talk',
tooltip: 'This excludes any page that is useful to the project - in particular, user talk pages, talk page archives, and talk pages for files that exist on Wikimedia Commons.'
}
];
Twinkle.speedy.fileList = [
{
label: 'F1: Redundant file',
value: 'redundantimage',
tooltip: 'Any file that is a redundant copy, in the same file format and same or lower resolution, of something else on Wikipedia. Likewise, other media that is a redundant copy, in the same format and of the same or lower quality. This does not apply to files duplicated on Wikimedia Commons, because of licence issues; these should be tagged with {{subst:ncd|Image:newname.ext}} or {{subst:ncd}} instead',
subgroup: {
name: 'redundantimage_filename',
type: 'input',
label: 'File this is redundant to: ',
tooltip: 'The "File:" prefix can be left off.'
}
},
{
label: 'F2: Corrupt or blank file',
value: 'noimage',
tooltip: 'Before deleting this type of file, verify that the MediaWiki engine cannot read it by previewing a resized thumbnail of it. This also includes empty (i.e., no content) file description pages for Commons files'
},
{
label: 'F2: Unneeded file description page for a file on Commons',
value: 'fpcfail',
tooltip: 'An image, hosted on Commons, but with tags or information on its English Wikipedia description page that are no longer needed. (For example, a failed featured picture candidate.)',
hideWhenMultiple: true
},
{
label: 'F3: Improper license',
value: 'noncom',
tooltip: 'Files licensed as "for non-commercial use only", "non-derivative use" or "used with permission" that were uploaded on or after 2005-05-19, except where they have been shown to comply with the limited standards for the use of non-free content. This includes files licensed under a "Non-commercial Creative Commons License". Such files uploaded before 2005-05-19 may also be speedily deleted if they are not used in any articles'
},
{
label: 'F4: Lack of licensing information',
value: 'unksource',
tooltip: 'Files in category "Files with unknown source", "Files with unknown copyright status", or "Files with no copyright tag" that have been tagged with a template that places them in the category for more than seven days, regardless of when uploaded. Note, users sometimes specify their source in the upload summary, so be sure to check the circumstances of the file.',
hideWhenUser: true
},
{
label: 'F5: Unused unfree copyrighted file',
value: 'unfree',
tooltip: 'Files that are not under a free license or in the public domain that are not used in any article and that have been tagged with a template that places them in a dated subcategory of Category:Orphaned fairuse files for more than seven days. Reasonable exceptions may be made for file uploaded for an upcoming article. Use the "Orphaned fair use" option in Twinkle\'s DI module to tag files for forthcoming deletion.',
hideWhenUser: true
},
{
label: 'F6: Missing fair-use rationale',
value: 'norat',
tooltip: 'Any file without a fair use rationale may be deleted seven days after it is uploaded. Boilerplate fair use templates do not constitute a fair use rationale. Files uploaded before 2006-05-04 should not be deleted immediately; instead, the uploader should be notified that a fair-use rationale is needed. Files uploaded after 2006-05-04 can be tagged using the "No fair use rationale" option in Twinkle\'s DI module. Such files can be found in the dated subcategories of Category:Files with no fair use rationale.',
hideWhenUser: true
},
{
label: 'F7: Clearly invalid fair-use tag',
value: 'badfairuse', // same as below
tooltip: 'This is only for files with a clearly invalid fair-use tag, such as a {{Non-free logo}} tag on a photograph of a mascot. For cases that require a waiting period (replaceable images or otherwise disputed rationales), use the options on Twinkle\'s DI tab.',
subgroup: {
name: 'badfairuse_reason',
type: 'input',
label: 'Optional explanation: ',
size: 60
}
},
{
label: 'F7: Fair-use media from a commercial image agency which is not the subject of sourced commentary',
value: 'badfairuse', // same as above
tooltip: 'Non-free images or media from a commercial source (e.g., Associated Press, Getty), where the file itself is not the subject of sourced commentary, are considered an invalid claim of fair use and fail the strict requirements of WP:NFCC.',
subgroup: {
name: 'badfairuse_reason',
type: 'input',
label: 'Optional explanation: ',
size: 60
},
hideWhenMultiple: true
},
{
label: 'F8: File available as an identical or higher-resolution copy on Wikimedia Commons',
value: 'nowcommons',
tooltip: 'Provided the following conditions are met: 1: The file format of both images is the same. 2: The file\'s license and source status is beyond reasonable doubt, and the license is undoubtedly accepted at Commons. 3: All information on the file description page is present on the Commons file description page. That includes the complete upload history with links to the uploader\'s local user pages. 4: The file is not protected, and the file description page does not contain a request not to move it to Commons. 5: If the file is available on Commons under a different name than locally, all local references to the file must be updated to point to the title used at Commons. 6: For {{c-uploaded}} files: They may be speedily deleted as soon as they are off the Main Page',
subgroup: {
name: 'nowcommons_filename',
type: 'input',
label: 'Filename on Commons: ',
value: Morebits.pageNameNorm,
tooltip: 'This can be left blank if the file has the same name on Commons as here. The "File:" prefix is optional.'
},
hideWhenMultiple: true
},
{
label: 'F9: Unambiguous copyright infringement',
value: 'imgcopyvio',
tooltip: 'The file was copied from a website or other source that does not have a license compatible with Wikipedia, and the uploader neither claims fair use nor makes a credible assertion of permission of free use. Sources that do not have a license compatible with Wikipedia include stock photo libraries such as Getty Images or Corbis. Non-blatant copyright infringements should be discussed at Wikipedia:Files for deletion',
subgroup: {
name: 'imgcopyvio_url',
type: 'input',
label: 'URL of the copyvio, including the "http://". If you cannot provide a URL, please do not use CSD F9. (Exception: for copyvios of non-Internet sources, leave the box blank.) ',
size: 60
}
},
{
label: 'F10: Useless non-media file',
value: 'badfiletype',
tooltip: 'Files uploaded that are neither image, sound, nor video files (e.g. .doc, .pdf, or .xls files) which are not used in any article and have no foreseeable encyclopedic use'
},
{
label: 'F11: No evidence of permission',
value: 'nopermission',
tooltip: 'If an uploader has specified a license and has named a third party as the source/copyright holder without providing evidence that this third party has in fact agreed, the item may be deleted seven days after notification of the uploader',
hideWhenUser: true
},
{
label: 'G8: File description page with no corresponding file',
value: 'imagepage',
tooltip: 'This is only for use when the file doesn\'t exist at all. Corrupt files, and local description pages for files on Commons, should use F2; implausible redirects should use R3; and broken Commons redirects should use G6.'
}
];
Twinkle.speedy.articleList = [
{
label: 'A1: No context. Articles lacking sufficient context to identify the subject of the article.',
value: 'nocontext',
tooltip: 'Example: "He is a funny man with a red car. He makes people laugh." This applies only to very short articles. Context is different from content, treated in A3, below.'
},
{
label: 'A2: Foreign language articles that exist on another Wikimedia project',
value: 'foreign',
tooltip: 'If the article in question does not exist on another project, the template {{notenglish}} should be used instead. All articles in a non-English language that do not meet this criteria (and do not meet any other criteria for speedy deletion) should be listed at Pages Needing Translation (PNT) for review and possible translation',
subgroup: {
name: 'foreign_source',
type: 'input',
label: 'Interwiki link to the article on the foreign-language wiki: ',
tooltip: 'For example, fr:Bonjour'
}
},
{
label: 'A3: No content whatsoever',
value: 'nocontent',
tooltip: 'Any article consisting only of links elsewhere (including hyperlinks, category tags and "see also" sections), a rephrasing of the title, and/or attempts to correspond with the person or group named by its title. This does not include disambiguation pages'
},
{
label: 'A5: Transwikied articles',
value: 'transwiki',
tooltip: 'Any article that has been discussed at Articles for Deletion (et al), where the outcome was to transwiki, and where the transwikification has been properly performed and the author information recorded. Alternately, any article that consists of only a dictionary definition, where the transwikification has been properly performed and the author information recorded'
},
{
label: 'A7: Unremarkable people, groups, companies, web content, individual animals, or organized events',
value: 'a7',
tooltip: 'An article about a real person, group of people, band, club, company, web content, individual animal, tour, or party that does not assert the importance or significance of its subject. If controversial, or if a previous AfD has resulted in the article being kept, the article should be nominated for AfD instead',
hideWhenSingle: true
},
{
label: 'A7: Unremarkable person',
value: 'person',
tooltip: 'An article about a real person that does not assert the importance or significance of its subject. If controversial, or if there has been a previous AfD that resulted in the article being kept, the article should be nominated for AfD instead',
hideWhenMultiple: true
},
{
label: 'A7: Unremarkable musician(s) or band',
value: 'band',
tooltip: 'Article about a band, singer, musician, or musical ensemble that does not assert the importance or significance of the subject',
hideWhenMultiple: true
},
{
label: 'A7: Unremarkable club',
value: 'club',
tooltip: 'Article about a club that does not assert the importance or significance of the subject',
hideWhenMultiple: true
},
{
label: 'A7: Unremarkable company or organization',
value: 'corp',
tooltip: 'Article about a company or organization that does not assert the importance or significance of the subject',
hideWhenMultiple: true
},
{
label: 'A7: Unremarkable website or web content',
value: 'web',
tooltip: 'Article about a web site, blog, online forum, webcomic, podcast, or similar web content that does not assert the importance or significance of its subject',
hideWhenMultiple: true
},
{
label: 'A7: Unremarkable individual animal',
value: 'animal',
tooltip: 'Article about an individual animal (e.g. pet) that does not assert the importance or significance of its subject',
hideWhenMultiple: true
},
{
label: 'A7: Unremarkable organized event',
value: 'event',
tooltip: 'Article about an organized event (tour, function, meeting, party, etc.) that does not assert the importance or significance of its subject',
hideWhenMultiple: true
},
{
label: 'A9: Unremarkable musical recording where artist\'s article doesn\'t exist',
value: 'a9',
tooltip: 'An article about a musical recording which does not indicate why its subject is important or significant, and where the artist\'s article has never existed or has been deleted'
},
{
label: 'A10: Recently created article that duplicates an existing topic',
value: 'a10',
tooltip: 'A recently created article with no relevant page history that does not aim to expand upon, detail or improve information within any existing article(s) on the subject, and where the title is not a plausible redirect. This does not include content forks, split pages or any article that aims at expanding or detailing an existing one.',
subgroup: {
name: 'a10_article',
type: 'input',
label: 'Article that is duplicated: '
}
},
{
label: 'A11: Obviously made up by creator, and no claim of significance',
value: 'madeup',
tooltip: 'An article which plainly indicates that the subject was invented/coined/discovered by the article\'s creator or someone they know personally, and does not credibly indicate why its subject is important or significant'
}
];
Twinkle.speedy.categoryList = [
{
label: 'C1: Empty categories',
value: 'catempty',
tooltip: 'Categories that have been unpopulated for at least four days. This does not apply to categories being discussed at WP:CFD, disambiguation categories, and certain other exceptions. If the category isn\'t relatively new, it possibly contained articles earlier, and deeper investigation is needed'
},
{
label: 'G8: Categories populated by a deleted or retargeted template',
value: 'templatecat',
tooltip: 'This is for situations where a category is effectively empty, because the template(s) that formerly placed pages in that category are now deleted. This excludes categories that are still in use.'
}
];
Twinkle.speedy.userList = [
{
label: 'U1: User request',
value: 'userreq',
tooltip: 'Personal subpages, upon request by their user. In some rare cases there may be administrative need to retain the page. Also, sometimes, main user pages may be deleted as well. See Wikipedia:User page for full instructions and guidelines',
subgroup: ((mw.config.get('wgNamespaceNumber') === 3 && mw.config.get('wgTitle').indexOf('/') === -1) ? {
name: 'userreq_rationale',
type: 'input',
label: 'A mandatory rationale to explain why this user talk page should be deleted: ',
tooltip: 'User talk pages are deleted only in highly exceptional circumstances. See WP:DELTALK.',
size: 60
} : null),
hideSubgroupWhenMultiple: true
},
{
label: 'U2: Nonexistent user',
value: 'nouser',
tooltip: 'User pages of users that do not exist (Check Special:Listusers)'
},
{
label: 'U3: Non-free galleries',
value: 'gallery',
tooltip: 'Galleries in the userspace which consist mostly of "fair use" or non-free files. Wikipedia\'s non-free content policy forbids users from displaying non-free files, even ones they have uploaded themselves, in userspace. It is acceptable to have free files, GFDL-files, Creative Commons and similar licenses along with public domain material, but not "fair use" files'
},
{
label: 'G11: Promotional user page under a promotional user name',
value: 'spamuser',
tooltip: 'A promotional user page, with a username that promotes or implies affiliation with the thing being promoted. Note that simply having a page on a company or product in one\'s userspace does not qualify it for deletion. If a user page is spammy but the username is not, then consider tagging with regular G11 instead.',
hideWhenMultiple: true
}
];
Twinkle.speedy.templateList = [
{
label: 'T2: Templates that are blatant misrepresentations of established policy',
value: 'policy',
tooltip: 'This includes "speedy deletion" templates for issues that are not speedy deletion criteria and disclaimer templates intended to be used in articles'
},
{
label: 'T3: Duplicate templates or hardcoded instances',
value: 'duplicatetemplate',
tooltip: 'Templates that are either substantial duplications of another template or hardcoded instances of another template where the same functionality could be provided by that other template',
subgroup: {
name: 'duplicatetemplate_2',
type: 'input',
label: 'Template this is redundant to: ',
tooltip: 'The "Template:" prefix is not needed.'
},
hideWhenMultiple: true
},
{
label: 'T3: Templates that are not employed in any useful fashion',
value: 't3',
tooltip: 'This criterion allows you to provide a rationale. In many cases, another criterion will be more appropriate, such as G1, G2, G6, or G8.',
subgroup: {
name: 't3_rationale',
type: 'input',
label: 'Rationale: ',
tooltip: 'The rationale is required.',
size: 60
},
hideWhenMultiple: true
}
];
Twinkle.speedy.portalList = [
{
label: 'P1: Portal that would be subject to speedy deletion if it were an article',
value: 'p1',
tooltip: 'You must specify the article criterion that applies in this case (A1, A3, A7, or A10).',
subgroup: {
name: 'p1_1',
type: 'select',
label: 'Article criterion that would apply: '
},
hideWhenMultiple: true
},
{
label: 'P2: Underpopulated portal',
value: 'emptyportal',
tooltip: 'Any Portal based on a topic for which there is not a non-stub header article, and at least three non-stub articles detailing subject matter that would be appropriate to discuss under the title of that Portal'
}
];
Twinkle.speedy.generalList = [
{
label: 'Custom rationale' + (Morebits.userIsInGroup('sysop') ? ' (custom deletion reason)' : ' using {{db}} template'),
value: 'reason',
tooltip: '{{db}} is short for "delete because". At least one of the other deletion criteria must still apply to the page, and you must make mention of this in your rationale. This is not a "catch-all" for when you can\'t find any criteria that fit.',
subgroup: {
name: 'reason_1',
type: 'input',
label: 'Rationale: ',
size: 60
},
hideWhenMultiple: true,
hideSubgroupWhenSysop: true
},
{
label: 'G1: Patent nonsense. Pages consisting purely of incoherent text or gibberish with no meaningful content or history.',
value: 'nonsense',
tooltip: 'This does not include poor writing, partisan screeds, obscene remarks, vandalism, fictional material, material not in English, poorly translated material, implausible theories, or hoaxes. In short, if you can understand it, G1 does not apply.'
},
{
label: 'G2: Test page',
value: 'test',
tooltip: 'A page created to test editing or other Wikipedia functions. Pages in the User namespace are not included, nor are valid but unused or duplicate templates (although criterion T3 may apply).'
},
{
label: 'G3: Pure vandalism',
value: 'vandalism',
tooltip: 'Plain pure vandalism (including redirects left behind from pagemove vandalism)'
},
{
label: 'G3: Blatant hoax',
value: 'hoax',
tooltip: 'Blatant and obvious hoax, to the point of vandalism',
hideWhenMultiple: true
},
{
label: 'G4: Recreation of material deleted via a deletion discussion',
value: 'repost',
tooltip: 'A copy, by any title, of a page that was deleted via an XfD process or Deletion review, provided that the copy is substantially identical to the deleted version. This clause does not apply to content that has been "userfied", to content undeleted as a result of Deletion review, or if the prior deletions were proposed or speedy deletions, although in this last case, other speedy deletion criteria may still apply',
subgroup: {
name: 'repost_1',
type: 'input',
label: 'Page where the deletion discussion took place: ',
tooltip: 'Must start with "Wikipedia:"',
size: 60
}
},
{
label: 'G5: Banned or blocked user',
value: 'banned',
tooltip: 'Pages created by banned or blocked users in violation of their ban or block, and which have no substantial edits by others',
subgroup: {
name: 'banned_1',
type: 'input',
label: 'Username of banned user (if available): ',
tooltip: 'Should not start with "User:"'
},
hideSubgroupWhenMultiple: true
},
{
label: 'G6: History merge',
value: 'histmerge',
tooltip: 'Temporarily deleting a page in order to merge page histories',
subgroup: {
name: 'histmerge_1',
type: 'input',
label: 'Page to be merged into this one: '
},
hideWhenMultiple: true
},
{
label: 'G6: Move',
value: 'move',
tooltip: 'Making way for an uncontroversial move like reversing a redirect',
subgroup: [
{
name: 'move_1',
type: 'input',
label: 'Page to be moved here: '
},
{
name: 'move_2',
type: 'input',
label: 'Reason: ',
size: 60
}
],
hideWhenMultiple: true
},
{
label: 'G6: XfD',
value: 'xfd',
tooltip: 'An admin has closed a deletion discussion (at AfD, FfD, RfD, TfD, CfD, or MfD) as "delete", but they didn\'t actually delete the page.',
subgroup: {
name: 'xfd_fullvotepage',
type: 'input',
label: 'Page where the deletion discussion was held: ',
size: 40
},
hideWhenMultiple: true
},
{
label: 'G6: Unnecessary disambiguation page',
value: 'disambig',
tooltip: 'This only applies for orphaned disambiguation pages which either: (1) disambiguate two or fewer existing Wikipedia pages and whose title ends in "(disambiguation)" (i.e., there is a primary topic); or (2) disambiguates no (zero) existing Wikipedia pages, regardless of its title.',
hideWhenMultiple: true
},
{
label: 'G6: Redirect to malplaced disambiguation page',
value: 'movedab',
tooltip: 'This only applies for redirects to disambiguation pages ending in (disambiguation) where a primary topic does not exist.',
hideWhenMultiple: true
},
{
label: 'G6: Copy-and-paste page move',
value: 'copypaste',
tooltip: 'This only applies for a copy-and-paste page move of another page that needs to be temporarily deleted to make room for a clean page move.',
subgroup: {
name: 'copypaste_1',
type: 'input',
label: 'Original page that was copy-pasted here: '
},
hideWhenMultiple: true
},
{
label: 'G6: Housekeeping',
value: 'g6',
tooltip: 'Other non-controversial "housekeeping" tasks',
subgroup: {
name: 'g6_rationale',
type: 'input',
label: 'Rationale: ',
size: 60
}
},
{
label: 'G7: Author requests deletion, or author blanked',
value: 'author',
tooltip: 'Any page for which deletion is requested by the original author in good faith, provided the page\'s only substantial content was added by its author. If the author blanks the page, this can also be taken as a deletion request.',
subgroup: {
name: 'author_rationale',
type: 'input',
label: 'Optional explanation: ',
tooltip: 'Perhaps linking to where the author requested this deletion.',
size: 60
}
},
{
label: 'G8: Pages dependent on a non-existent or deleted page',
value: 'g8',
tooltip: 'such as talk pages with no corresponding subject page; subpages with no parent page; file pages without a corresponding file; redirects to invalid targets, such as nonexistent targets, redirect loops, and bad titles; or categories populated by deleted or retargeted templates. This excludes any page that is useful to the project, and in particular: deletion discussions that are not logged elsewhere, user and user talk pages, talk page archives, plausible redirects that can be changed to valid targets, and file pages or talk pages for files that exist on Wikimedia Commons.',
subgroup: {
name: 'g8_rationale',
type: 'input',
label: 'Optional explanation: ',
size: 60
}
},
{
label: 'G8: Subpages with no parent page',
value: 'subpage',
tooltip: 'This excludes any page that is useful to the project, and in particular: deletion discussions that are not logged elsewhere, user and user talk pages, talk page archives, plausible redirects that can be changed to valid targets, and file pages or talk pages for files that exist on Wikimedia Commons.',
hideWhenMultiple: true
},
{
label: 'G10: Attack page',
value: 'attack',
tooltip: 'Pages that serve no purpose but to disparage their subject or some other entity (e.g., "John Q. Doe is an imbecile"). This includes a biography of a living person that is negative in tone and unsourced, where there is no NPOV version in the history to revert to. Administrators deleting such pages should not quote the content of the page in the deletion summary!'
},
{
label: 'G10: Wholly negative, unsourced BLP',
value: 'negublp',
tooltip: 'A biography of a living person that is entirely negative in tone and unsourced, where there is no neutral version in the history to revert to.',
hideWhenMultiple: true
},
{
label: 'G11: Unambiguous advertising',
value: 'spam',
tooltip: 'Pages which exclusively promote a company, product, group, service, or person and which would need to be fundamentally rewritten in order to become encyclopedic. Note that an article about a company or a product which describes its subject from a neutral point of view does not qualify for this criterion; an article that is blatant advertising should have inappropriate content as well'
},
{
label: 'G12: Unambiguous copyright infringement',
value: 'copyvio',
tooltip: 'Either: (1) Material was copied from another website that does not have a license compatible with Wikipedia, or is photography from a stock photo seller (such as Getty Images or Corbis) or other commercial content provider; (2) There is no non-infringing content in the page history worth saving; or (3) The infringement was introduced at once by a single person rather than created organically on wiki and then copied by another website such as one of the many Wikipedia mirrors',
subgroup: [
{
name: 'copyvio_url',
type: 'input',
label: 'URL (if available): ',
tooltip: 'If the material was copied from an online source, put the URL here, including the "http://" or "https://" protocol. If the URL is on the spam blacklist, you can leave off the protocol.',
size: 60
},
{
name: 'copyvio_url2',
type: 'input',
label: 'Additional URL: ',
tooltip: 'Optional.',
size: 60
},
{
name: 'copyvio_url3',
type: 'input',
label: 'Additional URL: ',
tooltip: 'Optional.',
size: 60
}
]
},
{
label: 'G13: Old, abandoned Articles for Creation submissions',
value: 'afc',
tooltip: 'Any rejected or unsubmitted AfC submission that has not been edited for more than 6 months.'
}
];
Twinkle.speedy.redirectList = [
{
label: 'R2: Redirects from mainspace to any other namespace except the Category:, Template:, Wikipedia:, Help: and Portal: namespaces',
value: 'rediruser',
tooltip: '(this does not include the Wikipedia shortcut pseudo-namespaces). If this was the result of a page move, consider waiting a day or two before deleting the redirect'
},
{
label: 'R3: Redirects as a result of an implausible typo that were recently created',
value: 'redirtypo',
tooltip: 'However, redirects from common misspellings or misnomers are generally useful, as are redirects in other languages'
},
{
label: 'G8: Redirects to invalid targets, such as nonexistent targets, redirect loops, and bad titles',
value: 'redirnone',
tooltip: 'This excludes any page that is useful to the project, and in particular: deletion discussions that are not logged elsewhere, user and user talk pages, talk page archives, plausible redirects that can be changed to valid targets, and file pages or talk pages for files that exist on Wikimedia Commons.'
}
];
Twinkle.speedy.normalizeHash = {
'reason': 'db',
'nonsense': 'g1',
'test': 'g2',
'vandalism': 'g3',
'hoax': 'g3',
'repost': 'g4',
'banned': 'g5',
'histmerge': 'g6',
'move': 'g6',
'xfd': 'g6',
'disambig': 'g6',
'movedab': 'g6',
'copypaste': 'g6',
'g6': 'g6',
'author': 'g7',
'g8': 'g8',
'talk': 'g8',
'subpage': 'g8',
'redirnone': 'g8',
'templatecat': 'g8',
'imagepage': 'g8',
'attack': 'g10',
'negublp': 'g10',
'spam': 'g11',
'spamuser': 'g11',
'copyvio': 'g12',
'afc': 'g13',
'nocontext': 'a1',
'foreign': 'a2',
'nocontent': 'a3',
'transwiki': 'a5',
'a7': 'a7',
'person': 'a7',
'corp': 'a7',
'web': 'a7',
'band': 'a7',
'club': 'a7',
'animal': 'a7',
'event': 'a7',
'a9': 'a9',
'a10': 'a10',
'madeup': 'a11',
'rediruser': 'r2',
'redirtypo': 'r3',
'redundantimage': 'f1',
'noimage': 'f2',
'fpcfail': 'f2',
'noncom': 'f3',
'unksource': 'f4',
'unfree': 'f5',
'norat': 'f6',
'badfairuse': 'f7',
'nowcommons': 'f8',
'imgcopyvio': 'f9',
'badfiletype': 'f10',
'nopermission': 'f11',
'catempty': 'c1',
'userreq': 'u1',
'nouser': 'u2',
'gallery': 'u3',
'policy': 't2',
'duplicatetemplate': 't3',
't3': 't3',
'p1': 'p1',
'emptyportal': 'p2'
};
// keep this synched with [[MediaWiki:Deletereason-dropdown]]
Twinkle.speedy.reasonHash = {
'reason': '',
// General
'nonsense': '[[WP:PN|Patent nonsense]], meaningless, or incomprehensible',
'test': 'Test page',
'vandalism': '[[WP:Vandalism|Vandalism]]',
'hoax': 'Blatant [[WP:Do not create hoaxes|hoax]]',
'repost': 'Recreation of a page that was [[WP:DEL|deleted]] per a [[WP:XFD|deletion discussion]]',
'banned': 'Creation by a [[WP:BLOCK|blocked]] or [[WP:BAN|banned]] user in violation of block or ban',
'histmerge': 'Temporary deletion in order to merge page histories',
'move': 'Making way for a non-controversial move',
'xfd': 'Deleting page per result of [[WP:XfD|deletion discussion]]',
'disambig': 'Unnecessary disambiguation page',
'movedab': 'Redirect to [[WP:MALPLACED|malplaced disambiguation page]]',
'copypaste': '[[WP:CPMV|Copy-and-paste]] page move',
'g6': 'Housekeeping and routine (non-controversial) cleanup',
'author': 'One author who has requested deletion or blanked the page',
'g8': 'Page dependent on a deleted or nonexistent page',
'talk': '[[Help:Talk page|Talk page]] of a deleted or nonexistent page',
'subpage': '[[WP:Subpages|Subpage]] of a deleted or nonexistent page',
'redirnone': '[[Wikipedia:Redirect|redirect]] to a deleted or nonexistent page',
'templatecat': 'Populated by deleted or retargeted templates',
'imagepage': 'File description page for a file that does not exist',
'attack': '[[WP:ATP|Attack page]] or negative unsourced [[WP:BLP|BLP]]',
'negublp': 'Negative unsourced [[WP:BLP|BLP]]',
'spam': 'Unambiguous [[WP:NOTADVERTISING|advertising]] or promotion',
'copyvio': 'Unambiguous [[WP:C|copyright infringement]]',
'afc': 'Abandoned [[WP:AFC|Article for creation]] – to retrieve it, see [[WP:REFUND/G13]]',
// Articles
'nocontext': 'Short article without enough context to identify the subject',
'foreign': 'Article in a foreign language that exists on another project',
'nocontent': 'Article that has no meaningful, substantive content',
'transwiki': 'Article that has been transwikied to another project',
'a7': 'No explanation of the subject\'s significance (real person, animal, organization, or web content)',
'person' : 'No explanation of the subject\'s significance (real person)',
'web': 'No explanation of the subject\'s significance (web content)',
'corp': 'No explanation of the subject\'s significance (organization)',
'club': 'No explanation of the subject\'s significance (organization)',
'band': 'No explanation of the subject\'s significance (band/musician)',
'animal': 'No explanation of the subject\'s significance (individual animal)',
'event': 'No explanation of the subject\'s significance (event)',
'a9': 'Music recording by redlinked artist and no indication of importance or significance',
'a10': 'Recently created article that duplicates an existing topic',
'madeup': 'Obviously made up',
// Images and media
'redundantimage': 'File redundant to another on Wikipedia',
'noimage': 'Corrupt or empty file',
'fpcfail': 'Unneeded file description page for a file on Commons',
'noncom': 'File with improper license',
'unksource': 'Lack of licensing information',
'unfree': 'Unused non-free media',
'norat': 'Non-free file without [[WP:RAT|fair-use rationale]]',
'badfairuse': 'Violates [[WP:F|non-free use policy]]',
'nowcommons': 'Media file available on Commons',
'imgcopyvio': 'Unambiguous [[WP:COPYVIO|copyright violation]]',
'badfiletype': 'Useless media file (not an image, audio or video)',
'nopermission': 'No evidence of permission',
// Categories
'catempty': 'Empty category',
// User pages
'userreq': 'User request to delete page in own userspace',
'nouser': 'Userpage or subpage of a nonexistent user',
'gallery': '[[WP:NFC|Non-free]] [[Help:Gallery|gallery]]',
// Templates
'policy': 'Template that unambiguously misrepresents established policy',
'duplicatetemplate': 'Unused, redundant template',
't3': 'Unused, redundant template',
// Portals
'p1': '[[WP:P|Portal]] page that would be subject to speedy deletion as an article',
'emptyportal': '[[WP:P|Portal]] without a substantial topic base',
// Redirects
'rediruser': 'Cross-[[WP:NS|namespace]] [[WP:R|redirect]] from mainspace',
'redirtypo': 'Recently created, implausible [[WP:R|redirect]]'
};
Twinkle.speedy.callbacks = {
sysop: {
main: function( params ) {
var thispage;
Morebits.wiki.addCheckpoint(); // prevent actionCompleted from kicking in until user interaction is done
// look up initial contributor. If prompting user for deletion reason, just display a link.
// Otherwise open the talk page directly
if( params.openusertalk ) {
thispage = new Morebits.wiki.page( mw.config.get('wgPageName') ); // a necessary evil, in order to clear incorrect status text
thispage.setCallbackParameters( params );
thispage.lookupCreator( Twinkle.speedy.callbacks.sysop.openUserTalkPage );
}
// delete page
var reason;
thispage = new Morebits.wiki.page( mw.config.get('wgPageName'), "Deleting page" );
if (params.normalized === 'db') {
reason = prompt("Enter the deletion summary to use, which will be entered into the deletion log:", "");
} else {
var presetReason = "[[WP:CSD#" + params.normalized.toUpperCase() + "|" + params.normalized.toUpperCase() + "]]: " + params.reason;
if (Twinkle.getPref("promptForSpeedyDeletionSummary").indexOf(params.normalized) !== -1) {
reason = prompt("Enter the deletion summary to use, or press OK to accept the automatically generated one.", presetReason);
} else {
reason = presetReason;
}
}
if (reason === null) {
Morebits.status.error("Asking for reason", "User cancelled");
Morebits.wiki.removeCheckpoint();
return;
} else if (!reason || !reason.replace(/^\s*/, "").replace(/\s*$/, "")) {
Morebits.status.error("Asking for reason", "you didn't give one. I don't know... what with admins and their apathetic antics... I give up...");
Morebits.wiki.removeCheckpoint();
return;
}
thispage.setEditSummary( reason + Twinkle.getPref('deletionSummaryAd') );
thispage.deletePage(function() {
thispage.getStatusElement().info("done");
Twinkle.speedy.callbacks.sysop.deleteTalk( params );
});
Morebits.wiki.removeCheckpoint();
},
deleteTalk: function( params ) {
// delete talk page
if (params.deleteTalkPage &&
params.normalized !== 'f8' &&
document.getElementById( 'ca-talk' ).className !== 'new') {
var talkpage = new Morebits.wiki.page( Morebits.wikipedia.namespaces[ mw.config.get('wgNamespaceNumber') + 1 ] + ':' + mw.config.get('wgTitle'), "Deleting talk page" );
talkpage.setEditSummary('[[WP:CSD#G8|G8]]: Talk page of deleted page "' + Morebits.pageNameNorm + '"' + Twinkle.getPref('deletionSummaryAd'));
talkpage.deletePage();
// this is ugly, but because of the architecture of wiki.api, it is needed
// (otherwise success/failure messages for the previous action would be suppressed)
window.setTimeout(function() { Twinkle.speedy.callbacks.sysop.deleteRedirects( params ); }, 1800);
} else {
Twinkle.speedy.callbacks.sysop.deleteRedirects( params );
}
},
deleteRedirects: function( params ) {
// delete redirects
if (params.deleteRedirects) {
var query = {
'action': 'query',
'list': 'backlinks',
'blfilterredir': 'redirects',
'bltitle': mw.config.get('wgPageName'),
'bllimit': 5000 // 500 is max for normal users, 5000 for bots and sysops
};
var wikipedia_api = new Morebits.wiki.api( 'getting list of redirects...', query, Twinkle.speedy.callbacks.sysop.deleteRedirectsMain,
new Morebits.status( 'Deleting redirects' ) );
wikipedia_api.params = params;
wikipedia_api.post();
}
// promote Unlink tool
var $link, $bigtext;
if( mw.config.get('wgNamespaceNumber') === 6 && params.normalized !== 'f8' ) {
$link = $('<a/>', {
'href': '#',
'text': 'click here to go to the Unlink tool',
'css': { 'fontSize': '130%', 'fontWeight': 'bold' },
'click': function(){
Morebits.wiki.actionCompleted.redirect = null;
Twinkle.speedy.dialog.close();
Twinkle.unlink.callback("Removing usages of and/or links to deleted file " + Morebits.pageNameNorm);
}
});
$bigtext = $('<span/>', {
'text': 'To orphan backlinks and remove instances of file usage',
'css': { 'fontSize': '130%', 'fontWeight': 'bold' }
});
Morebits.status.info($bigtext[0], $link[0]);
} else if (params.normalized !== 'f8') {
$link = $('<a/>', {
'href': '#',
'text': 'click here to go to the Unlink tool',
'css': { 'fontSize': '130%', 'fontWeight': 'bold' },
'click': function(){
Morebits.wiki.actionCompleted.redirect = null;
Twinkle.speedy.dialog.close();
Twinkle.unlink.callback("Removing links to deleted page " + Morebits.pageNameNorm);
}
});
$bigtext = $('<span/>', {
'text': 'To orphan backlinks',
'css': { 'fontSize': '130%', 'fontWeight': 'bold' }
});
Morebits.status.info($bigtext[0], $link[0]);
}
},
openUserTalkPage: function( pageobj ) {
pageobj.getStatusElement().unlink(); // don't need it anymore
var user = pageobj.getCreator();
var params = pageobj.getCallbackParameters();
var query = {
'title': 'User talk:' + user,
'action': 'edit',
'preview': 'yes',
'vanarticle': Morebits.pageNameNorm
};
if (params.normalized === 'db' || Twinkle.getPref("promptForSpeedyDeletionSummary").indexOf(params.normalized) !== -1) {
// provide a link to the user talk page
var $link, $bigtext;
$link = $('<a/>', {
'href': mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ),
'text': 'click here to open User talk:' + user,
'target': '_blank',
'css': { 'fontSize': '130%', 'fontWeight': 'bold' }
});
$bigtext = $('<span/>', {
'text': 'To notify the page creator',
'css': { 'fontSize': '130%', 'fontWeight': 'bold' }
});
Morebits.status.info($bigtext[0], $link[0]);
} else {
// open the initial contributor's talk page
var statusIndicator = new Morebits.status('Opening user talk page edit form for ' + user, 'opening...');
switch( Twinkle.getPref('userTalkPageMode') ) {
case 'tab':
window.open( mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ), '_blank' );
break;
case 'blank':
window.open( mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ), '_blank', 'location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800' );
break;
case 'window':
/* falls through */
default:
window.open( mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ),
( window.name === 'twinklewarnwindow' ? '_blank' : 'twinklewarnwindow' ),
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800' );
break;
}
statusIndicator.info( 'complete' );
}
},
deleteRedirectsMain: function( apiobj ) {
var xmlDoc = apiobj.getXML();
var $snapshot = $(xmlDoc).find('backlinks bl');
var total = $snapshot.length;
var statusIndicator = apiobj.statelem;
if( !total ) {
statusIndicator.status("no redirects found");
return;
}
statusIndicator.status("0%");
var current = 0;
var onsuccess = function( apiobjInner ) {
var now = parseInt( 100 * (++current)/total, 10 ) + '%';
statusIndicator.update( now );
apiobjInner.statelem.unlink();
if( current >= total ) {
statusIndicator.info( now + ' (completed)' );
Morebits.wiki.removeCheckpoint();
}
};
Morebits.wiki.addCheckpoint();
$snapshot.each(function(key, value) {
var title = $(value).attr('title');
var page = new Morebits.wiki.page(title, 'Deleting redirect "' + title + '"');
page.setEditSummary('[[WP:CSD#G8|G8]]: Redirect to deleted page "' + Morebits.pageNameNorm + '"' + Twinkle.getPref('deletionSummaryAd'));
page.deletePage(onsuccess);
});
}
},
user: {
main: function(pageobj) {
var statelem = pageobj.getStatusElement();
if (!pageobj.exists()) {
statelem.error( "It seems that the page doesn't exist; perhaps it has already been deleted" );
return;
}
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
statelem.status( 'Checking for tags on the page...' );
// check for existing deletion tags
var tag = /(?:\{\{\s*(db|delete|db-.*?|speedy deletion-.*?)(?:\s*\||\s*\}\}))/.exec( text );
if( tag ) {
statelem.error( [ Morebits.htmlNode( 'strong', tag[1] ) , " is already placed on the page." ] );
return;
}
var xfd = /(?:\{\{([rsaiftcm]fd|md1|proposed deletion)[^{}]*?\}\})/i.exec( text );
if( xfd && !confirm( "The deletion-related template {{" + xfd[1] + "}} was found on the page. Do you still want to add a CSD template?" ) ) {
return;
}
var code, parameters, i;
if (params.normalizeds.length > 1) {
code = "{{db-multiple";
$.each(params.normalizeds, function(index, norm) {
code += "|" + norm.toUpperCase();
parameters = params.templateParams[index] || [];
for (var i in parameters) {
if (typeof parameters[i] === 'string' && !parseInt(i, 10)) { // skip numeric parameters - {{db-multiple}} doesn't understand them
code += "|" + i + "=" + parameters[i];
}
}
});
code += "}}";
params.utparams = [];
} else {
parameters = params.templateParams[0] || [];
code = "{{db-" + params.values[0];
for (i in parameters) {
if (typeof parameters[i] === 'string') {
code += "|" + i + "=" + parameters[i];
}
}
code += "}}";
params.utparams = Twinkle.speedy.getUserTalkParameters(params.normalizeds[0], parameters);
}
var thispage = new Morebits.wiki.page(mw.config.get('wgPageName'));
// patrol the page, if reached from Special:NewPages
if( Twinkle.getPref('markSpeedyPagesAsPatrolled') ) {
thispage.patrol();
}
// Wrap SD template in noinclude tags if we are in template space.
// Won't work with userboxes in userspace, or any other transcluded page outside template space
if (mw.config.get('wgNamespaceNumber') === 10) { // Template:
code = "<noinclude>" + code + "</noinclude>";
}
// Remove tags that become superfluous with this action
text = text.replace(/\{\{\s*([Nn]ew unreviewed article|[Uu]nreviewed|[Uu]serspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/g, "");
if (mw.config.get('wgNamespaceNumber') === 6) {
// remove "move to Commons" tag - deletion-tagged files cannot be moved to Commons
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, "");
}
// Generate edit summary for edit
var editsummary;
if (params.normalizeds.length > 1) {
editsummary = 'Requesting speedy deletion (';
$.each(params.normalizeds, function(index, norm) {
editsummary += '[[WP:CSD#' + norm.toUpperCase() + '|CSD ' + norm.toUpperCase() + ']], ';
});
editsummary = editsummary.substr(0, editsummary.length - 2); // remove trailing comma
editsummary += ').';
} else if (params.normalizeds[0] === "db") {
editsummary = 'Requesting [[WP:CSD|speedy deletion]] with rationale \"' + parameters["1"] + '\".';
} else if (params.values[0] === "histmerge") {
editsummary = "Requesting history merge with [[" + parameters["1"] + "]] ([[WP:CSD#G6|CSD G6]]).";
} else {
editsummary = "Requesting speedy deletion ([[WP:CSD#" + params.normalizeds[0].toUpperCase() + "|CSD " + params.normalizeds[0].toUpperCase() + "]]).";
}
pageobj.setPageText(code + ((params.normalizeds.indexOf('g10') !== -1) ? '' : ("\n" + text) )); // cause attack pages to be blanked
pageobj.setEditSummary(editsummary + Twinkle.getPref('summaryAd'));
pageobj.setWatchlist(params.watch);
pageobj.setCreateOption('nocreate');
pageobj.save(Twinkle.speedy.callbacks.user.tagComplete);
},
tagComplete: function(pageobj) {
var params = pageobj.getCallbackParameters();
// Notification to first contributor
if (params.usertalk) {
var callback = function(pageobj) {
var initialContrib = pageobj.getCreator();
// don't notify users when their user talk page is nominated
if (initialContrib === mw.config.get('wgTitle') && mw.config.get('wgNamespaceNumber') === 3) {
Morebits.status.warn("Notifying initial contributor: this user created their own user talk page; skipping notification");
return;
}
// quick hack to prevent excessive unwanted notifications, per request. Should actually be configurable on recipient page ...
if ((initialContrib === "Cyberbot I" || initialContrib === "SoxBot") && params.normalizeds[0]==="f2") {
Morebits.status.warn("Notifying initial contributor: page created procedurally by bot; skipping notification");
return;
}
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")"),
notifytext, i;
// specialcase "db" and "db-multiple"
if (params.normalizeds.length > 1) {
notifytext = "\n{{subst:db-notice-multiple|1=" + Morebits.pageNameNorm;
var count = 2;
$.each(params.normalizeds, function(index, norm) {
notifytext += "|" + (count++) + "=" + norm.toUpperCase();
});
} else if (params.normalizeds[0] === "db") {
notifytext = "\n{{subst:db-reason-notice|1=" + Morebits.pageNameNorm;
} else {
notifytext = "\n{{subst:db-csd-notice-custom|1=" + Morebits.pageNameNorm + "|2=" + params.values[0];
}
for (i in params.utparams) {
if (typeof params.utparams[i] === 'string') {
notifytext += "|" + i + "=" + params.utparams[i];
}
}
notifytext += (params.welcomeuser ? "" : "|nowelcome=yes") + "}} ~~~~";
var editsummary = "Notification: speedy deletion nomination";
if (params.normalizeds.indexOf("g10") === -1) { // no article name in summary for G10 deletions
editsummary += " of [[" + Morebits.pageNameNorm + "]].";
} else {
editsummary += " of an attack page.";
}
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary(editsummary + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
// add this nomination to the user's userspace log, if the user has enabled it
if (params.lognomination) {
Twinkle.speedy.callbacks.user.addToLog(params, initialContrib);
}
};
var thispage = new Morebits.wiki.page(Morebits.pageNameNorm);
thispage.lookupCreator(callback);
}
// or, if not notifying, add this nomination to the user's userspace log without the initial contributor's name
else if (params.lognomination) {
Twinkle.speedy.callbacks.user.addToLog(params, null);
}
},
// note: this code is also invoked from twinkleimage
// the params used are:
// for CSD: params.values, params.normalizeds (note: normalizeds is an array)
// for DI: params.fromDI = true, params.type, params.normalized (note: normalized is a string)
addToLog: function(params, initialContrib) {
var wikipedia_page = new Morebits.wiki.page("User:" + mw.config.get('wgUserName') + "/" + Twinkle.getPref('speedyLogPageName'), "Adding entry to userspace log");
params.logInitialContrib = initialContrib;
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.speedy.callbacks.user.saveLog);
},
saveLog: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var appendText = "";
// add blurb if log page doesn't exist
if (!pageobj.exists()) {
appendText +=
"This is a log of all [[WP:CSD|speedy deletion]] nominations made by this user using [[WP:TW|Twinkle]]'s CSD module.\n\n" +
"If you no longer wish to keep this log, you can turn it off using the [[Wikipedia:Twinkle/Preferences|preferences panel]], and " +
"nominate this page for speedy deletion under [[WP:CSD#U1|CSD U1]].";
if (Morebits.userIsInGroup("sysop")) {
appendText += "\n\nThis log does not track outright speedy deletions made using Twinkle.";
}
}
// create monthly header
var date = new Date();
var headerRe = new RegExp("^==+\\s*" + date.getUTCMonthName() + "\\s+" + date.getUTCFullYear() + "\\s*==+", "m");
if (!headerRe.exec(text)) {
appendText += "\n\n=== " + date.getUTCMonthName() + " " + date.getUTCFullYear() + " ===";
}
appendText += "\n# [[:" + Morebits.pageNameNorm + "]]: ";
if (params.fromDI) {
appendText += "DI [[WP:CSD#" + params.normalized.toUpperCase() + "|CSD " + params.normalized.toUpperCase() + "]] (" + params.type + ")";
} else {
if (params.normalizeds.length > 1) {
appendText += "multiple criteria (";
$.each(params.normalizeds, function(index, norm) {
appendText += "[[WP:CSD#" + norm.toUpperCase() + "|" + norm.toUpperCase() + ']], ';
});
appendText = appendText.substr(0, appendText.length - 2); // remove trailing comma
appendText += ')';
} else if (params.normalizeds[0] === "db") {
appendText += "{{tl|db-reason}}";
} else {
appendText += "[[WP:CSD#" + params.normalizeds[0].toUpperCase() + "|CSD " + params.normalizeds[0].toUpperCase() + "]] ({{tl|db-" + params.values[0] + "}})";
}
}
if (params.logInitialContrib) {
appendText += "; notified {{user|1=" + params.logInitialContrib + "}}";
}
appendText += " ~~~~~\n";
pageobj.setAppendText(appendText);
pageobj.setEditSummary("Logging speedy deletion nomination of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
pageobj.setCreateOption("recreate");
pageobj.append();
}
}
};
// validate subgroups in the form passed into the speedy deletion tag
Twinkle.speedy.getParameters = function twinklespeedyGetParameters(form, values) {
var parameters = [];
$.each(values, function(index, value) {
var currentParams = [];
switch (value) {
case 'reason':
if (form["csd.reason_1"]) {
var dbrationale = form["csd.reason_1"].value;
if (!dbrationale || !dbrationale.trim()) {
alert( 'Custom rationale: Please specify a rationale.' );
parameters = null;
return false;
}
currentParams["1"] = dbrationale;
}
break;
case 'userreq': // U1
if (form["csd.userreq_rationale"]) {
var u1rationale = form["csd.userreq_rationale"].value;
if (mw.config.get('wgNamespaceNumber') === 3 && !((/\//).test(mw.config.get('wgTitle'))) &&
(!u1rationale || !u1rationale.trim())) {
statelem.error( 'CSD U1: Please specify a rationale when nominating user talk pages.' );
parameters = null;
return false;
}
currentParams.rationale = u1rationale;
}
break;
case 'repost': // G4
if (form["csd.repost_1"]) {
var deldisc = form["csd.repost_1"].value;
if (deldisc) {
if (deldisc.substring(0, 9) !== "Wikipedia" && deldisc.substring(0, 3) !== "WP:") {
alert( 'CSD G4: The deletion discussion page name, if provided, must start with "Wikipedia:".' );
parameters = null;
return false;
}
currentParams["1"] = deldisc;
}
}
break;
case 'banned': // G5
if (form["csd.banned_1"] && form["csd.banned_1"].value) {
currentParams["1"] = form["csd.banned_1"].value.replace(/^\s*User:/i, "");
}
break;
case 'histmerge': // G6
if (form["csd.histmerge_1"]) {
var merger = form["csd.histmerge_1"].value;
if (!merger || !merger.trim()) {
alert( 'CSD G6 (histmerge): Please specify the page to be merged.' );
parameters = null;
return false;
}
currentParams["1"] = merger;
}
break;
case 'move': // G6
if (form["csd.move_1"] && form["csd.move_2"]) {
var movepage = form["csd.move_1"].value,
movereason = form["csd.move_2"].value;
if (!movepage || !movepage.trim()) {
alert( 'CSD G6 (move): Please specify the page to be moved here.' );
parameters = null;
return false;
}
if (!movereason || !movereason.trim()) {
alert( 'CSD G6 (move): Please specify the reason for the move.' );
parameters = null;
return false;
}
currentParams["1"] = movepage;
currentParams["2"] = movereason;
}
break;
case 'xfd': // G6
if (form["csd.xfd_fullvotepage"]) {
var xfd = form["csd.xfd_fullvotepage"].value;
if (xfd) {
if (xfd.substring(0, 9) !== "Wikipedia" && xfd.substring(0, 3) !== "WP:") {
alert( 'CSD G6 (XFD): The deletion discussion page name, if provided, must start with "Wikipedia:".' );
parameters = null;
return false;
}
currentParams.fullvotepage = xfd;
}
}
break;
case 'copypaste': // G6
if (form["csd.copypaste_1"]) {
var copypaste = form["csd.copypaste_1"].value;
if (!copypaste || !copypaste.trim()) {
alert( 'CSD G6 (copypaste): Please specify the source page name.' );
parameters = null;
return false;
}
currentParams["1"] = copypaste;
}
break;
case 'g6': // G6
if (form["csd.g6_rationale"] && form["csd.g6_rationale"].value) {
currentParams.rationale = form["csd.g6_rationale"].value;
}
break;
case 'author': // G7
if (form["csd.author_rationale"] && form["csd.author_rationale"].value) {
currentParams.rationale = form["csd.author_rationale"].value;
}
break;
case 'g8': // G8
if (form["csd.g8_rationale"] && form["csd.g8_rationale"].value) {
currentParams.rationale = form["csd.g8_rationale"].value;
}
break;
case 'attack': // G10
currentParams.blanked = 'yes';
// it is actually blanked elsewhere in code, but setting the flag here
break;
case 'copyvio': // G12
if (form["csd.copyvio_url"] && form["csd.copyvio_url"].value) {
currentParams.url = form["csd.copyvio_url"].value;
}
if (form["csd.copyvio_url2"] && form["csd.copyvio_url2"].value) {
currentParams.url2 = form["csd.copyvio_url2"].value;
}
if (form["csd.copyvio_url3"] && form["csd.copyvio_url3"].value) {
currentParams.url3 = form["csd.copyvio_url3"].value;
}
break;
case 'afc': // G13
var query = {
action: "query",
titles: mw.config.get("wgPageName"),
prop: "revisions",
rvprop: "timestamp"
},
api = new Morebits.wiki.api( 'Grabbing the last revision timestamp', query, function( apiobj ) {
var xmlDoc = apiobj.getXML(),
isoDateString = $(xmlDoc).find("rev").attr("timestamp");
currentParams.ts = isoDateString;
});
// Wait for API call to finish
api.post({
async: false
});
break;
case 'redundantimage': // F1
if (form["csd.redundantimage_filename"]) {
var redimage = form["csd.redundantimage_filename"].value;
if (!redimage || !redimage.trim()) {
alert( 'CSD F1: Please specify the filename of the other file.' );
parameters = null;
return false;
}
currentParams.filename = redimage.replace(/^\s*(Image|File):/i, "");
}
break;
case 'badfairuse': // F7
if (form["csd.badfairuse_reason"] && form["csd.badfairuse_reason"].value) {
currentParams.reason = form["csd.badfairuse_reason"].value;
}
break;
case 'nowcommons': // F8
if (form["csd.nowcommons_filename"]) {
var filename = form["csd.nowcommons_filename"].value;
if (filename && filename !== Morebits.pageNameNorm) {
if (filename.indexOf("Image:") === 0 || filename.indexOf("File:") === 0) {
currentParams["1"] = filename;
} else {
currentParams["1"] = "File:" + filename;
}
}
}
currentParams.date = "~~~~~";
break;
case 'imgcopyvio': // F9
if (form["csd.imgcopyvio_url"] && form["csd.imgcopyvio_url"].value) {
currentParams.url = form["csd.imgcopyvio_url"].value;
}
break;
case 'foreign': // A2
if (form["csd.foreign_source"]) {
var foreignlink = form["csd.foreign_source"].value;
if (!foreignlink || !foreignlink.trim()) {
alert( 'CSD A2: Please specify an interwiki link to the article of which this is a copy.' );
parameters = null;
return false;
}
currentParams.source = foreignlink;
}
break;
case 'a10': // A10
if (form["csd.a10_article"]) {
var duptitle = form["csd.a10_article"].value;
if (!duptitle || !duptitle.trim()) {
alert( 'CSD A10: Please specify the name of the article which is duplicated.' );
parameters = null;
return false;
}
currentParams.article = duptitle;
}
break;
case 'duplicatetemplate': // T3
if (form["csd.duplicatetemplate_2"]) {
var t3template = form["csd.duplicatetemplate_2"].value;
if (!t3template || !t3template.trim()) {
alert( 'CSD T3: Please specify the name of a template duplicated by this one.' );
parameters = null;
return false;
}
currentParams["1"] = "~~~~~";
currentParams["2"] = t3template.replace(/^\s*Template:/i, "");
}
break;
case 't3': // T3
if (form["csd.t3_rationale"]) {
var t3rationale = form["csd.t3_rationale"].value;
if (!t3rationale || !t3rationale.trim()) {
alert( 'CSD T3: Please specify a rationale.' );
parameters = null;
return false;
}
currentParams["1"] = "~~~~~";
currentParams.rationale = t3rationale;
}
break;
case 'p1': // P1
if (form["csd.p1_criterion"]) {
var criterion = form["csd.p1_criterion"].value;
if (!criterion || !criterion.trim()) {
alert( 'CSD P1: Please specify a criterion and/or associated rationale.' );
parameters = null;
return false;
}
currentParams["1"] = criterion;
}
break;
default:
break;
}
parameters.push(currentParams);
});
return parameters;
};
// function for processing talk page notification template parameters
Twinkle.speedy.getUserTalkParameters = function twinklespeedyGetUserTalkParameters(normalized, parameters) {
var utparams = [];
switch (normalized) {
case 'db':
utparams["2"] = parameters["1"];
break;
case 'g12':
utparams.key1 = "url";
utparams.value1 = utparams.url = parameters.url;
break;
case 'a10':
utparams.key1 = "article";
utparams.value1 = utparams.article = parameters.article;
break;
default:
break;
}
return utparams;
};
Twinkle.speedy.resolveCsdValues = function twinklespeedyResolveCsdValues(e) {
var values = (e.target.form ? e.target.form : e.target).getChecked('csd');
if (values.length === 0) {
alert( "Please select a criterion!" );
return null;
}
return values;
};
Twinkle.speedy.callback.evaluateSysop = function twinklespeedyCallbackEvaluateSysop(e) {
var form = (e.target.form ? e.target.form : e.target);
var tag_only = form.tag_only;
if( tag_only && tag_only.checked ) {
Twinkle.speedy.callback.evaluateUser(e);
return;
}
var value = Twinkle.speedy.resolveCsdValues(e)[0];
if (!value) {
return;
}
var normalized = Twinkle.speedy.normalizeHash[ value ];
var params = {
value: value,
normalized: normalized,
watch: Twinkle.getPref('watchSpeedyPages').indexOf( normalized ) !== -1,
reason: Twinkle.speedy.reasonHash[ value ],
openusertalk: Twinkle.getPref('openUserTalkPageOnSpeedyDelete').indexOf( normalized ) !== -1,
deleteTalkPage: form.talkpage && form.talkpage.checked,
deleteRedirects: form.redirects.checked
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Twinkle.speedy.callbacks.sysop.main( params );
};
Twinkle.speedy.callback.evaluateUser = function twinklespeedyCallbackEvaluateUser(e) {
var form = (e.target.form ? e.target.form : e.target);
if (e.target.type === "checkbox" || e.target.type === "text" ||
e.target.type === "select") {
return;
}
var values = Twinkle.speedy.resolveCsdValues(e);
if (!values) {
return;
}
//var multiple = form.multiple.checked;
var normalizeds = [];
$.each(values, function(index, value) {
var norm = Twinkle.speedy.normalizeHash[ value ];
// for sysops only
if (['f4', 'f5', 'f6', 'f11'].indexOf(norm) !== -1) {
alert("Tagging with F4, F5, F6, and F11 is not possible using the CSD module. Try using DI instead, or unchecking \"Tag page only\" if you meant to delete the page.");
return;
}
normalizeds.push(norm);
});
// analyse each criterion to determine whether to watch the page/notify the creator
var watchPage = false;
$.each(normalizeds, function(index, norm) {
if (Twinkle.getPref('watchSpeedyPages').indexOf(norm) !== -1) {
watchPage = true;
return false; // break
}
});
var notifyuser = false;
if (form.notify.checked) {
$.each(normalizeds, function(index, norm) {
if (Twinkle.getPref('notifyUserOnSpeedyDeletionNomination').indexOf(norm) !== -1) {
if (norm === 'g6' && ['disambig', 'copypaste'].indexOf(values[index]) === -1) {
return true;
}
notifyuser = true;
return false; // break
}
});
}
var welcomeuser = false;
if (notifyuser) {
$.each(normalizeds, function(index, norm) {
if (Twinkle.getPref('welcomeUserOnSpeedyDeletionNotification').indexOf(norm) !== -1) {
welcomeuser = true;
return false; // break
}
});
}
var csdlog = false;
if (Twinkle.getPref('logSpeedyNominations')) {
$.each(normalizeds, function(index, norm) {
if (Twinkle.getPref('noLogOnSpeedyNomination').indexOf(norm) === -1) {
csdlog = true;
return false; // break
}
});
}
var params = {
values: values,
normalizeds: normalizeds,
watch: watchPage,
usertalk: notifyuser,
welcomeuser: welcomeuser,
lognomination: csdlog,
templateParams: Twinkle.speedy.getParameters( form, values )
};
if (!params.templateParams) {
return;
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Tagging complete";
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging page");
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.speedy.callbacks.user.main);
};
})(jQuery);
//</nowiki>
eb515d86fc1abe9e8fb0d1e6815f3c045579d729
313
2013-11-08T13:06:32Z
Amalthea
0
v2.0-635-ga6fbe12: morebits: allow page protections to set watchlist parameter; protect: fix bug when create-protecting pages; arv: Add watchlist preference for SPI reporting; speedy: add reason parameter to F7
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklespeedy.js: CSD module
****************************************
* Mode of invocation: Tab ("CSD")
* Active on: Non-special, existing pages
* Config directives in: TwinkleConfig
*
* NOTE FOR DEVELOPERS:
* If adding a new criterion, add it to the appropriate places at the top of
* twinkleconfig.js. Also check out the default values of the CSD preferences
* in twinkle.js, and add your new criterion to those if you think it would be
* good.
*/
Twinkle.speedy = function twinklespeedy() {
// Disable on:
// * special pages
// * non-existent pages
if (mw.config.get('wgNamespaceNumber') < 0 || !mw.config.get('wgArticleId')) {
return;
}
Twinkle.addPortletLink( Twinkle.speedy.callback, "CSD", "tw-csd", Morebits.userIsInGroup('sysop') ? "Delete page according to WP:CSD" : "Request speedy deletion according to WP:CSD" );
};
// This function is run when the CSD tab/header link is clicked
Twinkle.speedy.callback = function twinklespeedyCallback() {
Twinkle.speedy.initDialog(Morebits.userIsInGroup( 'sysop' ) ? Twinkle.speedy.callback.evaluateSysop : Twinkle.speedy.callback.evaluateUser, true);
};
// Used by unlink feature
Twinkle.speedy.dialog = null;
// The speedy criteria list can be in one of several modes
Twinkle.speedy.mode = {
sysopSubmit: 1, // radio buttons, no subgroups, submit when "Submit" button is clicked
sysopRadioClick: 2, // radio buttons, no subgroups, submit when a radio button is clicked
userMultipleSubmit: 3, // check boxes, subgroups, "Submit" button already pressent
userMultipleRadioClick: 4, // check boxes, subgroups, need to add a "Submit" button
userSingleSubmit: 5, // radio buttons, subgroups, submit when "Submit" button is clicked
userSingleRadioClick: 6, // radio buttons, subgroups, submit when a radio button is clicked
// are we in "delete page" mode?
// (sysops can access both "delete page" [sysop] and "tag page only" [user] modes)
isSysop: function twinklespeedyModeIsSysop(mode) {
return mode === Twinkle.speedy.mode.sysopSubmit ||
mode === Twinkle.speedy.mode.sysopRadioClick;
},
// do we have a "Submit" button once the form is created?
hasSubmitButton: function twinklespeedyModeHasSubmitButton(mode) {
return mode === Twinkle.speedy.mode.sysopSubmit ||
mode === Twinkle.speedy.mode.userMultipleSubmit ||
mode === Twinkle.speedy.mode.userMultipleRadioClick ||
mode === Twinkle.speedy.mode.userSingleSubmit;
},
// is db-multiple the outcome here?
isMultiple: function twinklespeedyModeIsMultiple(mode) {
return mode === Twinkle.speedy.mode.userMultipleSubmit ||
mode === Twinkle.speedy.mode.userMultipleRadioClick;
},
// do we want subgroups? (if not we have to use prompt())
wantSubgroups: function twinklespeedyModeWantSubgroups(mode) {
return !Twinkle.speedy.mode.isSysop(mode);
}
};
// Prepares the speedy deletion dialog and displays it
Twinkle.speedy.initDialog = function twinklespeedyInitDialog(callbackfunc) {
var dialog;
Twinkle.speedy.dialog = new Morebits.simpleWindow( Twinkle.getPref('speedyWindowWidth'), Twinkle.getPref('speedyWindowHeight') );
dialog = Twinkle.speedy.dialog;
dialog.setTitle( "Choose criteria for speedy deletion" );
dialog.setScriptName( "Twinkle" );
dialog.addFooterLink( "Speedy deletion policy", "WP:CSD" );
dialog.addFooterLink( "Twinkle help", "WP:TW/DOC#speedy" );
var form = new Morebits.quickForm( callbackfunc, (Twinkle.getPref('speedySelectionStyle') === 'radioClick' ? 'change' : null) );
if( Morebits.userIsInGroup( 'sysop' ) ) {
form.append( {
type: 'checkbox',
list: [
{
label: 'Tag page only, don\'t delete',
value: 'tag_only',
name: 'tag_only',
tooltip: 'If you just want to tag the page, instead of deleting it now',
checked : Twinkle.getPref('deleteSysopDefaultToTag'),
event: function( event ) {
var cForm = event.target.form;
var cChecked = event.target.checked;
// enable/disable talk page checkbox
if (cForm.talkpage) {
cForm.talkpage.disabled = cChecked;
cForm.talkpage.checked = !cChecked && Twinkle.getPref('deleteTalkPageOnDelete');
}
// enable/disable redirects checkbox
cForm.redirects.disabled = cChecked;
cForm.redirects.checked = !cChecked;
// enable/disable notify checkbox
cForm.notify.disabled = !cChecked;
cForm.notify.checked = cChecked;
// enable/disable multiple
cForm.multiple.disabled = !cChecked;
cForm.multiple.checked = false;
Twinkle.speedy.callback.modeChanged(cForm);
event.stopPropagation();
}
}
]
} );
form.append( { type: 'header', label: 'Delete-related options' } );
if (mw.config.get('wgNamespaceNumber') % 2 === 0 && (mw.config.get('wgNamespaceNumber') !== 2 || (/\//).test(mw.config.get('wgTitle')))) { // hide option for user pages, to avoid accidentally deleting user talk page
form.append( {
type: 'checkbox',
list: [
{
label: 'Also delete talk page',
value: 'talkpage',
name: 'talkpage',
tooltip: "This option deletes the page's talk page in addition. If you choose the F8 (moved to Commons) criterion, this option is ignored and the talk page is *not* deleted.",
checked: Twinkle.getPref('deleteTalkPageOnDelete'),
disabled: Twinkle.getPref('deleteSysopDefaultToTag'),
event: function( event ) {
event.stopPropagation();
}
}
]
} );
}
form.append( {
type: 'checkbox',
list: [
{
label: 'Also delete all redirects',
value: 'redirects',
name: 'redirects',
tooltip: "This option deletes all incoming redirects in addition. Avoid this option for procedural (e.g. move/merge) deletions.",
checked: Twinkle.getPref('deleteRedirectsOnDelete'),
disabled: Twinkle.getPref('deleteSysopDefaultToTag'),
event: function( event ) {
event.stopPropagation();
}
}
]
} );
form.append( { type: 'header', label: 'Tag-related options' } );
}
form.append( {
type: 'checkbox',
list: [
{
label: 'Notify page creator if possible',
value: 'notify',
name: 'notify',
tooltip: "A notification template will be placed on the talk page of the creator, IF you have a notification enabled in your Twinkle preferences " +
"for the criterion you choose AND this box is checked. The creator may be welcomed as well.",
checked: !Morebits.userIsInGroup( 'sysop' ) || Twinkle.getPref('deleteSysopDefaultToTag'),
disabled: Morebits.userIsInGroup( 'sysop' ) && !Twinkle.getPref('deleteSysopDefaultToTag'),
event: function( event ) {
event.stopPropagation();
}
}
]
} );
form.append( {
type: 'checkbox',
list: [
{
label: 'Tag with multiple criteria',
value: 'multiple',
name: 'multiple',
tooltip: "When selected, you can select several criteria that apply to the page. For example, G11 and A7 are a common combination for articles.",
disabled: Morebits.userIsInGroup( 'sysop' ) && !Twinkle.getPref('deleteSysopDefaultToTag'),
event: function( event ) {
Twinkle.speedy.callback.modeChanged( event.target.form );
event.stopPropagation();
}
}
]
} );
form.append( {
type: 'div',
name: 'work_area',
label: 'Failed to initialize the CSD module. Please try again, or tell the Twinkle developers about the issue.'
} );
if( Twinkle.getPref( 'speedySelectionStyle' ) !== 'radioClick' ) {
form.append( { type: 'submit' } );
}
var result = form.render();
dialog.setContent( result );
dialog.display();
Twinkle.speedy.callback.modeChanged( result );
};
Twinkle.speedy.callback.modeChanged = function twinklespeedyCallbackModeChanged(form) {
var namespace = mw.config.get('wgNamespaceNumber');
var form = form;
// first figure out what mode we're in
var mode = Twinkle.speedy.mode.userSingleSubmit;
if (form.tag_only && !form.tag_only.checked) {
mode = Twinkle.speedy.mode.sysopSubmit;
} else {
if (form.multiple.checked) {
mode = Twinkle.speedy.mode.userMultipleSubmit;
} else {
mode = Twinkle.speedy.mode.userSingleSubmit;
}
}
if (Twinkle.getPref('speedySelectionStyle') === 'radioClick') {
mode++;
}
var work_area = new Morebits.quickForm.element( {
type: 'div',
name: 'work_area'
} );
if (mode === Twinkle.speedy.mode.userMultipleRadioClick) {
work_area.append( {
type: 'div',
label: 'When finished choosing criteria, click:'
} );
work_area.append( {
type: 'button',
name: 'submit-multiple',
label: 'Submit Query',
event: function( event ) {
Twinkle.speedy.callback.evaluateUser( event );
event.stopPropagation();
}
} );
}
var radioOrCheckbox = (Twinkle.speedy.mode.isMultiple(mode) ? 'checkbox' : 'radio');
if (namespace % 2 === 1 && namespace !== 3) {
// show db-talk on talk pages, but not user talk pages
work_area.append( { type: 'header', label: 'Talk pages' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.talkList, mode) } );
}
switch (namespace) {
case 0: // article
case 1: // talk
work_area.append( { type: 'header', label: 'Articles' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.articleList, mode) } );
break;
case 2: // user
case 3: // user talk
work_area.append( { type: 'header', label: 'User pages' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.userList, mode) } );
break;
case 6: // file
case 7: // file talk
work_area.append( { type: 'header', label: 'Files' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.fileList, mode) } );
if (!Twinkle.speedy.mode.isSysop(mode)) {
work_area.append( { type: 'div', label: 'Tagging for CSD F4 (no license), F5 (orphaned fair use), F6 (no fair use rationale), and F11 (no permission) can be done using Twinkle\'s "DI" tab.' } );
}
break;
case 10: // template
case 11: // template talk
work_area.append( { type: 'header', label: 'Templates' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.templateList, mode) } );
break;
case 14: // category
case 15: // category talk
work_area.append( { type: 'header', label: 'Categories' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.categoryList, mode) } );
break;
case 100: // portal
case 101: // portal talk
work_area.append( { type: 'header', label: 'Portals' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.portalList, mode) } );
break;
default:
break;
}
work_area.append( { type: 'header', label: 'General criteria' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.generalList, mode) });
work_area.append( { type: 'header', label: 'Redirects' } );
work_area.append( { type: radioOrCheckbox, name: 'csd', list: Twinkle.speedy.generateCsdList(Twinkle.speedy.redirectList, mode) } );
var old_area = Morebits.quickForm.getElements(form, "work_area")[0];
form.replaceChild(work_area.render(), old_area);
};
Twinkle.speedy.generateCsdList = function twinklespeedyGenerateCsdList(list, mode) {
// mode switches
var isSysop = Twinkle.speedy.mode.isSysop(mode);
var multiple = Twinkle.speedy.mode.isMultiple(mode);
var wantSubgroups = Twinkle.speedy.mode.wantSubgroups(mode);
var hasSubmitButton = Twinkle.speedy.mode.hasSubmitButton(mode);
var openSubgroupHandler = function(e) {
$(e.target.form).find('input').attr('disabled', 'disabled');
$(e.target.form).children().css('color', 'gray');
$(e.target).parent().css('color', 'black').find('input').attr('disabled', false);
$(e.target).parent().find('input:text')[0].focus();
e.stopPropagation();
};
var submitSubgroupHandler = function(e) {
Twinkle.speedy.callback.evaluateUser(e);
e.stopPropagation();
}
return $.map(list, function(critElement) {
var criterion = $.extend({}, critElement);
if (!wantSubgroups) {
criterion.subgroup = null;
}
if (multiple) {
if (criterion.hideWhenMultiple) {
return null;
}
if (criterion.hideSubgroupWhenMultiple) {
criterion.subgroup = null;
}
} else {
if (criterion.hideWhenSingle) {
return null;
}
if (criterion.hideSubgroupWhenSingle) {
criterion.subgroup = null;
}
}
if (isSysop) {
if (criterion.hideWhenSysop) {
return null;
}
if (criterion.hideSubgroupWhenSysop) {
criterion.subgroup = null;
}
} else {
if (criterion.hideWhenUser) {
return null;
}
if (criterion.hideSubgroupWhenUser) {
criterion.subgroup = null;
}
}
if (criterion.subgroup && !hasSubmitButton) {
if ($.isArray(criterion.subgroup)) {
criterion.subgroup.push({
type: 'button',
name: 'submit',
label: 'Submit Query',
event: submitSubgroupHandler
});
} else {
criterion.subgroup = [
criterion.subgroup,
{
type: 'button',
name: 'submit', // ends up being called "csd.submit" so this is OK
label: 'Submit Query',
event: submitSubgroupHandler
}
];
}
criterion.event = openSubgroupHandler;
}
return criterion;
});
}
Twinkle.speedy.talkList = [
{
label: 'G8: Talk pages with no corresponding subject page',
value: 'talk',
tooltip: 'This excludes any page that is useful to the project - in particular, user talk pages, talk page archives, and talk pages for files that exist on Wikimedia Commons.'
}
];
Twinkle.speedy.fileList = [
{
label: 'F1: Redundant file',
value: 'redundantimage',
tooltip: 'Any file that is a redundant copy, in the same file format and same or lower resolution, of something else on Wikipedia. Likewise, other media that is a redundant copy, in the same format and of the same or lower quality. This does not apply to files duplicated on Wikimedia Commons, because of licence issues; these should be tagged with {{subst:ncd|Image:newname.ext}} or {{subst:ncd}} instead',
subgroup: {
name: 'redundantimage_filename',
type: 'input',
label: 'File this is redundant to: ',
tooltip: 'The "File:" prefix can be left off.'
}
},
{
label: 'F2: Corrupt or blank file',
value: 'noimage',
tooltip: 'Before deleting this type of file, verify that the MediaWiki engine cannot read it by previewing a resized thumbnail of it. This also includes empty (i.e., no content) file description pages for Commons files'
},
{
label: 'F2: Unneeded file description page for a file on Commons',
value: 'fpcfail',
tooltip: 'An image, hosted on Commons, but with tags or information on its English Wikipedia description page that are no longer needed. (For example, a failed featured picture candidate.)',
hideWhenMultiple: true
},
{
label: 'F3: Improper license',
value: 'noncom',
tooltip: 'Files licensed as "for non-commercial use only", "non-derivative use" or "used with permission" that were uploaded on or after 2005-05-19, except where they have been shown to comply with the limited standards for the use of non-free content. This includes files licensed under a "Non-commercial Creative Commons License". Such files uploaded before 2005-05-19 may also be speedily deleted if they are not used in any articles'
},
{
label: 'F4: Lack of licensing information',
value: 'unksource',
tooltip: 'Files in category "Files with unknown source", "Files with unknown copyright status", or "Files with no copyright tag" that have been tagged with a template that places them in the category for more than seven days, regardless of when uploaded. Note, users sometimes specify their source in the upload summary, so be sure to check the circumstances of the file.',
hideWhenUser: true
},
{
label: 'F5: Unused unfree copyrighted file',
value: 'unfree',
tooltip: 'Files that are not under a free license or in the public domain that are not used in any article and that have been tagged with a template that places them in a dated subcategory of Category:Orphaned fairuse files for more than seven days. Reasonable exceptions may be made for file uploaded for an upcoming article. Use the "Orphaned fair use" option in Twinkle\'s DI module to tag files for forthcoming deletion.',
hideWhenUser: true
},
{
label: 'F6: Missing fair-use rationale',
value: 'norat',
tooltip: 'Any file without a fair use rationale may be deleted seven days after it is uploaded. Boilerplate fair use templates do not constitute a fair use rationale. Files uploaded before 2006-05-04 should not be deleted immediately; instead, the uploader should be notified that a fair-use rationale is needed. Files uploaded after 2006-05-04 can be tagged using the "No fair use rationale" option in Twinkle\'s DI module. Such files can be found in the dated subcategories of Category:Files with no fair use rationale.',
hideWhenUser: true
},
{
label: 'F7: Clearly invalid fair-use tag',
value: 'badfairuse', // same as below
tooltip: 'This is only for files with a clearly invalid fair-use tag, such as a {{Non-free logo}} tag on a photograph of a mascot. For cases that require a waiting period (replaceable images or otherwise disputed rationales), use the options on Twinkle\'s DI tab.',
subgroup: {
name: 'badfairuse_reason',
type: 'input',
label: 'Optional explanation: ',
size: 60
}
},
{
label: 'F7: Fair-use media from a commercial image agency which is not the subject of sourced commentary',
value: 'badfairuse', // same as above
tooltip: 'Non-free images or media from a commercial source (e.g., Associated Press, Getty), where the file itself is not the subject of sourced commentary, are considered an invalid claim of fair use and fail the strict requirements of WP:NFCC.',
subgroup: {
name: 'badfairuse_reason',
type: 'input',
label: 'Optional explanation: ',
size: 60
},
hideWhenMultiple: true
},
{
label: 'F8: File available as an identical or higher-resolution copy on Wikimedia Commons',
value: 'nowcommons',
tooltip: 'Provided the following conditions are met: 1: The file format of both images is the same. 2: The file\'s license and source status is beyond reasonable doubt, and the license is undoubtedly accepted at Commons. 3: All information on the file description page is present on the Commons file description page. That includes the complete upload history with links to the uploader\'s local user pages. 4: The file is not protected, and the file description page does not contain a request not to move it to Commons. 5: If the file is available on Commons under a different name than locally, all local references to the file must be updated to point to the title used at Commons. 6: For {{c-uploaded}} files: They may be speedily deleted as soon as they are off the Main Page',
subgroup: {
name: 'nowcommons_filename',
type: 'input',
label: 'Filename on Commons: ',
value: Morebits.pageNameNorm,
tooltip: 'This can be left blank if the file has the same name on Commons as here. The "File:" prefix is optional.'
},
hideWhenMultiple: true
},
{
label: 'F9: Unambiguous copyright infringement',
value: 'imgcopyvio',
tooltip: 'The file was copied from a website or other source that does not have a license compatible with Wikipedia, and the uploader neither claims fair use nor makes a credible assertion of permission of free use. Sources that do not have a license compatible with Wikipedia include stock photo libraries such as Getty Images or Corbis. Non-blatant copyright infringements should be discussed at Wikipedia:Files for deletion',
subgroup: {
name: 'imgcopyvio_url',
type: 'input',
label: 'URL of the copyvio, including the "http://". If you cannot provide a URL, please do not use CSD F9. (Exception: for copyvios of non-Internet sources, leave the box blank.) ',
size: 60
}
},
{
label: 'F10: Useless non-media file',
value: 'badfiletype',
tooltip: 'Files uploaded that are neither image, sound, nor video files (e.g. .doc, .pdf, or .xls files) which are not used in any article and have no foreseeable encyclopedic use'
},
{
label: 'F11: No evidence of permission',
value: 'nopermission',
tooltip: 'If an uploader has specified a license and has named a third party as the source/copyright holder without providing evidence that this third party has in fact agreed, the item may be deleted seven days after notification of the uploader',
hideWhenUser: true
},
{
label: 'G8: File description page with no corresponding file',
value: 'imagepage',
tooltip: 'This is only for use when the file doesn\'t exist at all. Corrupt files, and local description pages for files on Commons, should use F2; implausible redirects should use R3; and broken Commons redirects should use G6.'
}
];
Twinkle.speedy.articleList = [
{
label: 'A1: No context. Articles lacking sufficient context to identify the subject of the article.',
value: 'nocontext',
tooltip: 'Example: "He is a funny man with a red car. He makes people laugh." This applies only to very short articles. Context is different from content, treated in A3, below.'
},
{
label: 'A2: Foreign language articles that exist on another Wikimedia project',
value: 'foreign',
tooltip: 'If the article in question does not exist on another project, the template {{notenglish}} should be used instead. All articles in a non-English language that do not meet this criteria (and do not meet any other criteria for speedy deletion) should be listed at Pages Needing Translation (PNT) for review and possible translation',
subgroup: {
name: 'foreign_source',
type: 'input',
label: 'Interwiki link to the article on the foreign-language wiki: ',
tooltip: 'For example, fr:Bonjour'
}
},
{
label: 'A3: No content whatsoever',
value: 'nocontent',
tooltip: 'Any article consisting only of links elsewhere (including hyperlinks, category tags and "see also" sections), a rephrasing of the title, and/or attempts to correspond with the person or group named by its title. This does not include disambiguation pages'
},
{
label: 'A5: Transwikied articles',
value: 'transwiki',
tooltip: 'Any article that has been discussed at Articles for Deletion (et al), where the outcome was to transwiki, and where the transwikification has been properly performed and the author information recorded. Alternately, any article that consists of only a dictionary definition, where the transwikification has been properly performed and the author information recorded'
},
{
label: 'A7: Unremarkable people, groups, companies, web content, individual animals, or organized events',
value: 'a7',
tooltip: 'An article about a real person, group of people, band, club, company, web content, individual animal, tour, or party that does not assert the importance or significance of its subject. If controversial, or if a previous AfD has resulted in the article being kept, the article should be nominated for AfD instead',
hideWhenSingle: true
},
{
label: 'A7: Unremarkable person',
value: 'person',
tooltip: 'An article about a real person that does not assert the importance or significance of its subject. If controversial, or if there has been a previous AfD that resulted in the article being kept, the article should be nominated for AfD instead',
hideWhenMultiple: true
},
{
label: 'A7: Unremarkable musician(s) or band',
value: 'band',
tooltip: 'Article about a band, singer, musician, or musical ensemble that does not assert the importance or significance of the subject',
hideWhenMultiple: true
},
{
label: 'A7: Unremarkable club',
value: 'club',
tooltip: 'Article about a club that does not assert the importance or significance of the subject',
hideWhenMultiple: true
},
{
label: 'A7: Unremarkable company or organization',
value: 'corp',
tooltip: 'Article about a company or organization that does not assert the importance or significance of the subject',
hideWhenMultiple: true
},
{
label: 'A7: Unremarkable website or web content',
value: 'web',
tooltip: 'Article about a web site, blog, online forum, webcomic, podcast, or similar web content that does not assert the importance or significance of its subject',
hideWhenMultiple: true
},
{
label: 'A7: Unremarkable individual animal',
value: 'animal',
tooltip: 'Article about an individual animal (e.g. pet) that does not assert the importance or significance of its subject',
hideWhenMultiple: true
},
{
label: 'A7: Unremarkable organized event',
value: 'event',
tooltip: 'Article about an organized event (tour, function, meeting, party, etc.) that does not assert the importance or significance of its subject',
hideWhenMultiple: true
},
{
label: 'A9: Unremarkable musical recording where artist\'s article doesn\'t exist',
value: 'a9',
tooltip: 'An article about a musical recording which does not indicate why its subject is important or significant, and where the artist\'s article has never existed or has been deleted'
},
{
label: 'A10: Recently created article that duplicates an existing topic',
value: 'a10',
tooltip: 'A recently created article with no relevant page history that does not aim to expand upon, detail or improve information within any existing article(s) on the subject, and where the title is not a plausible redirect. This does not include content forks, split pages or any article that aims at expanding or detailing an existing one.',
subgroup: {
name: 'a10_article',
type: 'input',
label: 'Article that is duplicated: '
}
},
{
label: 'A11: Obviously made up by creator, and no claim of significance',
value: 'madeup',
tooltip: 'An article which plainly indicates that the subject was invented/coined/discovered by the article\'s creator or someone they know personally, and does not credibly indicate why its subject is important or significant'
}
];
Twinkle.speedy.categoryList = [
{
label: 'C1: Empty categories',
value: 'catempty',
tooltip: 'Categories that have been unpopulated for at least four days. This does not apply to categories being discussed at WP:CFD, disambiguation categories, and certain other exceptions. If the category isn\'t relatively new, it possibly contained articles earlier, and deeper investigation is needed'
},
{
label: 'G8: Categories populated by a deleted or retargeted template',
value: 'templatecat',
tooltip: 'This is for situations where a category is effectively empty, because the template(s) that formerly placed pages in that category are now deleted. This excludes categories that are still in use.'
}
];
Twinkle.speedy.userList = [
{
label: 'U1: User request',
value: 'userreq',
tooltip: 'Personal subpages, upon request by their user. In some rare cases there may be administrative need to retain the page. Also, sometimes, main user pages may be deleted as well. See Wikipedia:User page for full instructions and guidelines',
subgroup: ((mw.config.get('wgNamespaceNumber') === 3 && mw.config.get('wgTitle').indexOf('/') === -1) ? {
name: 'userreq_rationale',
type: 'input',
label: 'A mandatory rationale to explain why this user talk page should be deleted: ',
tooltip: 'User talk pages are deleted only in highly exceptional circumstances. See WP:DELTALK.',
size: 60
} : null),
hideSubgroupWhenMultiple: true
},
{
label: 'U2: Nonexistent user',
value: 'nouser',
tooltip: 'User pages of users that do not exist (Check Special:Listusers)'
},
{
label: 'U3: Non-free galleries',
value: 'gallery',
tooltip: 'Galleries in the userspace which consist mostly of "fair use" or non-free files. Wikipedia\'s non-free content policy forbids users from displaying non-free files, even ones they have uploaded themselves, in userspace. It is acceptable to have free files, GFDL-files, Creative Commons and similar licenses along with public domain material, but not "fair use" files'
},
{
label: 'G11: Promotional user page under a promotional user name',
value: 'spamuser',
tooltip: 'A promotional user page, with a username that promotes or implies affiliation with the thing being promoted. Note that simply having a page on a company or product in one\'s userspace does not qualify it for deletion. If a user page is spammy but the username is not, then consider tagging with regular G11 instead.',
hideWhenMultiple: true
}
];
Twinkle.speedy.templateList = [
{
label: 'T2: Templates that are blatant misrepresentations of established policy',
value: 'policy',
tooltip: 'This includes "speedy deletion" templates for issues that are not speedy deletion criteria and disclaimer templates intended to be used in articles'
},
{
label: 'T3: Duplicate templates or hardcoded instances',
value: 'duplicatetemplate',
tooltip: 'Templates that are either substantial duplications of another template or hardcoded instances of another template where the same functionality could be provided by that other template',
subgroup: {
name: 'duplicatetemplate_2',
type: 'input',
label: 'Template this is redundant to: ',
tooltip: 'The "Template:" prefix is not needed.'
},
hideWhenMultiple: true
},
{
label: 'T3: Templates that are not employed in any useful fashion',
value: 't3',
tooltip: 'This criterion allows you to provide a rationale. In many cases, another criterion will be more appropriate, such as G1, G2, G6, or G8.',
subgroup: {
name: 't3_rationale',
type: 'input',
label: 'Rationale: ',
tooltip: 'The rationale is required.',
size: 60
},
hideWhenMultiple: true
}
];
Twinkle.speedy.portalList = [
{
label: 'P1: Portal that would be subject to speedy deletion if it were an article',
value: 'p1',
tooltip: 'You must specify the article criterion that applies in this case (A1, A3, A7, or A10).',
subgroup: {
name: 'p1_1',
type: 'select',
label: 'Article criterion that would apply: '
},
hideWhenMultiple: true
},
{
label: 'P2: Underpopulated portal',
value: 'emptyportal',
tooltip: 'Any Portal based on a topic for which there is not a non-stub header article, and at least three non-stub articles detailing subject matter that would be appropriate to discuss under the title of that Portal'
}
];
Twinkle.speedy.generalList = [
{
label: 'Custom rationale' + (Morebits.userIsInGroup('sysop') ? ' (custom deletion reason)' : ' using {{db}} template'),
value: 'reason',
tooltip: '{{db}} is short for "delete because". At least one of the other deletion criteria must still apply to the page, and you must make mention of this in your rationale. This is not a "catch-all" for when you can\'t find any criteria that fit.',
subgroup: {
name: 'reason_1',
type: 'input',
label: 'Rationale: ',
size: 60
},
hideWhenMultiple: true,
hideSubgroupWhenSysop: true
},
{
label: 'G1: Patent nonsense. Pages consisting purely of incoherent text or gibberish with no meaningful content or history.',
value: 'nonsense',
tooltip: 'This does not include poor writing, partisan screeds, obscene remarks, vandalism, fictional material, material not in English, poorly translated material, implausible theories, or hoaxes. In short, if you can understand it, G1 does not apply.'
},
{
label: 'G2: Test page',
value: 'test',
tooltip: 'A page created to test editing or other Wikipedia functions. Pages in the User namespace are not included, nor are valid but unused or duplicate templates (although criterion T3 may apply).'
},
{
label: 'G3: Pure vandalism',
value: 'vandalism',
tooltip: 'Plain pure vandalism (including redirects left behind from pagemove vandalism)'
},
{
label: 'G3: Blatant hoax',
value: 'hoax',
tooltip: 'Blatant and obvious hoax, to the point of vandalism',
hideWhenMultiple: true
},
{
label: 'G4: Recreation of material deleted via a deletion discussion',
value: 'repost',
tooltip: 'A copy, by any title, of a page that was deleted via an XfD process or Deletion review, provided that the copy is substantially identical to the deleted version. This clause does not apply to content that has been "userfied", to content undeleted as a result of Deletion review, or if the prior deletions were proposed or speedy deletions, although in this last case, other speedy deletion criteria may still apply',
subgroup: {
name: 'repost_1',
type: 'input',
label: 'Page where the deletion discussion took place: ',
tooltip: 'Must start with "Wikipedia:"',
size: 60
}
},
{
label: 'G5: Banned or blocked user',
value: 'banned',
tooltip: 'Pages created by banned or blocked users in violation of their ban or block, and which have no substantial edits by others',
subgroup: {
name: 'banned_1',
type: 'input',
label: 'Username of banned user (if available): ',
tooltip: 'Should not start with "User:"'
},
hideSubgroupWhenMultiple: true
},
{
label: 'G6: History merge',
value: 'histmerge',
tooltip: 'Temporarily deleting a page in order to merge page histories',
subgroup: {
name: 'histmerge_1',
type: 'input',
label: 'Page to be merged into this one: '
},
hideWhenMultiple: true
},
{
label: 'G6: Move',
value: 'move',
tooltip: 'Making way for an uncontroversial move like reversing a redirect',
subgroup: [
{
name: 'move_1',
type: 'input',
label: 'Page to be moved here: '
},
{
name: 'move_2',
type: 'input',
label: 'Reason: ',
size: 60
}
],
hideWhenMultiple: true
},
{
label: 'G6: XfD',
value: 'xfd',
tooltip: 'An admin has closed a deletion discussion (at AfD, FfD, RfD, TfD, CfD, or MfD) as "delete", but they didn\'t actually delete the page.',
subgroup: {
name: 'xfd_fullvotepage',
type: 'input',
label: 'Page where the deletion discussion was held: ',
size: 40
},
hideWhenMultiple: true
},
{
label: 'G6: Unnecessary disambiguation page',
value: 'disambig',
tooltip: 'This only applies for orphaned disambiguation pages which either: (1) disambiguate two or fewer existing Wikipedia pages and whose title ends in "(disambiguation)" (i.e., there is a primary topic); or (2) disambiguates no (zero) existing Wikipedia pages, regardless of its title.',
hideWhenMultiple: true
},
{
label: 'G6: Redirect to malplaced disambiguation page',
value: 'movedab',
tooltip: 'This only applies for redirects to disambiguation pages ending in (disambiguation) where a primary topic does not exist.',
hideWhenMultiple: true
},
{
label: 'G6: Copy-and-paste page move',
value: 'copypaste',
tooltip: 'This only applies for a copy-and-paste page move of another page that needs to be temporarily deleted to make room for a clean page move.',
subgroup: {
name: 'copypaste_1',
type: 'input',
label: 'Original page that was copy-pasted here: '
},
hideWhenMultiple: true
},
{
label: 'G6: Housekeeping',
value: 'g6',
tooltip: 'Other non-controversial "housekeeping" tasks',
subgroup: {
name: 'g6_rationale',
type: 'input',
label: 'Rationale: ',
size: 60
}
},
{
label: 'G7: Author requests deletion, or author blanked',
value: 'author',
tooltip: 'Any page for which deletion is requested by the original author in good faith, provided the page\'s only substantial content was added by its author. If the author blanks the page, this can also be taken as a deletion request.',
subgroup: {
name: 'author_rationale',
type: 'input',
label: 'Optional explanation: ',
tooltip: 'Perhaps linking to where the author requested this deletion.',
size: 60
}
},
{
label: 'G8: Pages dependent on a non-existent or deleted page',
value: 'g8',
tooltip: 'such as talk pages with no corresponding subject page; subpages with no parent page; file pages without a corresponding file; redirects to invalid targets, such as nonexistent targets, redirect loops, and bad titles; or categories populated by deleted or retargeted templates. This excludes any page that is useful to the project, and in particular: deletion discussions that are not logged elsewhere, user and user talk pages, talk page archives, plausible redirects that can be changed to valid targets, and file pages or talk pages for files that exist on Wikimedia Commons.',
subgroup: {
name: 'g8_rationale',
type: 'input',
label: 'Optional explanation: ',
size: 60
}
},
{
label: 'G8: Subpages with no parent page',
value: 'subpage',
tooltip: 'This excludes any page that is useful to the project, and in particular: deletion discussions that are not logged elsewhere, user and user talk pages, talk page archives, plausible redirects that can be changed to valid targets, and file pages or talk pages for files that exist on Wikimedia Commons.',
hideWhenMultiple: true
},
{
label: 'G10: Attack page',
value: 'attack',
tooltip: 'Pages that serve no purpose but to disparage their subject or some other entity (e.g., "John Q. Doe is an imbecile"). This includes a biography of a living person that is negative in tone and unsourced, where there is no NPOV version in the history to revert to. Administrators deleting such pages should not quote the content of the page in the deletion summary!'
},
{
label: 'G10: Wholly negative, unsourced BLP',
value: 'negublp',
tooltip: 'A biography of a living person that is entirely negative in tone and unsourced, where there is no neutral version in the history to revert to.',
hideWhenMultiple: true
},
{
label: 'G11: Unambiguous advertising',
value: 'spam',
tooltip: 'Pages which exclusively promote a company, product, group, service, or person and which would need to be fundamentally rewritten in order to become encyclopedic. Note that an article about a company or a product which describes its subject from a neutral point of view does not qualify for this criterion; an article that is blatant advertising should have inappropriate content as well'
},
{
label: 'G12: Unambiguous copyright infringement',
value: 'copyvio',
tooltip: 'Either: (1) Material was copied from another website that does not have a license compatible with Wikipedia, or is photography from a stock photo seller (such as Getty Images or Corbis) or other commercial content provider; (2) There is no non-infringing content in the page history worth saving; or (3) The infringement was introduced at once by a single person rather than created organically on wiki and then copied by another website such as one of the many Wikipedia mirrors',
subgroup: [
{
name: 'copyvio_url',
type: 'input',
label: 'URL (if available): ',
tooltip: 'If the material was copied from an online source, put the URL here, including the "http://" or "https://" protocol. If the URL is on the spam blacklist, you can leave off the protocol.',
size: 60
},
{
name: 'copyvio_url2',
type: 'input',
label: 'Additional URL: ',
tooltip: 'Optional.',
size: 60
},
{
name: 'copyvio_url3',
type: 'input',
label: 'Additional URL: ',
tooltip: 'Optional.',
size: 60
}
]
},
{
label: 'G13: Old, abandoned Articles for Creation submissions',
value: 'afc',
tooltip: 'Any rejected or unsubmitted AfC submission that has not been edited for more than 6 months.'
}
];
Twinkle.speedy.redirectList = [
{
label: 'R2: Redirects from mainspace to any other namespace except the Category:, Template:, Wikipedia:, Help: and Portal: namespaces',
value: 'rediruser',
tooltip: '(this does not include the Wikipedia shortcut pseudo-namespaces). If this was the result of a page move, consider waiting a day or two before deleting the redirect'
},
{
label: 'R3: Redirects as a result of an implausible typo that were recently created',
value: 'redirtypo',
tooltip: 'However, redirects from common misspellings or misnomers are generally useful, as are redirects in other languages'
},
{
label: 'G8: Redirects to invalid targets, such as nonexistent targets, redirect loops, and bad titles',
value: 'redirnone',
tooltip: 'This excludes any page that is useful to the project, and in particular: deletion discussions that are not logged elsewhere, user and user talk pages, talk page archives, plausible redirects that can be changed to valid targets, and file pages or talk pages for files that exist on Wikimedia Commons.'
}
];
Twinkle.speedy.normalizeHash = {
'reason': 'db',
'nonsense': 'g1',
'test': 'g2',
'vandalism': 'g3',
'hoax': 'g3',
'repost': 'g4',
'banned': 'g5',
'histmerge': 'g6',
'move': 'g6',
'xfd': 'g6',
'disambig': 'g6',
'movedab': 'g6',
'copypaste': 'g6',
'g6': 'g6',
'author': 'g7',
'g8': 'g8',
'talk': 'g8',
'subpage': 'g8',
'redirnone': 'g8',
'templatecat': 'g8',
'imagepage': 'g8',
'attack': 'g10',
'negublp': 'g10',
'spam': 'g11',
'spamuser': 'g11',
'copyvio': 'g12',
'afc': 'g13',
'nocontext': 'a1',
'foreign': 'a2',
'nocontent': 'a3',
'transwiki': 'a5',
'a7': 'a7',
'person': 'a7',
'corp': 'a7',
'web': 'a7',
'band': 'a7',
'club': 'a7',
'animal': 'a7',
'event': 'a7',
'a9': 'a9',
'a10': 'a10',
'madeup': 'a11',
'rediruser': 'r2',
'redirtypo': 'r3',
'redundantimage': 'f1',
'noimage': 'f2',
'fpcfail': 'f2',
'noncom': 'f3',
'unksource': 'f4',
'unfree': 'f5',
'norat': 'f6',
'badfairuse': 'f7',
'nowcommons': 'f8',
'imgcopyvio': 'f9',
'badfiletype': 'f10',
'nopermission': 'f11',
'catempty': 'c1',
'userreq': 'u1',
'nouser': 'u2',
'gallery': 'u3',
'policy': 't2',
'duplicatetemplate': 't3',
't3': 't3',
'p1': 'p1',
'emptyportal': 'p2'
};
// keep this synched with [[MediaWiki:Deletereason-dropdown]]
Twinkle.speedy.reasonHash = {
'reason': '',
// General
'nonsense': '[[WP:PN|Patent nonsense]], meaningless, or incomprehensible',
'test': 'Test page',
'vandalism': '[[WP:Vandalism|Vandalism]]',
'hoax': 'Blatant [[WP:Do not create hoaxes|hoax]]',
'repost': 'Recreation of a page that was [[WP:DEL|deleted]] per a [[WP:XFD|deletion discussion]]',
'banned': 'Creation by a [[WP:BLOCK|blocked]] or [[WP:BAN|banned]] user in violation of block or ban',
'histmerge': 'Temporary deletion in order to merge page histories',
'move': 'Making way for a non-controversial move',
'xfd': 'Deleting page per result of [[WP:XfD|deletion discussion]]',
'disambig': 'Unnecessary disambiguation page',
'movedab': 'Redirect to [[WP:MALPLACED|malplaced disambiguation page]]',
'copypaste': '[[WP:CPMV|Copy-and-paste]] page move',
'g6': 'Housekeeping and routine (non-controversial) cleanup',
'author': 'One author who has requested deletion or blanked the page',
'g8': 'Page dependent on a deleted or nonexistent page',
'talk': '[[Help:Talk page|Talk page]] of a deleted or nonexistent page',
'subpage': '[[WP:Subpages|Subpage]] of a deleted or nonexistent page',
'redirnone': '[[Wikipedia:Redirect|redirect]] to a deleted or nonexistent page',
'templatecat': 'Populated by deleted or retargeted templates',
'imagepage': 'File description page for a file that does not exist',
'attack': '[[WP:ATP|Attack page]] or negative unsourced [[WP:BLP|BLP]]',
'negublp': 'Negative unsourced [[WP:BLP|BLP]]',
'spam': 'Unambiguous [[WP:NOTADVERTISING|advertising]] or promotion',
'copyvio': 'Unambiguous [[WP:C|copyright infringement]]',
'afc': 'Abandoned [[WP:AFC|Article for creation]] – to retrieve it, see [[WP:REFUND/G13]]',
// Articles
'nocontext': 'Short article without enough context to identify the subject',
'foreign': 'Article in a foreign language that exists on another project',
'nocontent': 'Article that has no meaningful, substantive content',
'transwiki': 'Article that has been transwikied to another project',
'a7': 'No explanation of the subject\'s significance (real person, animal, organization, or web content)',
'person' : 'No explanation of the subject\'s significance (real person)',
'web': 'No explanation of the subject\'s significance (web content)',
'corp': 'No explanation of the subject\'s significance (organization)',
'club': 'No explanation of the subject\'s significance (organization)',
'band': 'No explanation of the subject\'s significance (band/musician)',
'animal': 'No explanation of the subject\'s significance (individual animal)',
'event': 'No explanation of the subject\'s significance (event)',
'a9': 'Music recording by redlinked artist and no indication of importance or significance',
'a10': 'Recently created article that duplicates an existing topic',
'madeup': 'Obviously made up',
// Images and media
'redundantimage': 'File redundant to another on Wikipedia',
'noimage': 'Corrupt or empty file',
'fpcfail': 'Unneeded file description page for a file on Commons',
'noncom': 'File with improper license',
'unksource': 'Lack of licensing information',
'unfree': 'Unused non-free media',
'norat': 'Non-free file without [[WP:RAT|fair-use rationale]]',
'badfairuse': 'Violates [[WP:F|non-free use policy]]',
'nowcommons': 'Media file available on Commons',
'imgcopyvio': 'Unambiguous [[WP:COPYVIO|copyright violation]]',
'badfiletype': 'Useless media file (not an image, audio or video)',
'nopermission': 'No evidence of permission',
// Categories
'catempty': 'Empty category',
// User pages
'userreq': 'User request to delete page in own userspace',
'nouser': 'Userpage or subpage of a nonexistent user',
'gallery': '[[WP:NFC|Non-free]] [[Help:Gallery|gallery]]',
// Templates
'policy': 'Template that unambiguously misrepresents established policy',
'duplicatetemplate': 'Unused, redundant template',
't3': 'Unused, redundant template',
// Portals
'p1': '[[WP:P|Portal]] page that would be subject to speedy deletion as an article',
'emptyportal': '[[WP:P|Portal]] without a substantial topic base',
// Redirects
'rediruser': 'Cross-[[WP:NS|namespace]] [[WP:R|redirect]] from mainspace',
'redirtypo': 'Recently created, implausible [[WP:R|redirect]]'
};
Twinkle.speedy.callbacks = {
sysop: {
main: function( params ) {
var thispage;
Morebits.wiki.addCheckpoint(); // prevent actionCompleted from kicking in until user interaction is done
// look up initial contributor. If prompting user for deletion reason, just display a link.
// Otherwise open the talk page directly
if( params.openusertalk ) {
thispage = new Morebits.wiki.page( mw.config.get('wgPageName') ); // a necessary evil, in order to clear incorrect status text
thispage.setCallbackParameters( params );
thispage.lookupCreator( Twinkle.speedy.callbacks.sysop.openUserTalkPage );
}
// delete page
var reason;
thispage = new Morebits.wiki.page( mw.config.get('wgPageName'), "Deleting page" );
if (params.normalized === 'db') {
reason = prompt("Enter the deletion summary to use, which will be entered into the deletion log:", "");
} else {
var presetReason = "[[WP:CSD#" + params.normalized.toUpperCase() + "|" + params.normalized.toUpperCase() + "]]: " + params.reason;
if (Twinkle.getPref("promptForSpeedyDeletionSummary").indexOf(params.normalized) !== -1) {
reason = prompt("Enter the deletion summary to use, or press OK to accept the automatically generated one.", presetReason);
} else {
reason = presetReason;
}
}
if (reason === null) {
Morebits.status.error("Asking for reason", "User cancelled");
Morebits.wiki.removeCheckpoint();
return;
} else if (!reason || !reason.replace(/^\s*/, "").replace(/\s*$/, "")) {
Morebits.status.error("Asking for reason", "you didn't give one. I don't know... what with admins and their apathetic antics... I give up...");
Morebits.wiki.removeCheckpoint();
return;
}
thispage.setEditSummary( reason + Twinkle.getPref('deletionSummaryAd') );
thispage.deletePage(function() {
thispage.getStatusElement().info("done");
Twinkle.speedy.callbacks.sysop.deleteTalk( params );
});
Morebits.wiki.removeCheckpoint();
},
deleteTalk: function( params ) {
// delete talk page
if (params.deleteTalkPage &&
params.normalized !== 'f8' &&
document.getElementById( 'ca-talk' ).className !== 'new') {
var talkpage = new Morebits.wiki.page( Morebits.wikipedia.namespaces[ mw.config.get('wgNamespaceNumber') + 1 ] + ':' + mw.config.get('wgTitle'), "Deleting talk page" );
talkpage.setEditSummary('[[WP:CSD#G8|G8]]: Talk page of deleted page "' + Morebits.pageNameNorm + '"' + Twinkle.getPref('deletionSummaryAd'));
talkpage.deletePage();
// this is ugly, but because of the architecture of wiki.api, it is needed
// (otherwise success/failure messages for the previous action would be suppressed)
window.setTimeout(function() { Twinkle.speedy.callbacks.sysop.deleteRedirects( params ); }, 1800);
} else {
Twinkle.speedy.callbacks.sysop.deleteRedirects( params );
}
},
deleteRedirects: function( params ) {
// delete redirects
if (params.deleteRedirects) {
var query = {
'action': 'query',
'list': 'backlinks',
'blfilterredir': 'redirects',
'bltitle': mw.config.get('wgPageName'),
'bllimit': 5000 // 500 is max for normal users, 5000 for bots and sysops
};
var wikipedia_api = new Morebits.wiki.api( 'getting list of redirects...', query, Twinkle.speedy.callbacks.sysop.deleteRedirectsMain,
new Morebits.status( 'Deleting redirects' ) );
wikipedia_api.params = params;
wikipedia_api.post();
}
// promote Unlink tool
var $link, $bigtext;
if( mw.config.get('wgNamespaceNumber') === 6 && params.normalized !== 'f8' ) {
$link = $('<a/>', {
'href': '#',
'text': 'click here to go to the Unlink tool',
'css': { 'fontSize': '130%', 'fontWeight': 'bold' },
'click': function(){
Morebits.wiki.actionCompleted.redirect = null;
Twinkle.speedy.dialog.close();
Twinkle.unlink.callback("Removing usages of and/or links to deleted file " + Morebits.pageNameNorm);
}
});
$bigtext = $('<span/>', {
'text': 'To orphan backlinks and remove instances of file usage',
'css': { 'fontSize': '130%', 'fontWeight': 'bold' }
});
Morebits.status.info($bigtext[0], $link[0]);
} else if (params.normalized !== 'f8') {
$link = $('<a/>', {
'href': '#',
'text': 'click here to go to the Unlink tool',
'css': { 'fontSize': '130%', 'fontWeight': 'bold' },
'click': function(){
Morebits.wiki.actionCompleted.redirect = null;
Twinkle.speedy.dialog.close();
Twinkle.unlink.callback("Removing links to deleted page " + Morebits.pageNameNorm);
}
});
$bigtext = $('<span/>', {
'text': 'To orphan backlinks',
'css': { 'fontSize': '130%', 'fontWeight': 'bold' }
});
Morebits.status.info($bigtext[0], $link[0]);
}
},
openUserTalkPage: function( pageobj ) {
pageobj.getStatusElement().unlink(); // don't need it anymore
var user = pageobj.getCreator();
var params = pageobj.getCallbackParameters();
var query = {
'title': 'User talk:' + user,
'action': 'edit',
'preview': 'yes',
'vanarticle': Morebits.pageNameNorm
};
if (params.normalized === 'db' || Twinkle.getPref("promptForSpeedyDeletionSummary").indexOf(params.normalized) !== -1) {
// provide a link to the user talk page
var $link, $bigtext;
$link = $('<a/>', {
'href': mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ),
'text': 'click here to open User talk:' + user,
'target': '_blank',
'css': { 'fontSize': '130%', 'fontWeight': 'bold' }
});
$bigtext = $('<span/>', {
'text': 'To notify the page creator',
'css': { 'fontSize': '130%', 'fontWeight': 'bold' }
});
Morebits.status.info($bigtext[0], $link[0]);
} else {
// open the initial contributor's talk page
var statusIndicator = new Morebits.status('Opening user talk page edit form for ' + user, 'opening...');
switch( Twinkle.getPref('userTalkPageMode') ) {
case 'tab':
window.open( mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ), '_blank' );
break;
case 'blank':
window.open( mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ), '_blank', 'location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800' );
break;
case 'window':
/* falls through */
default:
window.open( mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query ),
( window.name === 'twinklewarnwindow' ? '_blank' : 'twinklewarnwindow' ),
'location=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=1200,height=800' );
break;
}
statusIndicator.info( 'complete' );
}
},
deleteRedirectsMain: function( apiobj ) {
var xmlDoc = apiobj.getXML();
var $snapshot = $(xmlDoc).find('backlinks bl');
var total = $snapshot.length;
var statusIndicator = apiobj.statelem;
if( !total ) {
statusIndicator.status("no redirects found");
return;
}
statusIndicator.status("0%");
var current = 0;
var onsuccess = function( apiobjInner ) {
var now = parseInt( 100 * (++current)/total, 10 ) + '%';
statusIndicator.update( now );
apiobjInner.statelem.unlink();
if( current >= total ) {
statusIndicator.info( now + ' (completed)' );
Morebits.wiki.removeCheckpoint();
}
};
Morebits.wiki.addCheckpoint();
$snapshot.each(function(key, value) {
var title = $(value).attr('title');
var page = new Morebits.wiki.page(title, 'Deleting redirect "' + title + '"');
page.setEditSummary('[[WP:CSD#G8|G8]]: Redirect to deleted page "' + Morebits.pageNameNorm + '"' + Twinkle.getPref('deletionSummaryAd'));
page.deletePage(onsuccess);
});
}
},
user: {
main: function(pageobj) {
var statelem = pageobj.getStatusElement();
if (!pageobj.exists()) {
statelem.error( "It seems that the page doesn't exist; perhaps it has already been deleted" );
return;
}
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
statelem.status( 'Checking for tags on the page...' );
// check for existing deletion tags
var tag = /(?:\{\{\s*(db|delete|db-.*?|speedy deletion-.*?)(?:\s*\||\s*\}\}))/.exec( text );
if( tag ) {
statelem.error( [ Morebits.htmlNode( 'strong', tag[1] ) , " is already placed on the page." ] );
return;
}
var xfd = /(?:\{\{([rsaiftcm]fd|md1|proposed deletion)[^{}]*?\}\})/i.exec( text );
if( xfd && !confirm( "The deletion-related template {{" + xfd[1] + "}} was found on the page. Do you still want to add a CSD template?" ) ) {
return;
}
var code, parameters, i;
if (params.normalizeds.length > 1) {
code = "{{db-multiple";
$.each(params.normalizeds, function(index, norm) {
code += "|" + norm.toUpperCase();
parameters = params.templateParams[index] || [];
for (var i in parameters) {
if (typeof parameters[i] === 'string' && !parseInt(i, 10)) { // skip numeric parameters - {{db-multiple}} doesn't understand them
code += "|" + i + "=" + parameters[i];
}
}
});
code += "}}";
params.utparams = [];
} else {
parameters = params.templateParams[0] || [];
code = "{{db-" + params.values[0];
for (i in parameters) {
if (typeof parameters[i] === 'string') {
code += "|" + i + "=" + parameters[i];
}
}
code += "}}";
params.utparams = Twinkle.speedy.getUserTalkParameters(params.normalizeds[0], parameters);
}
var thispage = new Morebits.wiki.page(mw.config.get('wgPageName'));
// patrol the page, if reached from Special:NewPages
if( Twinkle.getPref('markSpeedyPagesAsPatrolled') ) {
thispage.patrol();
}
// Wrap SD template in noinclude tags if we are in template space.
// Won't work with userboxes in userspace, or any other transcluded page outside template space
if (mw.config.get('wgNamespaceNumber') === 10) { // Template:
code = "<noinclude>" + code + "</noinclude>";
}
// Remove tags that become superfluous with this action
text = text.replace(/\{\{\s*([Nn]ew unreviewed article|[Uu]nreviewed|[Uu]serspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/g, "");
if (mw.config.get('wgNamespaceNumber') === 6) {
// remove "move to Commons" tag - deletion-tagged files cannot be moved to Commons
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, "");
}
// Generate edit summary for edit
var editsummary;
if (params.normalizeds.length > 1) {
editsummary = 'Requesting speedy deletion (';
$.each(params.normalizeds, function(index, norm) {
editsummary += '[[WP:CSD#' + norm.toUpperCase() + '|CSD ' + norm.toUpperCase() + ']], ';
});
editsummary = editsummary.substr(0, editsummary.length - 2); // remove trailing comma
editsummary += ').';
} else if (params.normalizeds[0] === "db") {
editsummary = 'Requesting [[WP:CSD|speedy deletion]] with rationale \"' + parameters["1"] + '\".';
} else if (params.values[0] === "histmerge") {
editsummary = "Requesting history merge with [[" + parameters["1"] + "]] ([[WP:CSD#G6|CSD G6]]).";
} else {
editsummary = "Requesting speedy deletion ([[WP:CSD#" + params.normalizeds[0].toUpperCase() + "|CSD " + params.normalizeds[0].toUpperCase() + "]]).";
}
pageobj.setPageText(code + ((params.normalizeds.indexOf('g10') !== -1) ? '' : ("\n" + text) )); // cause attack pages to be blanked
pageobj.setEditSummary(editsummary + Twinkle.getPref('summaryAd'));
pageobj.setWatchlist(params.watch);
pageobj.setCreateOption('nocreate');
pageobj.save(Twinkle.speedy.callbacks.user.tagComplete);
},
tagComplete: function(pageobj) {
var params = pageobj.getCallbackParameters();
// Notification to first contributor
if (params.usertalk) {
var callback = function(pageobj) {
var initialContrib = pageobj.getCreator();
// don't notify users when their user talk page is nominated
if (initialContrib === mw.config.get('wgTitle') && mw.config.get('wgNamespaceNumber') === 3) {
Morebits.status.warn("Notifying initial contributor: this user created their own user talk page; skipping notification");
return;
}
// quick hack to prevent excessive unwanted notifications, per request. Should actually be configurable on recipient page ...
if ((initialContrib === "Cyberbot I" || initialContrib === "SoxBot") && params.normalizeds[0]==="f2") {
Morebits.status.warn("Notifying initial contributor: page created procedurally by bot; skipping notification");
return;
}
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")"),
notifytext, i;
// specialcase "db" and "db-multiple"
if (params.normalizeds.length > 1) {
notifytext = "\n{{subst:db-notice-multiple|1=" + Morebits.pageNameNorm;
var count = 2;
$.each(params.normalizeds, function(index, norm) {
notifytext += "|" + (count++) + "=" + norm.toUpperCase();
});
} else if (params.normalizeds[0] === "db") {
notifytext = "\n{{subst:db-reason-notice|1=" + Morebits.pageNameNorm;
} else {
notifytext = "\n{{subst:db-csd-notice-custom|1=" + Morebits.pageNameNorm + "|2=" + params.values[0];
}
for (i in params.utparams) {
if (typeof params.utparams[i] === 'string') {
notifytext += "|" + i + "=" + params.utparams[i];
}
}
notifytext += (params.welcomeuser ? "" : "|nowelcome=yes") + "}} ~~~~";
var editsummary = "Notification: speedy deletion nomination";
if (params.normalizeds.indexOf("g10") === -1) { // no article name in summary for G10 deletions
editsummary += " of [[" + Morebits.pageNameNorm + "]].";
} else {
editsummary += " of an attack page.";
}
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary(editsummary + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
// add this nomination to the user's userspace log, if the user has enabled it
if (params.lognomination) {
Twinkle.speedy.callbacks.user.addToLog(params, initialContrib);
}
};
var thispage = new Morebits.wiki.page(Morebits.pageNameNorm);
thispage.lookupCreator(callback);
}
// or, if not notifying, add this nomination to the user's userspace log without the initial contributor's name
else if (params.lognomination) {
Twinkle.speedy.callbacks.user.addToLog(params, null);
}
},
// note: this code is also invoked from twinkleimage
// the params used are:
// for CSD: params.values, params.normalizeds (note: normalizeds is an array)
// for DI: params.fromDI = true, params.type, params.normalized (note: normalized is a string)
addToLog: function(params, initialContrib) {
var wikipedia_page = new Morebits.wiki.page("User:" + mw.config.get('wgUserName') + "/" + Twinkle.getPref('speedyLogPageName'), "Adding entry to userspace log");
params.logInitialContrib = initialContrib;
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.speedy.callbacks.user.saveLog);
},
saveLog: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var appendText = "";
// add blurb if log page doesn't exist
if (!pageobj.exists()) {
appendText +=
"This is a log of all [[WP:CSD|speedy deletion]] nominations made by this user using [[WP:TW|Twinkle]]'s CSD module.\n\n" +
"If you no longer wish to keep this log, you can turn it off using the [[Wikipedia:Twinkle/Preferences|preferences panel]], and " +
"nominate this page for speedy deletion under [[WP:CSD#U1|CSD U1]].";
if (Morebits.userIsInGroup("sysop")) {
appendText += "\n\nThis log does not track outright speedy deletions made using Twinkle.";
}
}
// create monthly header
var date = new Date();
var headerRe = new RegExp("^==+\\s*" + date.getUTCMonthName() + "\\s+" + date.getUTCFullYear() + "\\s*==+", "m");
if (!headerRe.exec(text)) {
appendText += "\n\n=== " + date.getUTCMonthName() + " " + date.getUTCFullYear() + " ===";
}
appendText += "\n# [[:" + Morebits.pageNameNorm + "]]: ";
if (params.fromDI) {
appendText += "DI [[WP:CSD#" + params.normalized.toUpperCase() + "|CSD " + params.normalized.toUpperCase() + "]] (" + params.type + ")";
} else {
if (params.normalizeds.length > 1) {
appendText += "multiple criteria (";
$.each(params.normalizeds, function(index, norm) {
appendText += "[[WP:CSD#" + norm.toUpperCase() + "|" + norm.toUpperCase() + ']], ';
});
appendText = appendText.substr(0, appendText.length - 2); // remove trailing comma
appendText += ')';
} else if (params.normalizeds[0] === "db") {
appendText += "{{tl|db-reason}}";
} else {
appendText += "[[WP:CSD#" + params.normalizeds[0].toUpperCase() + "|CSD " + params.normalizeds[0].toUpperCase() + "]] ({{tl|db-" + params.values[0] + "}})";
}
}
if (params.logInitialContrib) {
appendText += "; notified {{user|1=" + params.logInitialContrib + "}}";
}
appendText += " ~~~~~\n";
pageobj.setAppendText(appendText);
pageobj.setEditSummary("Logging speedy deletion nomination of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
pageobj.setCreateOption("recreate");
pageobj.append();
}
}
};
// validate subgroups in the form passed into the speedy deletion tag
Twinkle.speedy.getParameters = function twinklespeedyGetParameters(form, values) {
var parameters = [];
$.each(values, function(index, value) {
var currentParams = [];
switch (value) {
case 'reason':
if (form["csd.reason_1"]) {
var dbrationale = form["csd.reason_1"].value;
if (!dbrationale || !dbrationale.trim()) {
alert( 'Custom rationale: Please specify a rationale.' );
parameters = null;
return false;
}
currentParams["1"] = dbrationale;
}
break;
case 'userreq': // U1
if (form["csd.userreq_rationale"]) {
var u1rationale = form["csd.userreq_rationale"].value;
if (mw.config.get('wgNamespaceNumber') === 3 && !((/\//).test(mw.config.get('wgTitle'))) &&
(!u1rationale || !u1rationale.trim())) {
statelem.error( 'CSD U1: Please specify a rationale when nominating user talk pages.' );
parameters = null;
return false;
}
currentParams.rationale = u1rationale;
}
break;
case 'repost': // G4
if (form["csd.repost_1"]) {
var deldisc = form["csd.repost_1"].value;
if (deldisc) {
if (deldisc.substring(0, 9) !== "Wikipedia" && deldisc.substring(0, 3) !== "WP:") {
alert( 'CSD G4: The deletion discussion page name, if provided, must start with "Wikipedia:".' );
parameters = null;
return false;
}
currentParams["1"] = deldisc;
}
}
break;
case 'banned': // G5
if (form["csd.banned_1"] && form["csd.banned_1"].value) {
currentParams["1"] = form["csd.banned_1"].value.replace(/^\s*User:/i, "");
}
break;
case 'histmerge': // G6
if (form["csd.histmerge_1"]) {
var merger = form["csd.histmerge_1"].value;
if (!merger || !merger.trim()) {
alert( 'CSD G6 (histmerge): Please specify the page to be merged.' );
parameters = null;
return false;
}
currentParams["1"] = merger;
}
break;
case 'move': // G6
if (form["csd.move_1"] && form["csd.move_2"]) {
var movepage = form["csd.move_1"].value,
movereason = form["csd.move_2"].value;
if (!movepage || !movepage.trim()) {
alert( 'CSD G6 (move): Please specify the page to be moved here.' );
parameters = null;
return false;
}
if (!movereason || !movereason.trim()) {
alert( 'CSD G6 (move): Please specify the reason for the move.' );
parameters = null;
return false;
}
currentParams["1"] = movepage;
currentParams["2"] = movereason;
}
break;
case 'xfd': // G6
if (form["csd.xfd_fullvotepage"]) {
var xfd = form["csd.xfd_fullvotepage"].value;
if (xfd) {
if (xfd.substring(0, 9) !== "Wikipedia" && xfd.substring(0, 3) !== "WP:") {
alert( 'CSD G6 (XFD): The deletion discussion page name, if provided, must start with "Wikipedia:".' );
parameters = null;
return false;
}
currentParams.fullvotepage = xfd;
}
}
break;
case 'copypaste': // G6
if (form["csd.copypaste_1"]) {
var copypaste = form["csd.copypaste_1"].value;
if (!copypaste || !copypaste.trim()) {
alert( 'CSD G6 (copypaste): Please specify the source page name.' );
parameters = null;
return false;
}
currentParams["1"] = copypaste;
}
break;
case 'g6': // G6
if (form["csd.g6_rationale"] && form["csd.g6_rationale"].value) {
currentParams.rationale = form["csd.g6_rationale"].value;
}
break;
case 'author': // G7
if (form["csd.author_rationale"] && form["csd.author_rationale"].value) {
currentParams.rationale = form["csd.author_rationale"].value;
}
break;
case 'g8': // G8
if (form["csd.g8_rationale"] && form["csd.g8_rationale"].value) {
currentParams.rationale = form["csd.g8_rationale"].value;
}
break;
case 'attack': // G10
currentParams.blanked = 'yes';
// it is actually blanked elsewhere in code, but setting the flag here
break;
case 'copyvio': // G12
if (form["csd.copyvio_url"] && form["csd.copyvio_url"].value) {
currentParams.url = form["csd.copyvio_url"].value;
}
if (form["csd.copyvio_url2"] && form["csd.copyvio_url2"].value) {
currentParams.url2 = form["csd.copyvio_url2"].value;
}
if (form["csd.copyvio_url3"] && form["csd.copyvio_url3"].value) {
currentParams.url3 = form["csd.copyvio_url3"].value;
}
break;
case 'afc': // G13
var query = {
action: "query",
titles: mw.config.get("wgPageName"),
prop: "revisions",
rvprop: "timestamp"
},
api = new Morebits.wiki.api( 'Grabbing the last revision timestamp', query, function( apiobj ) {
var xmlDoc = apiobj.getXML(),
isoDateString = $(xmlDoc).find("rev").attr("timestamp");
currentParams.ts = isoDateString;
});
// Wait for API call to finish
api.post({
async: false
});
break;
case 'redundantimage': // F1
if (form["csd.redundantimage_filename"]) {
var redimage = form["csd.redundantimage_filename"].value;
if (!redimage || !redimage.trim()) {
alert( 'CSD F1: Please specify the filename of the other file.' );
parameters = null;
return false;
}
currentParams.filename = redimage.replace(/^\s*(Image|File):/i, "");
}
break;
case 'badfairuse': // F7
if (form["csd.badfairuse_reason"] && form["csd.badfairuse_reason"].value) {
currentParams.reason = form["csd.badfairuse_reason"].value;
}
break;
case 'nowcommons': // F8
if (form["csd.nowcommons_filename"]) {
var filename = form["csd.nowcommons_filename"].value;
if (filename && filename !== Morebits.pageNameNorm) {
if (filename.indexOf("Image:") === 0 || filename.indexOf("File:") === 0) {
currentParams["1"] = filename;
} else {
currentParams["1"] = "File:" + filename;
}
}
}
currentParams.date = "~~~~~";
break;
case 'imgcopyvio': // F9
if (form["csd.imgcopyvio_url"] && form["csd.imgcopyvio_url"].value) {
currentParams.url = form["csd.imgcopyvio_url"].value;
}
break;
case 'foreign': // A2
if (form["csd.foreign_source"]) {
var foreignlink = form["csd.foreign_source"].value;
if (!foreignlink || !foreignlink.trim()) {
alert( 'CSD A2: Please specify an interwiki link to the article of which this is a copy.' );
parameters = null;
return false;
}
currentParams.source = foreignlink;
}
break;
case 'a10': // A10
if (form["csd.a10_article"]) {
var duptitle = form["csd.a10_article"].value;
if (!duptitle || !duptitle.trim()) {
alert( 'CSD A10: Please specify the name of the article which is duplicated.' );
parameters = null;
return false;
}
currentParams.article = duptitle;
}
break;
case 'duplicatetemplate': // T3
if (form["csd.duplicatetemplate_2"]) {
var t3template = form["csd.duplicatetemplate_2"].value;
if (!t3template || !t3template.trim()) {
alert( 'CSD T3: Please specify the name of a template duplicated by this one.' );
parameters = null;
return false;
}
currentParams["1"] = "~~~~~";
currentParams["2"] = t3template.replace(/^\s*Template:/i, "");
}
break;
case 't3': // T3
if (form["csd.t3_rationale"]) {
var t3rationale = form["csd.t3_rationale"].value;
if (!t3rationale || !t3rationale.trim()) {
alert( 'CSD T3: Please specify a rationale.' );
parameters = null;
return false;
}
currentParams["1"] = "~~~~~";
currentParams.rationale = t3rationale;
}
break;
case 'p1': // P1
if (form["csd.p1_criterion"]) {
var criterion = form["csd.p1_criterion"].value;
if (!criterion || !criterion.trim()) {
alert( 'CSD P1: Please specify a criterion and/or associated rationale.' );
parameters = null;
return false;
}
currentParams["1"] = criterion;
}
break;
default:
break;
}
parameters.push(currentParams);
});
return parameters;
};
// function for processing talk page notification template parameters
Twinkle.speedy.getUserTalkParameters = function twinklespeedyGetUserTalkParameters(normalized, parameters) {
var utparams = [];
switch (normalized) {
case 'db':
utparams["2"] = parameters["1"];
break;
case 'g12':
utparams.key1 = "url";
utparams.value1 = utparams.url = parameters.url;
break;
case 'a10':
utparams.key1 = "article";
utparams.value1 = utparams.article = parameters.article;
break;
default:
break;
}
return utparams;
};
Twinkle.speedy.resolveCsdValues = function twinklespeedyResolveCsdValues(e) {
var values = (e.target.form ? e.target.form : e.target).getChecked('csd');
if (values.length === 0) {
alert( "Please select a criterion!" );
return null;
}
return values;
};
Twinkle.speedy.callback.evaluateSysop = function twinklespeedyCallbackEvaluateSysop(e) {
var form = (e.target.form ? e.target.form : e.target);
var tag_only = form.tag_only;
if( tag_only && tag_only.checked ) {
Twinkle.speedy.callback.evaluateUser(e);
return;
}
var value = Twinkle.speedy.resolveCsdValues(e)[0];
if (!value) {
return;
}
var normalized = Twinkle.speedy.normalizeHash[ value ];
var params = {
value: value,
normalized: normalized,
watch: Twinkle.getPref('watchSpeedyPages').indexOf( normalized ) !== -1,
reason: Twinkle.speedy.reasonHash[ value ],
openusertalk: Twinkle.getPref('openUserTalkPageOnSpeedyDelete').indexOf( normalized ) !== -1,
deleteTalkPage: form.talkpage && form.talkpage.checked,
deleteRedirects: form.redirects.checked
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Twinkle.speedy.callbacks.sysop.main( params );
};
Twinkle.speedy.callback.evaluateUser = function twinklespeedyCallbackEvaluateUser(e) {
var form = (e.target.form ? e.target.form : e.target);
if (e.target.type === "checkbox" || e.target.type === "text" ||
e.target.type === "select") {
return;
}
var values = Twinkle.speedy.resolveCsdValues(e);
if (!values) {
return;
}
//var multiple = form.multiple.checked;
var normalizeds = [];
$.each(values, function(index, value) {
var norm = Twinkle.speedy.normalizeHash[ value ];
// for sysops only
if (['f4', 'f5', 'f6', 'f11'].indexOf(norm) !== -1) {
alert("Tagging with F4, F5, F6, and F11 is not possible using the CSD module. Try using DI instead, or unchecking \"Tag page only\" if you meant to delete the page.");
return;
}
normalizeds.push(norm);
});
// analyse each criterion to determine whether to watch the page/notify the creator
var watchPage = false;
$.each(normalizeds, function(index, norm) {
if (Twinkle.getPref('watchSpeedyPages').indexOf(norm) !== -1) {
watchPage = true;
return false; // break
}
});
var notifyuser = false;
if (form.notify.checked) {
$.each(normalizeds, function(index, norm) {
if (Twinkle.getPref('notifyUserOnSpeedyDeletionNomination').indexOf(norm) !== -1) {
if (norm === 'g6' && ['disambig', 'copypaste'].indexOf(values[index]) === -1) {
return true;
}
notifyuser = true;
return false; // break
}
});
}
var welcomeuser = false;
if (notifyuser) {
$.each(normalizeds, function(index, norm) {
if (Twinkle.getPref('welcomeUserOnSpeedyDeletionNotification').indexOf(norm) !== -1) {
welcomeuser = true;
return false; // break
}
});
}
var csdlog = false;
if (Twinkle.getPref('logSpeedyNominations')) {
$.each(normalizeds, function(index, norm) {
if (Twinkle.getPref('noLogOnSpeedyNomination').indexOf(norm) === -1) {
csdlog = true;
return false; // break
}
});
}
var params = {
values: values,
normalizeds: normalizeds,
watch: watchPage,
usertalk: notifyuser,
welcomeuser: welcomeuser,
lognomination: csdlog,
templateParams: Twinkle.speedy.getParameters( form, values )
};
if (!params.templateParams) {
return;
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( form );
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Tagging complete";
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging page");
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.speedy.callbacks.user.main);
};
})(jQuery);
//</nowiki>
eb515d86fc1abe9e8fb0d1e6815f3c045579d729
MediaWiki:Gadget-twinkleunlink.js
8
125
320
319
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkleunlink.js: Unlink module
****************************************
* Mode of invocation: Tab ("Unlink")
* Active on: Non-special pages
* Config directives in: TwinkleConfig
*/
Twinkle.unlink = function twinkleunlink() {
if( mw.config.get('wgNamespaceNumber') < 0 ) {
return;
}
Twinkle.addPortletLink( Twinkle.unlink.callback, "Unlink", "tw-unlink", "Unlink backlinks" );
};
Twinkle.unlink.getChecked2 = function twinkleunlinkGetChecked2( nodelist ) {
if( !( nodelist instanceof NodeList ) && !( nodelist instanceof HTMLCollection ) ) {
return nodelist.checked ? [ nodelist.values ] : [];
}
var result = [];
for(var i = 0; i < nodelist.length; ++i ) {
if( nodelist[i].checked ) {
result.push( nodelist[i].values );
}
}
return result;
};
// the parameter is used when invoking unlink from admin speedy
Twinkle.unlink.callback = function(presetReason) {
var Window = new Morebits.simpleWindow( 800, 400 );
Window.setTitle( "Unlink backlinks" + (mw.config.get('wgNamespaceNumber') === 6 ? " and file usages" : "") );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#unlink" );
var form = new Morebits.quickForm( Twinkle.unlink.callback.evaluate );
form.append( {
type: 'textarea',
name: 'reason',
label: 'Reason: ',
value: (presetReason ? presetReason : '')
} );
var query;
if(mw.config.get('wgNamespaceNumber') === 6) { // File:
query = {
'action': 'query',
'list': [ 'backlinks', 'imageusage' ],
'bltitle': mw.config.get('wgPageName'),
'iutitle': mw.config.get('wgPageName'),
'bllimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500, // 500 is max for normal users, 5000 for bots and sysops
'iulimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500, // 500 is max for normal users, 5000 for bots and sysops
'blnamespace': Twinkle.getPref('unlinkNamespaces'),
'iunamespace': Twinkle.getPref('unlinkNamespaces')
};
} else {
query = {
'action': 'query',
'list': 'backlinks',
'bltitle': mw.config.get('wgPageName'),
'blfilterredir': 'nonredirects',
'bllimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500, // 500 is max for normal users, 5000 for bots and sysops
'blnamespace': Twinkle.getPref('unlinkNamespaces')
};
}
var wikipedia_api = new Morebits.wiki.api( 'Grabbing backlinks', query, Twinkle.unlink.callbacks.display.backlinks );
wikipedia_api.params = { form: form, Window: Window, image: mw.config.get('wgNamespaceNumber') === 6 };
wikipedia_api.post();
var root = document.createElement( 'div' );
root.style.padding = '15px'; // just so it doesn't look broken
Morebits.status.init( root );
wikipedia_api.statelem.status( "loading..." );
Window.setContent( root );
Window.display();
};
Twinkle.unlink.callback.evaluate = function twinkleunlinkCallbackEvaluate(event) {
Twinkle.unlink.backlinksdone = 0;
Twinkle.unlink.imageusagedone = 0;
function processunlink(pages, imageusage) {
var statusIndicator = new Morebits.status((imageusage ? 'Unlinking instances of file usage' : 'Unlinking backlinks'), '0%');
var total = pages.length; // removing doubling of this number - no apparent reason for it
Morebits.wiki.addCheckpoint();
if( !pages.length ) {
statusIndicator.info( '100% (completed)' );
Morebits.wiki.removeCheckpoint();
return;
}
// get an edit token
var params = { reason: reason, imageusage: imageusage, globalstatus: statusIndicator, current: 0, total: total };
for (var i = 0; i < pages.length; ++i)
{
var myparams = $.extend({}, params);
var articlepage = new Morebits.wiki.page(pages[i], 'Unlinking in article "' + pages[i] + '"');
articlepage.setCallbackParameters(myparams);
articlepage.setBotEdit(true); // unlink considered a floody operation
articlepage.load(imageusage ? Twinkle.unlink.callbacks.unlinkImageInstances : Twinkle.unlink.callbacks.unlinkBacklinks);
}
}
var reason = event.target.reason.value;
if (!reason) {
alert("You must specify a reason for unlinking.");
return;
}
var backlinks, imageusage;
if( event.target.backlinks ) {
backlinks = Twinkle.unlink.getChecked2(event.target.backlinks);
}
if( event.target.imageusage ) {
imageusage = Twinkle.unlink.getChecked2(event.target.imageusage);
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( event.target );
Morebits.wiki.addCheckpoint();
if (backlinks) {
processunlink(backlinks, false);
}
if (imageusage) {
processunlink(imageusage, true);
}
Morebits.wiki.removeCheckpoint();
};
Twinkle.unlink.backlinksdone = 0;
Twinkle.unlink.imageusagedone = 0;
Twinkle.unlink.callbacks = {
display: {
backlinks: function twinkleunlinkCallbackDisplayBacklinks(apiobj) {
var xmlDoc = apiobj.responseXML;
var havecontent = false;
var list, namespaces, i;
if( apiobj.params.image ) {
var imageusage = $(xmlDoc).find('query imageusage iu');
list = [];
for ( i = 0; i < imageusage.length; ++i ) {
var usagetitle = imageusage[i].getAttribute('title');
list.push( { label: usagetitle, value: usagetitle, checked: true } );
}
if (!list.length)
{
apiobj.params.form.append( { type: 'div', label: 'No instances of file usage found.' } );
}
else
{
apiobj.params.form.append( { type:'header', label: 'File usage' } );
namespaces = [];
$.each(Twinkle.getPref('unlinkNamespaces'), function(k, v) {
namespaces.push(Morebits.wikipedia.namespacesFriendly[v]);
});
apiobj.params.form.append( {
type: 'div',
label: "Selected namespaces: " + namespaces.join(', '),
tooltip: "You can change this with your Twinkle preferences, at [[WP:TWPREFS]]"
});
if ($(xmlDoc).find('query-continue').length) {
apiobj.params.form.append( {
type: 'div',
label: "First " + list.length.toString() + " file usages shown."
});
}
apiobj.params.form.append( {
type: 'checkbox',
name: 'imageusage',
list: list
} );
havecontent = true;
}
}
var backlinks = $(xmlDoc).find('query backlinks bl');
if( backlinks.length > 0 ) {
list = [];
for ( i = 0; i < backlinks.length; ++i ) {
var title = backlinks[i].getAttribute('title');
list.push( { label: title, value: title, checked: true } );
}
apiobj.params.form.append( { type:'header', label: 'Backlinks' } );
namespaces = [];
$.each(Twinkle.getPref('unlinkNamespaces'), function(k, v) {
namespaces.push(Morebits.wikipedia.namespacesFriendly[v]);
});
apiobj.params.form.append( {
type: 'div',
label: "Selected namespaces: " + namespaces.join(', '),
tooltip: "You can change this with your Twinkle preferences, at [[WP:TWPREFS]]"
});
if ($(xmlDoc).find('query-continue').length) {
apiobj.params.form.append( {
type: 'div',
label: "First " + list.length.toString() + " backlinks shown."
});
}
apiobj.params.form.append( {
type: 'checkbox',
name: 'backlinks',
list: list
});
havecontent = true;
}
else
{
apiobj.params.form.append( { type: 'div', label: 'No backlinks found.' } );
}
if (havecontent) {
apiobj.params.form.append( { type:'submit' } );
}
var result = apiobj.params.form.render();
apiobj.params.Window.setContent( result );
}
},
unlinkBacklinks: function twinkleunlinkCallbackUnlinkBacklinks(pageobj) {
var text, oldtext;
text = oldtext = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var wikiPage = new Morebits.wikitext.page(text);
wikiPage.removeLink(Morebits.pageNameNorm);
text = wikiPage.getText();
if (text === oldtext) {
// Nothing to do, return
Twinkle.unlink.callbacks.success(pageobj);
Morebits.wiki.actionCompleted();
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary("Removing link(s) to \"" + Morebits.pageNameNorm + "\": " + params.reason + "." + Twinkle.getPref('summaryAd'));
pageobj.setCreateOption('nocreate');
pageobj.save(Twinkle.unlink.callbacks.success);
},
unlinkImageInstances: function twinkleunlinkCallbackUnlinkImageInstances(pageobj) {
var text, oldtext;
text = oldtext = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var wikiPage = new Morebits.wikitext.page(text);
wikiPage.commentOutImage(mw.config.get('wgTitle'), 'Commented out');
text = wikiPage.getText();
if (text === oldtext) {
// Nothing to do, return
Twinkle.unlink.callbacks.success(pageobj);
Morebits.wiki.actionCompleted();
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary("Commenting out use(s) of file \"" + Morebits.pageNameNorm + "\": " + params.reason + "." + Twinkle.getPref('summaryAd'));
pageobj.setCreateOption('nocreate');
pageobj.save(Twinkle.unlink.callbacks.success);
},
success: function twinkleunlinkCallbackSuccess(pageobj) {
var params = pageobj.getCallbackParameters();
var total = params.total;
var now = parseInt( 100 * (params.imageusage ? ++(Twinkle.unlink.imageusagedone) : ++(Twinkle.unlink.backlinksdone))/total, 10 ) + '%';
params.globalstatus.update( now );
if((params.imageusage ? Twinkle.unlink.imageusagedone : Twinkle.unlink.backlinksdone) >= total) {
params.globalstatus.info( now + ' (completed)' );
Morebits.wiki.removeCheckpoint();
}
}
};
})(jQuery);
//</nowiki>
8c4807671ea61aa5c6bddfa90c4059454fd3e136
319
2013-07-13T18:10:00Z
AzaToth
0
v2.0-556-g0beacc0: use .utc() for timestamps and format them the sme way as the wiki does
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinkleunlink.js: Unlink module
****************************************
* Mode of invocation: Tab ("Unlink")
* Active on: Non-special pages
* Config directives in: TwinkleConfig
*/
Twinkle.unlink = function twinkleunlink() {
if( mw.config.get('wgNamespaceNumber') < 0 ) {
return;
}
Twinkle.addPortletLink( Twinkle.unlink.callback, "Unlink", "tw-unlink", "Unlink backlinks" );
};
Twinkle.unlink.getChecked2 = function twinkleunlinkGetChecked2( nodelist ) {
if( !( nodelist instanceof NodeList ) && !( nodelist instanceof HTMLCollection ) ) {
return nodelist.checked ? [ nodelist.values ] : [];
}
var result = [];
for(var i = 0; i < nodelist.length; ++i ) {
if( nodelist[i].checked ) {
result.push( nodelist[i].values );
}
}
return result;
};
// the parameter is used when invoking unlink from admin speedy
Twinkle.unlink.callback = function(presetReason) {
var Window = new Morebits.simpleWindow( 800, 400 );
Window.setTitle( "Unlink backlinks" + (mw.config.get('wgNamespaceNumber') === 6 ? " and file usages" : "") );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#unlink" );
var form = new Morebits.quickForm( Twinkle.unlink.callback.evaluate );
form.append( {
type: 'textarea',
name: 'reason',
label: 'Reason: ',
value: (presetReason ? presetReason : '')
} );
var query;
if(mw.config.get('wgNamespaceNumber') === 6) { // File:
query = {
'action': 'query',
'list': [ 'backlinks', 'imageusage' ],
'bltitle': mw.config.get('wgPageName'),
'iutitle': mw.config.get('wgPageName'),
'bllimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500, // 500 is max for normal users, 5000 for bots and sysops
'iulimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500, // 500 is max for normal users, 5000 for bots and sysops
'blnamespace': Twinkle.getPref('unlinkNamespaces'),
'iunamespace': Twinkle.getPref('unlinkNamespaces')
};
} else {
query = {
'action': 'query',
'list': 'backlinks',
'bltitle': mw.config.get('wgPageName'),
'blfilterredir': 'nonredirects',
'bllimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500, // 500 is max for normal users, 5000 for bots and sysops
'blnamespace': Twinkle.getPref('unlinkNamespaces')
};
}
var wikipedia_api = new Morebits.wiki.api( 'Grabbing backlinks', query, Twinkle.unlink.callbacks.display.backlinks );
wikipedia_api.params = { form: form, Window: Window, image: mw.config.get('wgNamespaceNumber') === 6 };
wikipedia_api.post();
var root = document.createElement( 'div' );
root.style.padding = '15px'; // just so it doesn't look broken
Morebits.status.init( root );
wikipedia_api.statelem.status( "loading..." );
Window.setContent( root );
Window.display();
};
Twinkle.unlink.callback.evaluate = function twinkleunlinkCallbackEvaluate(event) {
Twinkle.unlink.backlinksdone = 0;
Twinkle.unlink.imageusagedone = 0;
function processunlink(pages, imageusage) {
var statusIndicator = new Morebits.status((imageusage ? 'Unlinking instances of file usage' : 'Unlinking backlinks'), '0%');
var total = pages.length; // removing doubling of this number - no apparent reason for it
Morebits.wiki.addCheckpoint();
if( !pages.length ) {
statusIndicator.info( '100% (completed)' );
Morebits.wiki.removeCheckpoint();
return;
}
// get an edit token
var params = { reason: reason, imageusage: imageusage, globalstatus: statusIndicator, current: 0, total: total };
for (var i = 0; i < pages.length; ++i)
{
var myparams = $.extend({}, params);
var articlepage = new Morebits.wiki.page(pages[i], 'Unlinking in article "' + pages[i] + '"');
articlepage.setCallbackParameters(myparams);
articlepage.setBotEdit(true); // unlink considered a floody operation
articlepage.load(imageusage ? Twinkle.unlink.callbacks.unlinkImageInstances : Twinkle.unlink.callbacks.unlinkBacklinks);
}
}
var reason = event.target.reason.value;
if (!reason) {
alert("You must specify a reason for unlinking.");
return;
}
var backlinks, imageusage;
if( event.target.backlinks ) {
backlinks = Twinkle.unlink.getChecked2(event.target.backlinks);
}
if( event.target.imageusage ) {
imageusage = Twinkle.unlink.getChecked2(event.target.imageusage);
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( event.target );
Morebits.wiki.addCheckpoint();
if (backlinks) {
processunlink(backlinks, false);
}
if (imageusage) {
processunlink(imageusage, true);
}
Morebits.wiki.removeCheckpoint();
};
Twinkle.unlink.backlinksdone = 0;
Twinkle.unlink.imageusagedone = 0;
Twinkle.unlink.callbacks = {
display: {
backlinks: function twinkleunlinkCallbackDisplayBacklinks(apiobj) {
var xmlDoc = apiobj.responseXML;
var havecontent = false;
var list, namespaces, i;
if( apiobj.params.image ) {
var imageusage = $(xmlDoc).find('query imageusage iu');
list = [];
for ( i = 0; i < imageusage.length; ++i ) {
var usagetitle = imageusage[i].getAttribute('title');
list.push( { label: usagetitle, value: usagetitle, checked: true } );
}
if (!list.length)
{
apiobj.params.form.append( { type: 'div', label: 'No instances of file usage found.' } );
}
else
{
apiobj.params.form.append( { type:'header', label: 'File usage' } );
namespaces = [];
$.each(Twinkle.getPref('unlinkNamespaces'), function(k, v) {
namespaces.push(Morebits.wikipedia.namespacesFriendly[v]);
});
apiobj.params.form.append( {
type: 'div',
label: "Selected namespaces: " + namespaces.join(', '),
tooltip: "You can change this with your Twinkle preferences, at [[WP:TWPREFS]]"
});
if ($(xmlDoc).find('query-continue').length) {
apiobj.params.form.append( {
type: 'div',
label: "First " + list.length.toString() + " file usages shown."
});
}
apiobj.params.form.append( {
type: 'checkbox',
name: 'imageusage',
list: list
} );
havecontent = true;
}
}
var backlinks = $(xmlDoc).find('query backlinks bl');
if( backlinks.length > 0 ) {
list = [];
for ( i = 0; i < backlinks.length; ++i ) {
var title = backlinks[i].getAttribute('title');
list.push( { label: title, value: title, checked: true } );
}
apiobj.params.form.append( { type:'header', label: 'Backlinks' } );
namespaces = [];
$.each(Twinkle.getPref('unlinkNamespaces'), function(k, v) {
namespaces.push(Morebits.wikipedia.namespacesFriendly[v]);
});
apiobj.params.form.append( {
type: 'div',
label: "Selected namespaces: " + namespaces.join(', '),
tooltip: "You can change this with your Twinkle preferences, at [[WP:TWPREFS]]"
});
if ($(xmlDoc).find('query-continue').length) {
apiobj.params.form.append( {
type: 'div',
label: "First " + list.length.toString() + " backlinks shown."
});
}
apiobj.params.form.append( {
type: 'checkbox',
name: 'backlinks',
list: list
});
havecontent = true;
}
else
{
apiobj.params.form.append( { type: 'div', label: 'No backlinks found.' } );
}
if (havecontent) {
apiobj.params.form.append( { type:'submit' } );
}
var result = apiobj.params.form.render();
apiobj.params.Window.setContent( result );
}
},
unlinkBacklinks: function twinkleunlinkCallbackUnlinkBacklinks(pageobj) {
var text, oldtext;
text = oldtext = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var wikiPage = new Morebits.wikitext.page(text);
wikiPage.removeLink(Morebits.pageNameNorm);
text = wikiPage.getText();
if (text === oldtext) {
// Nothing to do, return
Twinkle.unlink.callbacks.success(pageobj);
Morebits.wiki.actionCompleted();
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary("Removing link(s) to \"" + Morebits.pageNameNorm + "\": " + params.reason + "." + Twinkle.getPref('summaryAd'));
pageobj.setCreateOption('nocreate');
pageobj.save(Twinkle.unlink.callbacks.success);
},
unlinkImageInstances: function twinkleunlinkCallbackUnlinkImageInstances(pageobj) {
var text, oldtext;
text = oldtext = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var wikiPage = new Morebits.wikitext.page(text);
wikiPage.commentOutImage(mw.config.get('wgTitle'), 'Commented out');
text = wikiPage.getText();
if (text === oldtext) {
// Nothing to do, return
Twinkle.unlink.callbacks.success(pageobj);
Morebits.wiki.actionCompleted();
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary("Commenting out use(s) of file \"" + Morebits.pageNameNorm + "\": " + params.reason + "." + Twinkle.getPref('summaryAd'));
pageobj.setCreateOption('nocreate');
pageobj.save(Twinkle.unlink.callbacks.success);
},
success: function twinkleunlinkCallbackSuccess(pageobj) {
var params = pageobj.getCallbackParameters();
var total = params.total;
var now = parseInt( 100 * (params.imageusage ? ++(Twinkle.unlink.imageusagedone) : ++(Twinkle.unlink.backlinksdone))/total, 10 ) + '%';
params.globalstatus.update( now );
if((params.imageusage ? Twinkle.unlink.imageusagedone : Twinkle.unlink.backlinksdone) >= total) {
params.globalstatus.info( now + ' (completed)' );
Morebits.wiki.removeCheckpoint();
}
}
};
})(jQuery);
//</nowiki>
8c4807671ea61aa5c6bddfa90c4059454fd3e136
MediaWiki:Gadget-twinklewarn.js
8
121
312
311
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklewarn.js: Warn module
****************************************
* Mode of invocation: Tab ("Warn")
* Active on: User talk pages
* Config directives in: TwinkleConfig
*/
Twinkle.warn = function twinklewarn() {
if( mw.config.get('wgNamespaceNumber') === 3 ) {
Twinkle.addPortletLink( Twinkle.warn.callback, "Warn", "tw-warn", "Warn/notify user" );
}
// modify URL of talk page on rollback success pages
if( mw.config.get('wgAction') === 'rollback' ) {
var $vandalTalkLink = $("#mw-rollback-success").find(".mw-usertoollinks a").first();
$vandalTalkLink.css("font-weight", "bold");
$vandalTalkLink.wrapInner($("<span/>").attr("title", "If appropriate, you can use Twinkle to warn the user about their edits to this page."));
var extraParam = "vanarticle=" + mw.util.rawurlencode(Morebits.pageNameNorm);
var href = $vandalTalkLink.attr("href");
if (href.indexOf("?") === -1) {
$vandalTalkLink.attr("href", href + "?" + extraParam);
} else {
$vandalTalkLink.attr("href", href + "&" + extraParam);
}
}
};
Twinkle.warn.callback = function twinklewarnCallback() {
if( mw.config.get('wgTitle').split( '/' )[0] === mw.config.get('wgUserName') &&
!confirm( 'You are about to warn yourself! Are you sure you want to proceed?' ) ) {
return;
}
var Window = new Morebits.simpleWindow( 600, 440 );
Window.setTitle( "Warn/notify user" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Choosing a warning level", "WP:UWUL#Levels" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#warn" );
var form = new Morebits.quickForm( Twinkle.warn.callback.evaluate );
var main_select = form.append( {
type: 'field',
label: 'Choose type of warning/notice to issue',
tooltip: 'First choose a main warning group, then the specific warning to issue.'
} );
var main_group = main_select.append( {
type: 'select',
name: 'main_group',
event:Twinkle.warn.callback.change_category
} );
var defaultGroup = parseInt(Twinkle.getPref('defaultWarningGroup'), 10);
main_group.append( { type: 'option', label: 'General note (1)', value: 'level1', selected: ( defaultGroup === 1 || defaultGroup < 1 || ( Morebits.userIsInGroup( 'sysop' ) ? defaultGroup > 8 : defaultGroup > 7 ) ) } );
main_group.append( { type: 'option', label: 'Caution (2)', value: 'level2', selected: ( defaultGroup === 2 ) } );
main_group.append( { type: 'option', label: 'Warning (3)', value: 'level3', selected: ( defaultGroup === 3 ) } );
main_group.append( { type: 'option', label: 'Final warning (4)', value: 'level4', selected: ( defaultGroup === 4 ) } );
main_group.append( { type: 'option', label: 'Only warning (4im)', value: 'level4im', selected: ( defaultGroup === 5 ) } );
main_group.append( { type: 'option', label: 'Single issue notices', value: 'singlenotice', selected: ( defaultGroup === 6 ) } );
main_group.append( { type: 'option', label: 'Single issue warnings', value: 'singlewarn', selected: ( defaultGroup === 7 ) } );
if( Twinkle.getPref( 'customWarningList' ).length ) {
main_group.append( { type: 'option', label: 'Custom warnings', value: 'custom', selected: ( defaultGroup === 9 ) } );
}
if( Morebits.userIsInGroup( 'sysop' ) ) {
main_group.append( { type: 'option', label: 'Blocking', value: 'block', selected: ( defaultGroup === 8 ) } );
}
main_select.append( { type: 'select', name: 'sub_group', event:Twinkle.warn.callback.change_subcategory } ); //Will be empty to begin with.
form.append( {
type: 'input',
name: 'article',
label: 'Linked article',
value:( Morebits.queryString.exists( 'vanarticle' ) ? Morebits.queryString.get( 'vanarticle' ) : '' ),
tooltip: 'An article can be linked within the notice, perhaps because it was a revert to said article that dispatched this notice. Leave empty for no article to be linked.'
} );
var more = form.append( { type: 'field', name: 'reasonGroup', label: 'Warning information' } );
more.append( { type: 'textarea', label: 'Optional message:', name: 'reason', tooltip: 'Perhaps a reason, or that a more detailed notice must be appended' } );
var previewlink = document.createElement( 'a' );
$(previewlink).click(function(){
Twinkle.warn.callbacks.preview(result); // |result| is defined below
});
previewlink.style.cursor = "pointer";
previewlink.textContent = 'Preview';
more.append( { type: 'div', id: 'warningpreview', label: [ previewlink ] } );
more.append( { type: 'div', id: 'twinklewarn-previewbox', style: 'display: none' } );
more.append( { type: 'submit', label: 'Submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
result.main_group.root = result;
result.previewer = new Morebits.wiki.preview($(result).find('div#twinklewarn-previewbox').last()[0]);
// We must init the first choice (General Note);
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.main_group.dispatchEvent( evt );
};
// This is all the messages that might be dispatched by the code
// Each of the individual templates require the following information:
// label (required): A short description displayed in the dialog
// summary (required): The edit summary used. If an article name is entered, the summary is postfixed with "on [[article]]", and it is always postfixed with ". $summaryAd"
// suppressArticleInSummary (optional): Set to true to suppress showing the article name in the edit summary. Useful if the warning relates to attack pages, or some such.
Twinkle.warn.messages = {
level1: {
"Common warnings": {
"uw-vandalism1": {
label: "Vandalism",
summary: "General note: Unconstructive editing"
},
"uw-disruptive1": {
label: "Disruptive editing",
summary: "General note: Unconstructive editing"
},
"uw-test1": {
label: "Editing tests",
summary: "General note: Editing tests"
},
"uw-delete1": {
label: "Removal of content, blanking",
summary: "General note: Removal of content, blanking"
}
},
"Behavior in articles": {
"uw-biog1": {
label: "Adding unreferenced controversial information about living persons",
summary: "General note: Adding unreferenced controversial information about living persons"
},
"uw-defam1": {
label: "Addition of defamatory content",
summary: "General note: Addition of defamatory content"
},
"uw-error1": {
label: "Introducing deliberate factual errors",
summary: "General note: Introducing factual errors"
},
"uw-genre1": {
label: "Frequent or mass changes to genres without consensus or references",
summary: "General note: Frequent or mass changes to genres without consensus or references"
},
"uw-image1": {
label: "Image-related vandalism in articles",
summary: "General note: Image-related vandalism in articles"
},
"uw-joke1": {
label: "Using improper humor in articles",
summary: "General note: Using improper humor in articles"
},
"uw-nor1": {
label: "Adding original research, including unpublished syntheses of sources",
summary: "General note: Adding original research, including unpublished syntheses of sources"
},
"uw-notcensored1": {
label: "Censorship of material",
summary: "General note: Censorship of material"
},
"uw-own1": {
label: "Ownership of articles",
summary: "General note: Ownership of articles"
},
"uw-tdel1": {
label: "Removal of maintenance templates",
summary: "General note: Removal of maintenance templates"
},
"uw-unsourced1": {
label: "Addition of unsourced or improperly cited material",
summary: "General note: Addition of unsourced or improperly cited material"
}
},
"Promotions and spam": {
"uw-advert1": {
label: "Using Wikipedia for advertising or promotion",
summary: "General note: Using Wikipedia for advertising or promotion"
},
"uw-npov1": {
label: "Not adhering to neutral point of view",
summary: "General note: Not adhering to neutral point of view"
},
"uw-spam1": {
label: "Adding spam links",
summary: "General note: Adding spam links"
}
},
"Behavior towards other editors": {
"uw-agf1": {
label: "Not assuming good faith",
summary: "General note: Not assuming good faith"
},
"uw-harass1": {
label: "Harassment of other users",
summary: "General note: Harassment of other users"
},
"uw-npa1": {
label: "Personal attack directed at a specific editor",
summary: "General note: Personal attack directed at a specific editor"
},
"uw-tempabuse1": {
label: "Improper use of warning or blocking template",
summary: "General note: Improper use of warning or blocking template"
}
},
"Removal of deletion tags": {
"uw-afd1": {
label: "Removing {{afd}} templates",
summary: "General note: Removing {{afd}} templates"
},
"uw-blpprod1": {
label: "Removing {{blp prod}} templates",
summary: "General note: Removing {{blp prod}} templates"
},
"uw-idt1": {
label: "Removing file deletion tags",
summary: "General note: Removing file deletion tags"
},
"uw-speedy1": {
label: "Removing speedy deletion tags",
summary: "General note: Removing speedy deletion tags"
}
},
"Other": {
"uw-chat1": {
label: "Using talk page as forum",
summary: "General note: Using talk page as forum"
},
"uw-create1": {
label: "Creating inappropriate pages",
summary: "General note: Creating inappropriate pages"
},
"uw-mos1": {
label: "Manual of style",
summary: "General note: Formatting, date, language, etc (Manual of style)"
},
"uw-move1": {
label: "Page moves against naming conventions or consensus",
summary: "General note: Page moves against naming conventions or consensus"
},
"uw-tpv1": {
label: "Refactoring others' talk page comments",
summary: "General note: Refactoring others' talk page comments"
},
"uw-upload1": {
label: "Uploading unencyclopedic images",
summary: "General note: Uploading unencyclopedic images"
}
}/*,
"To be removed from Twinkle": {
"uw-redirect1": {
label: "Creating malicious redirects",
summary: "General note: Creating malicious redirects"
},
"uw-ics1": {
label: "Uploading files missing copyright status",
summary: "General note: Uploading files missing copyright status"
},
"uw-af1": {
label: "Inappropriate feedback through the Article Feedback Tool",
summary: "General note: Inappropriate feedback through the Article Feedback Tool"
}
}*/
},
level2: {
"Common warnings": {
"uw-vandalism2": {
label: "Vandalism",
summary: "Caution: Unconstructive editing"
},
"uw-disruptive2": {
label: "Disruptive editing",
summary: "Caution: Unconstructive editing"
},
"uw-test2": {
label: "Editing tests",
summary: "Caution: Editing tests"
},
"uw-delete2": {
label: "Removal of content, blanking",
summary: "Caution: Removal of content, blanking"
}
},
"Behavior in articles": {
"uw-biog2": {
label: "Adding unreferenced controversial information about living persons",
summary: "Caution: Adding unreferenced controversial information about living persons"
},
"uw-defam2": {
label: "Addition of defamatory content",
summary: "Caution: Addition of defamatory content"
},
"uw-error2": {
label: "Introducing deliberate factual errors",
summary: "Caution: Introducing factual errors"
},
"uw-genre2": {
label: "Frequent or mass changes to genres without consensus or references",
summary: "Caution: Frequent or mass changes to genres without consensus or references"
},
"uw-image2": {
label: "Image-related vandalism in articles",
summary: "Caution: Image-related vandalism in articles"
},
"uw-joke2": {
label: "Using improper humor in articles",
summary: "Caution: Using improper humor in articles"
},
"uw-nor2": {
label: "Adding original research, including unpublished syntheses of sources",
summary: "Caution: Adding original research, including unpublished syntheses of sources"
},
"uw-notcensored2": {
label: "Censorship of material",
summary: "Caution: Censorship of material"
},
"uw-own2": {
label: "Ownership of articles",
summary: "Caution: Ownership of articles"
},
"uw-tdel2": {
label: "Removal of maintenance templates",
summary: "Caution: Removal of maintenance templates"
},
"uw-unsourced2": {
label: "Addition of unsourced or improperly cited material",
summary: "Caution: Addition of unsourced or improperly cited material"
}
},
"Promotions and spam": {
"uw-advert2": {
label: "Using Wikipedia for advertising or promotion",
summary: "Caution: Using Wikipedia for advertising or promotion"
},
"uw-npov2": {
label: "Not adhering to neutral point of view",
summary: "Caution: Not adhering to neutral point of view"
},
"uw-spam2": {
label: "Adding spam links",
summary: "Caution: Adding spam links"
}
},
"Behavior towards other editors": {
"uw-agf2": {
label: "Not assuming good faith",
summary: "Caution: Not assuming good faith"
},
"uw-harass2": {
label: "Harassment of other users",
summary: "Caution: Harassment of other users"
},
"uw-npa2": {
label: "Personal attack directed at a specific editor",
summary: "Caution: Personal attack directed at a specific editor"
},
"uw-tempabuse2": {
label: "Improper use of warning or blocking template",
summary: "Caution: Improper use of warning or blocking template"
}
},
"Removal of deletion tags": {
"uw-afd2": {
label: "Removing {{afd}} templates",
summary: "Caution: Removing {{afd}} templates"
},
"uw-blpprod2": {
label: "Removing {{blp prod}} templates",
summary: "Caution: Removing {{blp prod}} templates"
},
"uw-idt2": {
label: "Removing file deletion tags",
summary: "Caution: Removing file deletion tags"
},
"uw-speedy2": {
label: "Removing speedy deletion tags",
summary: "Caution: Removing speedy deletion tags"
}
},
"Other": {
"uw-chat2": {
label: "Using talk page as forum",
summary: "Caution: Using talk page as forum"
},
"uw-create2": {
label: "Creating inappropriate pages",
summary: "Caution: Creating inappropriate pages"
},
"uw-mos2": {
label: "Manual of style",
summary: "Caution: Formatting, date, language, etc (Manual of style)"
},
"uw-move2": {
label: "Page moves against naming conventions or consensus",
summary: "Caution: Page moves against naming conventions or consensus"
},
"uw-tpv2": {
label: "Refactoring others' talk page comments",
summary: "Caution: Refactoring others' talk page comments"
},
"uw-upload2": {
label: "Uploading unencyclopedic images",
summary: "Caution: Uploading unencyclopedic images"
}
}/*,
"To be removed from Twinkle": {
"uw-redirect2": {
label: "Creating malicious redirects",
summary: "Caution: Creating malicious redirects"
},
"uw-ics2": {
label: "Uploading files missing copyright status",
summary: "Caution: Uploading files missing copyright status"
},
"uw-af2": {
label: "Inappropriate feedback through the Article Feedback Tool",
summary: "Caution: Inappropriate feedback through the Article Feedback Tool"
}
}*/
},
level3: {
"Common warnings": {
"uw-vandalism3": {
label: "Vandalism",
summary: "Warning: Vandalism"
},
"uw-disruptive3": {
label: "Disruptive editing",
summary: "Warning: Disruptive editing"
},
"uw-test3": {
label: "Editing tests",
summary: "Warning: Editing tests"
},
"uw-delete3": {
label: "Removal of content, blanking",
summary: "Warning: Removal of content, blanking"
}
},
"Behavior in articles": {
"uw-biog3": {
label: "Adding unreferenced controversial/defamatory information about living persons",
summary: "Warning: Adding unreferenced controversial information about living persons"
},
"uw-defam3": {
label: "Addition of defamatory content",
summary: "Warning: Addition of defamatory content"
},
"uw-error3": {
label: "Introducing deliberate factual errors",
summary: "Warning: Introducing deliberate factual errors"
},
"uw-genre3": {
label: "Frequent or mass changes to genres without consensus or reference",
summary: "Warning: Frequent or mass changes to genres without consensus or reference"
},
"uw-image3": {
label: "Image-related vandalism in articles",
summary: "Warning: Image-related vandalism in articles"
},
"uw-joke3": {
label: "Using improper humor in articles",
summary: "Warning: Using improper humor in articles"
},
"uw-nor3": {
label: "Adding original research, including unpublished syntheses of sources",
summary: "Warning: Adding original research, including unpublished syntheses of sources"
},
"uw-notcensored3": {
label: "Censorship of material",
summary: "Warning: Censorship of material"
},
"uw-own3": {
label: "Ownership of articles",
summary: "Warning: Ownership of articles"
},
"uw-tdel3": {
label: "Removal of maintenance templates",
summary: "Warning: Removal of maintenance templates"
},
"uw-unsourced3": {
label: "Addition of unsourced or improperly cited material",
summary: "Warning: Addition of unsourced or improperly cited material"
}
},
"Promotions and spam": {
"uw-advert3": {
label: "Using Wikipedia for advertising or promotion",
summary: "Warning: Using Wikipedia for advertising or promotion"
},
"uw-npov3": {
label: "Not adhering to neutral point of view",
summary: "Warning: Not adhering to neutral point of view"
},
"uw-spam3": {
label: "Adding spam links",
summary: "Warning: Adding spam links"
}
},
"Behavior towards other users": {
"uw-agf3": {
label: "Not assuming good faith",
summary: "Warning: Not assuming good faith"
},
"uw-harass3": {
label: "Harassment of other users",
summary: "Warning: Harassment of other users"
},
"uw-npa3": {
label: "Personal attack directed at a specific editor",
summary: "Warning: Personal attack directed at a specific editor"
}
},
"Removal of deletion tags": {
"uw-afd3": {
label: "Removing {{afd}} templates",
summary: "Warning: Removing {{afd}} templates"
},
"uw-blpprod3": {
label: "Removing {{blpprod}} templates",
summary: "Warning: Removing {{blpprod}} templates"
},
"uw-idt3": {
label: "Removing file deletion tags",
summary: "Warning: Removing file deletion tags"
},
"uw-speedy3": {
label: "Removing speedy deletion tags",
summary: "Warning: Removing speedy deletion tags"
}
},
"Other": {
"uw-chat3": {
label: "Using talk page as forum",
summary: "Warning: Using talk page as forum"
},
"uw-create3": {
label: "Creating inappropriate pages",
summary: "Warning: Creating inappropriate pages"
},
"uw-mos3": {
label: "Manual of style",
summary: "Warning: Formatting, date, language, etc (Manual of style)"
},
"uw-move3": {
label: "Page moves against naming conventions or consensus",
summary: "Warning: Page moves against naming conventions or consensus"
},
"uw-tpv3": {
label: "Refactoring others' talk page comments",
summary: "Warning: Refactoring others' talk page comments"
},
"uw-upload3": {
label: "Uploading unencyclopedic images",
summary: "Warning: Uploading unencyclopedic images"
}
}/*,
"To be removed fomr Twinkle": {
"uw-af3": {
label: "Inappropriate feedback through the Article Feedback Tool",
summary: "Warning: Inappropriate feedback through the Article Feedback Tool"
},
"uw-ics3": {
label: "Uploading files missing copyright status",
summary: "Warning: Uploading files missing copyright status"
},
"uw-redirect3": {
label: "Creating malicious redirects",
summary: "Warning: Creating malicious redirects"
}
}*/
},
level4: {
"Common warnings": {
"uw-generic4": {
label: "Generic warning (for template series missing level 4)",
summary: "Final warning notice"
},
"uw-vandalism4": {
label: "Vandalism",
summary: "Final warning: Vandalism"
},
"uw-delete4": {
label: "Removal of content, blanking",
summary: "Final warning: Removal of content, blanking"
}
},
"Behavior in articles": {
"uw-biog4": {
label: "Adding unreferenced defamatory information about living persons",
summary: "Final warning: Adding unreferenced controversial information about living persons"
},
"uw-defam4": {
label: "Addition of defamatory content",
summary: "Final warning: Addition of defamatory content"
},
"uw-error4": {
label: "Introducing deliberate factual errors",
summary: "Final warning: Introducing deliberate factual errors"
},
"uw-genre4": {
label: "Frequent or mass changes to genres without consensus or reference",
summary: "Final warning: Frequent or mass changes to genres without consensus or reference"
},
"uw-image4": {
label: "Image-related vandalism in articles",
summary: "Final warning: Image-related vandalism in articles"
},
"uw-joke4": {
label: "Using improper humor in articles",
summary: "Final warning: Using improper humor in articles"
},
"uw-nor4": {
label: "Adding original research, including unpublished syntheses of sources",
summary: "Final warning: Adding original research, including unpublished syntheses of sources"
},
"uw-tdel4": {
label: "Removal of maintenance templates",
summary: "Final warning: Removal of maintenance templates"
},
"uw-unsourced4": {
label: "Addition of unsourced or improperly cited material",
summary: "Final warning: Addition of unsourced or improperly cited material"
}
},
"Promotions and spam": {
"uw-advert4": {
label: "Using Wikipedia for advertising or promotion",
summary: "Final warning: Using Wikipedia for advertising or promotion"
},
"uw-npov4": {
label: "Not adhering to neutral point of view",
summary: "Final warning: Not adhering to neutral point of view"
},
"uw-spam4": {
label: "Adding spam links",
summary: "Final warning: Adding spam links"
}
},
"Behavior towards other editors": {
"uw-harass4": {
label: "Harassment of other users",
summary: "Final warning: Harassment of other users"
},
"uw-npa4": {
label: "Personal attack directed at a specific editor",
summary: "Final warning: Personal attack directed at a specific editor"
}
},
"Removal of deletion tags": {
"uw-afd4": {
label: "Removing {{afd}} templates",
summary: "Final warning: Removing {{afd}} templates"
},
"uw-blpprod4": {
label: "Removing {{blp prod}} templates",
summary: "Final warning: Removing {{blp prod}} templates"
},
"uw-idt4": {
label: "Removing file deletion tags",
summary: "Final warning: Removing file deletion tags"
},
"uw-speedy4": {
label: "Removing speedy deletion tags",
summary: "Final warning: Removing speedy deletion tags"
}
},
"Other": {
"uw-chat4": {
label: "Using talk page as forum",
summary: "Final warning: Using talk page as forum"
},
"uw-create4": {
label: "Creating inappropriate pages",
summary: "Final warning: Creating inappropriate pages"
},
"uw-mos4": {
label: "Manual of style",
summary: "Final warning: Formatting, date, language, etc (Manual of style)"
},
"uw-move4": {
label: "Page moves against naming conventions or consensus",
summary: "Final warning: Page moves against naming conventions or consensus"
},
"uw-tpv4": {
label: "Refactoring others' talk page comments",
summary: "Final warning: Refactoring others' talk page comments"
},
"uw-upload4": {
label: "Uploading unencyclopedic images",
summary: "Final warning: Uploading unencyclopedic images"
}
}/*,
"To be removed from Twinkle": {
"uw-redirect4": {
label: "Creating malicious redirects",
summary: "Final warning: Creating malicious redirects"
},
"uw-ics4": {
label: "Uploading files missing copyright status",
summary: "Final warning: Uploading files missing copyright status"
},
"uw-af4": {
label: "Inappropriate feedback through the Article Feedback Tool",
summary: "Final warning: Inappropriate feedback through the Article Feedback Tool"
}
}*/
},
level4im: {
"Common warnings": {
"uw-vandalism4im": {
label: "Vandalism",
summary: "Only warning: Vandalism"
},
"uw-delete4im": {
label: "Removal of content, blanking",
summary: "Only warning: Removal of content, blanking"
}
},
"Behavior in articles": {
"uw-biog4im": {
label: "Adding unreferenced defamatory information about living persons",
summary: "Only warning: Adding unreferenced controversial information about living persons"
},
"uw-defam4im": {
label: "Addition of defamatory content",
summary: "Only warning: Addition of defamatory content"
},
"uw-image4im": {
label: "Image-related vandalism",
summary: "Only warning: Image-related vandalism"
},
"uw-joke4im": {
label: "Using improper humor",
summary: "Only warning: Using improper humor"
},
"uw-own4im": {
label: "Ownership of articles",
summary: "Only warning: Ownership of articles"
}
},
"Promotions and spam": {
"uw-advert4im": {
label: "Using Wikipedia for advertising or promotion",
summary: "Only warning: Using Wikipedia for advertising or promotion"
},
"uw-spam4im": {
label: "Adding spam links",
summary: "Only warning: Adding spam links"
}
},
"Behavior towards other editors": {
"uw-harass4im": {
label: "Harassment of other users",
summary: "Only warning: Harassment of other users"
},
"uw-npa4im": {
label: "Personal attack directed at a specific editor",
summary: "Only warning: Personal attack directed at a specific editor"
}
},
"Other": {
"uw-create4im": {
label: "Creating inappropriate pages",
summary: "Only warning: Creating inappropriate pages"
},
"uw-move4im": {
label: "Page moves against naming conventions or consensus",
summary: "Only warning: Page moves against naming conventions or consensus"
},
"uw-upload4im": {
label: "Uploading unencyclopedic images",
summary: "Only warning: Uploading unencyclopedic images"
}
}/*,
"To be removed from Twinkle": {
"uw-af4im": {
label: "Inappropriate feedback through the Article Feedback Tool",
summary: "Only warning: Inappropriate feedback through the Article Feedback Tool"
},
"uw-redirect4im": {
label: "Creating malicious redirects",
summary: "Only warning: Creating malicious redirects"
}
}*/
},
singlenotice: {
"uw-2redirect": {
label: "Creating double redirects through bad page moves",
summary: "Notice: Creating double redirects through bad page moves"
},
"uw-af-contact": {
label: "Attempting to contact the subject of an article via article feedback",
summary: "Notice: Contacting the subject of an article via article feedback"
},
"uw-af-personalinfo": {
label: "Including personal info in article feedback",
summary: "Notice: Including personal info in article feedback"
},
"uw-af-question": {
label: "Asking questions in article feedback",
summary: "Notice: Asking questions in article feedback"
},
"uw-aiv": {
label: "Bad AIV report",
summary: "Notice: Bad AIV report"
},
"uw-articlesig": {
label: "Adding signatures to article space",
summary: "Notice: Adding signatures to article space"
},
"uw-autobiography": {
label: "Creating autobiographies",
summary: "Notice: Creating autobiographies"
},
"uw-badcat": {
label: "Adding incorrect categories",
summary: "Notice: Adding incorrect categories"
},
"uw-badlistentry": {
label: "Adding inappropriate entries to lists",
summary: "Notice: Adding inappropriate entries to lists"
},
"uw-bite": {
label: "\"Biting\" newcomers",
summary: "Notice: \"Biting\" newcomers",
suppressArticleInSummary: true // non-standard (user name, not article), and not necessary
},
"uw-coi": {
label: "Conflict of Interest",
summary: "Notice: Conflict of Interest"
},
"uw-controversial": {
label: "Introducing controversial material",
summary: "Notice: Introducing controversial material"
},
"uw-copying": {
label: "Copying text to another page",
summary: "Notice: Copying text to another page"
},
"uw-crystal": {
label: "Adding speculative or unconfirmed information",
summary: "Notice: Adding speculative or unconfirmed information"
},
"uw-csd": {
label: "Speedy deletion declined",
summary: "Notice: Speedy deletion declined"
},
"uw-c&pmove": {
label: "Cut and paste moves",
summary: "Notice: Cut and paste moves"
},
"uw-dab": {
label: "Incorrect edit to a disambiguation page",
summary: "Notice: Incorrect edit to a disambiguation page"
},
"uw-date": {
label: "Unnecessarily changing date formats",
summary: "Notice: Unnecessarily changing date formats"
},
"uw-deadlink": {
label: "Removing proper sources containing dead links",
summary: "Notice: Removing proper sources containing dead links"
},
"uw-directcat": {
label: "Applying stub categories manually",
summary: "Notice: Applying stub categories manually"
},
"uw-draftfirst": {
label: "User should draft in userspace without the risk of speedy deletion",
summary: "Notice: Consider drafting your article in [[Help:Userspace draft|userspace]]"
},
"uw-editsummary": {
label: "Not using edit summary",
summary: "Notice: Not using edit summary"
},
"uw-english": {
label: "Not communicating in English",
summary: "Notice: Not communicating in English"
},
"uw-fuir": {
label: "Fair use image has been removed from your userpage",
summary: "Notice: A fair use image has been removed from your userpage"
},
"uw-hasty": {
label: "Hasty addition of speedy deletion tags",
summary: "Notice: Allow creators time to improve their articles before tagging them for deletion"
},
"uw-imageuse": {
label: "Incorrect image linking",
summary: "Notice: Incorrect image linking"
},
"uw-incompleteAFD": {
label: "Incomplete AFD",
summary: "Notice: Incomplete AFD"
},
"uw-inline-el": {
label: "Adding external links to the body of an article",
summary: "Notice: Keep external links to External links sections at the bottom of an article"
},
"uw-italicize": {
label: "Italicize books, films, albums, magazines, TV series, etc within articles",
summary: "Notice: Italicize books, films, albums, magazines, TV series, etc within articles"
},
"uw-lang": {
label: "Unnecessarily changing between British and American English",
summary: "Notice: Unnecessarily changing between British and American English"
},
"uw-linking": {
label: "Excessive addition of redlinks or repeated blue links",
summary: "Notice: Excessive addition of redlinks or repeated blue links"
},
"uw-minor": {
label: "Incorrect use of minor edits check box",
summary: "Notice: Incorrect use of minor edits check box"
},
"uw-nonfree": {
label: "Uploading replaceable non-free images",
summary: "Notice: Uploading replaceable non-free images"
},
"uw-notaiv": {
label: "Do not report complex abuse to AIV",
summary: "Notice: Do not report complex abuse to AIV"
},
"uw-notenglish": {
label: "Creating non-English articles",
summary: "Notice: Creating non-English articles"
},
"uw-notifysd": {
label: "Notify authors of speedy deletion tagged articles",
summary: "Notice: Please notify authors of articles tagged for speedy deletion"
},
"uw-notvand": {
label: "Mislabelling edits as vandalism",
summary: "Notice: Misidentifying edits as vandalism"
},
"uw-notvote": {
label: "We use consensus, not voting",
summary: "Notice: We use consensus, not voting"
},
"uw-patrolled": {
label: "Mark newpages as patrolled when patrolling",
summary: "Notice: Mark newpages as patrolled when patrolling"
},
"uw-plagiarism": {
label: "Copying from public domain sources without attribution",
summary: "Notice: Copying from public domain sources without attribution"
},
"uw-preview": {
label: "Use preview button to avoid mistakes",
summary: "Notice: Use preview button to avoid mistakes"
},
"uw-probation": {
label: "Article is on probation",
summary: "Notice: Article is on probation"
},
"uw-redlink": {
label: "Indiscriminate removal of redlinks",
summary: "Notice: Be careful when removing redlinks"
},
"uw-refimprove": {
label: "Creating unverifiable articles",
summary: "Notice: Creating unverifiable articles"
},
"uw-removevandalism": {
label: "Incorrect vandalism removal",
summary: "Notice: Incorrect vandalism removal"
},
"uw-repost": {
label: "Recreating material previously deleted via XfD process",
summary: "Notice: Recreating previously deleted material"
},
"uw-salt": {
label: "Recreating salted articles under a different title",
summary: "Notice: Recreating salted articles under a different title"
},
"uw-samename": {
label: "Rename request impossible",
summary: "Notice: Rename request impossible"
},
"uw-selfrevert": {
label: "Reverting self tests",
summary: "Notice: Reverting self tests"
},
"uw-socialnetwork": {
label: "Wikipedia is not a social network",
summary: "Notice: Wikipedia is not a social network"
},
"uw-sofixit": {
label: "Be bold and fix things yourself",
summary: "Notice: You can be bold and fix things yourself"
},
"uw-spoiler": {
label: "Adding spoiler alerts or removing spoilers from appropriate sections",
summary: "Notice: Don't delete or flag potential 'spoilers' in Wikipedia articles"
},
"uw-subst": {
label: "Remember to subst: templates",
summary: "Notice: Remember to subst: templates"
},
"uw-talkinarticle": {
label: "Talk in article",
summary: "Notice: Talk in article"
},
"uw-tilde": {
label: "Not signing posts",
summary: "Notice: Not signing posts"
},
"uw-toppost": {
label: "Posting at the top of talk pages",
summary: "Notice: Posting at the top of talk pages"
},
"uw-uaa": {
label: "Reporting of username to WP:UAA not accepted",
summary: "Notice: Reporting of username to WP:UAA not accepted"
},
"uw-upincat": {
label: "Accidentally including user page/subpage in a content category",
summary: "Notice: Informing user that one of his/her pages had accidentally been included in a content category"
},
"uw-uploadfirst": {
label: "Attempting to display an external image on a page",
summary: "Notice: Attempting to display an external image on a page"
},
"uw-userspace draft finish": {
label: "Stale userspace draft",
summary: "Notice: Stale userspace draft"
},
"uw-userspacenoindex": {
label: "User page/subpage isn't appropriate for search engine indexing",
summary: "Notice: User (sub)page isn't appropriate for search engine indexing"
},
"uw-vgscope": {
label: "Adding video game walkthroughs, cheats or instructions",
summary: "Notice: Adding video game walkthroughs, cheats or instructions"
},
"uw-warn": {
label: "Place user warning templates when reverting vandalism",
summary: "Notice: You can use user warning templates when reverting vandalism"
}
},
singlewarn: {
"uw-3rr": {
label: "Violating the three-revert rule; see also uw-ew",
summary: "Warning: Violating the three-revert rule"
},
"uw-affiliate": {
label: "Affiliate marketing",
summary: "Warning: Affiliate marketing"
},
"uw-agf-sock": {
label: "Use of multiple accounts (assuming good faith)",
summary: "Warning: Using multiple accounts"
},
"uw-attack": {
label: "Creating attack pages",
summary: "Warning: Creating attack pages",
suppressArticleInSummary: true
},
"uw-attempt": {
label: "Triggering the edit filter",
summary: "Warning: Triggering the edit filter"
},
"uw-bizlist": {
label: "Business promotion",
summary: "Warning: Promoting a business"
},
"uw-botun": {
label: "Bot username",
summary: "Warning: Bot username"
},
"uw-canvass": {
label: "Canvassing",
summary: "Warning: Canvassing"
},
"uw-copyright": {
label: "Copyright violation",
summary: "Warning: Copyright violation"
},
"uw-copyright-link": {
label: "Linking to copyrighted works violation",
summary: "Warning: Linking to copyrighted works violation"
},
"uw-copyright-new": {
label: "Copyright violation (with explanation for new users)",
summary: "Notice: Avoiding copyright problems"
},
"uw-copyright-remove": {
label: "Removing {{copyvio}} template from articles",
summary: "Warning: Removing {{copyvio}} templates"
},
"uw-efsummary": {
label: "Edit summary triggering the edit filter",
summary: "Warning: Edit summary triggering the edit filter"
},
"uw-ew": {
label: "Edit warring (stronger wording)",
summary: "Warning: Edit warring"
},
"uw-ewsoft": {
label: "Edit warring (softer wording for newcomers)",
summary: "Warning: Edit warring"
},
"uw-hoax": {
label: "Creating hoaxes",
summary: "Warning: Creating hoaxes"
},
"uw-legal": {
label: "Making legal threats",
summary: "Warning: Making legal threats"
},
"uw-login": {
label: "Editing while logged out",
summary: "Warning: Editing while logged out"
},
"uw-longterm": {
label: "Long term pattern of vandalism",
summary: "Warning: Long term pattern of vandalism"
},
"uw-multipleIPs": {
label: "Usage of multiple IPs",
summary: "Warning: Usage of multiple IPs"
},
"uw-pinfo": {
label: "Personal info",
summary: "Warning: Personal info"
},
"uw-socksuspect": {
label: "Sockpuppetry",
summary: "Warning: You are a suspected [[WP:SOCK|sockpuppet]]" // of User:...
},
"uw-upv": {
label: "Userpage vandalism",
summary: "Warning: Userpage vandalism"
},
"uw-username": {
label: "Username is against policy",
summary: "Warning: Your username might be against policy",
suppressArticleInSummary: true // not relevant for this template
},
"uw-coi-username": {
label: "Username is against policy, and conflict of interest",
summary: "Warning: Username and conflict of interest policy"
},
"uw-userpage": {
label: "Userpage or subpage is against policy",
summary: "Warning: Userpage or subpage is against policy"
},
"uw-wrongsummary": {
label: "Using inaccurate or inappropriate edit summaries",
summary: "Warning: Using inaccurate or inappropriate edit summaries"
}
},
block: {
"uw-block": {
label: "Block",
summary: "You have been blocked from editing",
pageParam: true,
reasonParam: true, // allows editing of reason for generic templates
suppressArticleInSummary: true
},
"uw-blocknotalk": {
label: "Block - talk page disabled",
summary: "You have been blocked from editing and your user talk page has been disabled",
pageParam: true,
reasonParam: true,
suppressArticleInSummary: true
},
"uw-blockindef": {
label: "Block - indefinite",
summary: "You have been indefinitely blocked from editing",
indefinite: true,
pageParam: true,
reasonParam: true,
suppressArticleInSummary: true
},
"uw-ablock": {
label: "Block - IP address",
summary: "Your IP address has been blocked from editing",
pageParam: true,
suppressArticleInSummary: true
},
"uw-vblock": {
label: "Vandalism block",
summary: "You have been blocked from editing for persistent [[WP:VAND|vandalism]]",
pageParam: true
},
"uw-voablock": {
label: "Vandalism-only account block (indefinite)",
summary: "You have been indefinitely blocked from editing because your account is being [[WP:VOA|used only for vandalism]]",
indefinite: true,
pageParam: true
},
"uw-bioblock": {
label: "BLP violations block",
summary: "You have been blocked from editing for violations of Wikipedia's [[WP:BLP|biographies of living persons policy]]",
pageParam: true
},
"uw-sblock": {
label: "Spam block",
summary: "You have been blocked from editing for using Wikipedia for [[WP:SPAM|spam]] purposes"
},
"uw-adblock": {
label: "Advertising block",
summary: "You have been blocked from editing for [[WP:SOAP|advertising or self-promotion]]",
pageParam: true
},
"uw-soablock": {
label: "Spam/advertising-only account block (indefinite)",
summary: "You have been indefinitely blocked from editing because your account is being used only for [[WP:SPAM|spam, advertising, or promotion]]",
indefinite: true,
pageParam: true
},
"uw-npblock": {
label: "Creating nonsense pages block",
summary: "You have been blocked from editing for creating [[WP:PN|nonsense pages]]",
pageParam: true
},
"uw-copyrightblock": {
label: "Copyright violation block",
summary: "You have been blocked from editing for continued [[WP:COPYVIO|copyright infringement]]",
pageParam: true
},
"uw-spoablock": {
label: "Sockpuppet account block (indefinite)",
summary: "You have been indefinitely blocked from editing because your account is being used only for [[WP:SOCK|sock puppetry]]",
indefinite: true
},
"uw-hblock": {
label: "Harassment block",
summary: "You have been blocked from editing for attempting to [[WP:HARASS|harass]] other users",
pageParam: true
},
"uw-ewblock": {
label: "Edit warring block",
summary: "You have been blocked from editing to prevent further [[WP:DE|disruption]] caused by your engagement in an [[WP:EW|edit war]]",
pageParam: true
},
"uw-3block": {
label: "Three-revert rule violation block",
summary: "You have been blocked from editing for violation of the [[WP:3RR|three-revert rule]]",
pageParam: true
},
"uw-disruptblock": {
label: "Disruptive editing block",
summary: "You have been blocked from editing for [[WP:DE|disruptive editing]]",
pageParam: true
},
"uw-deoablock": {
label: "Disruption/trolling-only account block (indefinite)",
summary: "You have been indefinitely blocked from editing because your account is being used only for [[WP:DE|trolling, disruption or harassment]]",
indefinite: true,
pageParam: true
},
"uw-lblock": {
label: "Legal threat block (indefinite)",
summary: "You have been indefinitely blocked from editing for making [[WP:NLT|legal threats or taking legal action]]",
indefinite: true
},
"uw-aeblock": {
label: "Arbitration enforcement block",
summary: "You have been blocked from editing for violating an [[WP:Arbitration|arbitration decision]] with your edits",
pageParam: true,
reasonParam: true
},
"uw-efblock": {
label: "Edit filter-related block",
summary: "You have been blocked from editing for making disruptive edits that repeatedly triggered the [[WP:EF|edit filter]]"
},
"uw-myblock": {
label: "Social networking block",
summary: "You have been blocked from editing for using user and/or article pages as a [[WP:NOTMYSPACE|blog, web host, social networking site or forum]]",
pageParam: true
},
"uw-dblock": {
label: "Deletion/removal of content block",
summary: "You have been blocked from editing for continued [[WP:VAND|removal of material]]",
pageParam: true
},
"uw-compblock": {
label: "Possible compromised account block (indefinite)",
summary: "You have been indefinitely blocked from editing because it is believed that your [[WP:SECURE|account has been compromised]]",
indefinite: true
},
"uw-botblock": {
label: "Unapproved bot block",
summary: "You have been blocked from editing because it appears you are running a [[WP:BOT|bot script]] without [[WP:BRFA|approval]]",
pageParam: true
},
"uw-ublock": {
label: "Username soft block (indefinite)",
summary: "You have been indefinitely blocked from editing because your username is a violation of the [[WP:U|username policy]]",
indefinite: true,
reasonParam: true
},
"uw-uhblock": {
label: "Username hard block (indefinite)",
summary: "You have been indefinitely blocked from editing because your username is a blatant violation of the [[WP:U|username policy]]",
indefinite: true,
reasonParam: true
},
"uw-softerblock": {
label: "Promotional username soft block (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] gives the impression that the account represents a group, organization or website",
indefinite: true
},
"uw-causeblock": {
label: "Promotional username soft block, for charitable causes (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] gives the impression that the account represents a group, organization or website",
indefinite: true
},
"uw-botublock": {
label: "Bot username soft block (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] indicates this is a [[WP:BOT|bot]] account, which is currently not approved",
indefinite: true
},
"uw-memorialblock": {
label: "Memorial username soft block (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] indicates this account may be used as a memorial or tribute to someone",
indefinite: true
},
"uw-ublock-famous": {
label: "Famous username soft block (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] matches the name of a well-known living individual",
indefinite: true
},
"uw-ublock-double": {
label: "Similar username soft block (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] is too similar to the username of another Wikipedia user",
indefinite: true
},
"uw-uhblock-double": {
label: "Username impersonation hard block (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] appears to impersonate another established Wikipedia user",
indefinite: true
},
"uw-vaublock": {
label: "Vandalism-only account and username hard block (indefinite)",
summary: "You have been indefinitely blocked from editing because your account is being [[WP:VOA|used only for vandalism]] and your username is a blatant violation of the [[WP:U|username policy]]",
indefinite: true,
pageParam: true
},
"uw-spamublock": {
label: "Spam-only account and promotional username hard block (indefinite)",
summary: "You have been indefinitely blocked from editing because your account is being used only for [[WP:SPAM|spam or advertising]] and your username is a violation of the [[WP:U|username policy]]",
indefinite: true
}
}
};
Twinkle.warn.prev_block_timer = null;
Twinkle.warn.prev_block_reason = null;
Twinkle.warn.prev_article = null;
Twinkle.warn.prev_reason = null;
Twinkle.warn.callback.change_category = function twinklewarnCallbackChangeCategory(e) {
var value = e.target.value;
var sub_group = e.target.root.sub_group;
sub_group.main_group = value;
var old_subvalue = sub_group.value;
var old_subvalue_re;
if( old_subvalue ) {
old_subvalue = old_subvalue.replace(/\d*(im)?$/, '' );
old_subvalue_re = new RegExp( $.escapeRE( old_subvalue ) + "(\\d*(?:im)?)$" );
}
while( sub_group.hasChildNodes() ){
sub_group.removeChild( sub_group.firstChild );
}
// worker function to create the combo box entries
var createEntries = function( contents, container ) {
$.each( contents, function( itemKey, itemProperties ) {
var key = (typeof itemKey === "string") ? itemKey : itemProperties.value;
var selected = false;
if( old_subvalue && old_subvalue_re.test( key ) ) {
selected = true;
}
var elem = new Morebits.quickForm.element( {
type: 'option',
label: "{{" + key + "}}: " + itemProperties.label,
value: key,
selected: selected
} );
var elemRendered = container.appendChild( elem.render() );
$(elemRendered).data("messageData", itemProperties);
} );
};
if( value === "singlenotice" || value === "singlewarn" || value === "block" ) {
// no categories, just create the options right away
createEntries( Twinkle.warn.messages[ value ], sub_group );
} else if( value === "custom" ) {
createEntries( Twinkle.getPref("customWarningList"), sub_group );
} else {
// create the option-groups
$.each( Twinkle.warn.messages[ value ], function( groupLabel, groupContents ) {
var optgroup = new Morebits.quickForm.element( {
type: 'optgroup',
label: groupLabel
} );
optgroup = optgroup.render();
sub_group.appendChild( optgroup );
// create the options
createEntries( groupContents, optgroup );
} );
}
if( value === 'block' ) {
// create the block-related fields
var more = new Morebits.quickForm.element( { type: 'div', id: 'block_fields' } );
more.append( {
type: 'input',
name: 'block_timer',
label: 'Period of blocking: ',
tooltip: 'The period the blocking is due for, for example 24 hours, 2 weeks, indefinite etc...'
} );
more.append( {
type: 'input',
name: 'block_reason',
label: '"You have been blocked for ..." ',
tooltip: 'An optional reason, to replace the default generic reason. Only available for the generic block templates.'
} );
e.target.root.insertBefore( more.render(), e.target.root.lastChild );
// restore saved values of fields
if(Twinkle.warn.prev_block_timer !== null) {
e.target.root.block_timer.value = Twinkle.warn.prev_block_timer;
Twinkle.warn.prev_block_timer = null;
}
if(Twinkle.warn.prev_block_reason !== null) {
e.target.root.block_reason.value = Twinkle.warn.prev_block_reason;
Twinkle.warn.prev_block_reason = null;
}
if(Twinkle.warn.prev_article === null) {
Twinkle.warn.prev_article = e.target.root.article.value;
}
e.target.root.article.disabled = false;
$(e.target.root.reason).parent().hide();
e.target.root.previewer.closePreview();
} else if( e.target.root.block_timer ) {
// hide the block-related fields
if(!e.target.root.block_timer.disabled && Twinkle.warn.prev_block_timer === null) {
Twinkle.warn.prev_block_timer = e.target.root.block_timer.value;
}
if(!e.target.root.block_reason.disabled && Twinkle.warn.prev_block_reason === null) {
Twinkle.warn.prev_block_reason = e.target.root.block_reason.value;
}
// hack to fix something really weird - removed elements seem to somehow keep an association with the form
e.target.root.block_reason = null;
$(e.target.root).find("#block_fields").remove();
if(e.target.root.article.disabled && Twinkle.warn.prev_article !== null) {
e.target.root.article.value = Twinkle.warn.prev_article;
Twinkle.warn.prev_article = null;
}
e.target.root.article.disabled = false;
$(e.target.root.reason).parent().show();
e.target.root.previewer.closePreview();
}
// clear overridden label on article textbox
Morebits.quickForm.setElementTooltipVisibility(e.target.root.article, true);
Morebits.quickForm.resetElementLabel(e.target.root.article);
// hide the big red notice
$("#tw-warn-red-notice").remove();
};
Twinkle.warn.callback.change_subcategory = function twinklewarnCallbackChangeSubcategory(e) {
var main_group = e.target.form.main_group.value;
var value = e.target.form.sub_group.value;
if( main_group === 'singlenotice' || main_group === 'singlewarn' ) {
if( value === 'uw-bite' || value === 'uw-username' || value === 'uw-socksuspect' ) {
if(Twinkle.warn.prev_article === null) {
Twinkle.warn.prev_article = e.target.form.article.value;
}
e.target.form.article.notArticle = true;
e.target.form.article.value = '';
} else if( e.target.form.article.notArticle ) {
if(Twinkle.warn.prev_article !== null) {
e.target.form.article.value = Twinkle.warn.prev_article;
Twinkle.warn.prev_article = null;
}
e.target.form.article.notArticle = false;
}
} else if( main_group === 'block' ) {
if( Twinkle.warn.messages.block[value].indefinite ) {
if(Twinkle.warn.prev_block_timer === null) {
Twinkle.warn.prev_block_timer = e.target.form.block_timer.value;
}
e.target.form.block_timer.disabled = true;
e.target.form.block_timer.value = 'indefinite';
} else if( e.target.form.block_timer.disabled ) {
if(Twinkle.warn.prev_block_timer !== null) {
e.target.form.block_timer.value = Twinkle.warn.prev_block_timer;
Twinkle.warn.prev_block_timer = null;
}
e.target.form.block_timer.disabled = false;
}
if( Twinkle.warn.messages.block[value].pageParam ) {
if(Twinkle.warn.prev_article !== null) {
e.target.form.article.value = Twinkle.warn.prev_article;
Twinkle.warn.prev_article = null;
}
e.target.form.article.disabled = false;
} else if( !e.target.form.article.disabled ) {
if(Twinkle.warn.prev_article === null) {
Twinkle.warn.prev_article = e.target.form.article.value;
}
e.target.form.article.disabled = true;
e.target.form.article.value = '';
}
if( Twinkle.warn.messages.block[value].reasonParam ) {
if(Twinkle.warn.prev_block_reason !== null) {
e.target.form.block_reason.value = Twinkle.warn.prev_block_reason;
Twinkle.warn.prev_block_reason = null;
}
e.target.form.block_reason.disabled = false;
} else if( !e.target.form.block_reason.disabled ) {
if(Twinkle.warn.prev_block_reason === null) {
Twinkle.warn.prev_block_reason = e.target.form.block_reason.value;
}
e.target.form.block_reason.disabled = true;
e.target.form.block_reason.value = '';
}
}
// change form labels according to the warning selected
if (value === "uw-socksuspect") {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, false);
Morebits.quickForm.overrideElementLabel(e.target.form.article, "Username of sock master, if known (without User:) ");
} else if (value === "uw-username") {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, false);
Morebits.quickForm.overrideElementLabel(e.target.form.article, "Username violates policy because... ");
} else if (value === "uw-bite") {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, false);
Morebits.quickForm.overrideElementLabel(e.target.form.article, "Username of 'bitten' user (without User:) ");
} else {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, true);
Morebits.quickForm.resetElementLabel(e.target.form.article);
}
// add big red notice, warning users about how to use {{uw-[coi-]username}} appropriately
$("#tw-warn-red-notice").remove();
var $redWarning;
if (value === "uw-username") {
$redWarning = $("<div style='color: red;' id='tw-warn-red-notice'>{{uw-username}} should <b>not</b> be used for <b>blatant</b> username policy violations. " +
"Blatant violations should be reported directly to UAA (via Twinkle's ARV tab). " +
"{{uw-username}} should only be used in edge cases in order to engage in discussion with the user.</div>");
$redWarning.insertAfter(Morebits.quickForm.getElementLabelObject(e.target.form.reasonGroup));
} else if (value === "uw-coi-username") {
$redWarning = $("<div style='color: red;' id='tw-warn-red-notice'>{{uw-coi-username}} should <b>not</b> be used for <b>blatant</b> username policy violations. " +
"Blatant violations should be reported directly to UAA (via Twinkle's ARV tab). " +
"{{uw-coi-username}} should only be used in edge cases in order to engage in discussion with the user.</div>");
$redWarning.insertAfter(Morebits.quickForm.getElementLabelObject(e.target.form.reasonGroup));
}
};
Twinkle.warn.callbacks = {
getWarningWikitext: function(templateName, article, reason) {
var text = "{{subst:" + templateName;
if (article) {
// add linked article for user warnings (non-block templates)
text += '|1=' + article;
}
text += '}}';
// add extra message for non-block templates
if (reason) {
text += " ''" + reason + "''";
}
return text;
},
getBlockNoticeWikitext: function(templateName, article, blockTime, blockReason, isIndefTemplate) {
var text = "{{subst:" + templateName;
if (article && Twinkle.warn.messages.block[templateName].pageParam) {
text += '|page=' + article;
}
if (!/te?mp|^\s*$|min/.exec(blockTime) && !isIndefTemplate) {
if (/indef|\*|max/.exec(blockTime)) {
text += '|indef=yes';
} else {
text += '|time=' + blockTime;
}
}
if (blockReason) {
text += '|reason=' + blockReason;
}
text += "|sig=true}}";
return text;
},
preview: function(form) {
var templatename = form.sub_group.value;
var linkedarticle = form.article.value;
var templatetext;
if (templatename in Twinkle.warn.messages.block) {
templatetext = Twinkle.warn.callbacks.getBlockNoticeWikitext(templatename, linkedarticle, form.block_timer.value,
form.block_reason.value, Twinkle.warn.messages.block[templatename].indefinite);
} else {
templatetext = Twinkle.warn.callbacks.getWarningWikitext(templatename, linkedarticle, form.reason.value);
}
form.previewer.beginRender(templatetext);
},
main: function( pageobj ) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var messageData = params.messageData;
var history_re = /<!-- Template:(uw-.*?) -->.*?(\d{1,2}:\d{1,2}, \d{1,2} \w+ \d{4}) \(UTC\)/g;
var history = {};
var latest = { date: new Date( 0 ), type: '' };
var current;
while( ( current = history_re.exec( text ) ) ) {
var current_date = new Date( current[2] + ' UTC' );
if( !( current[1] in history ) || history[ current[1] ] < current_date ) {
history[ current[1] ] = current_date;
}
if( current_date > latest.date ) {
latest.date = current_date;
latest.type = current[1];
}
}
var date = new Date();
if( params.sub_group in history ) {
var temp_time = new Date( history[ params.sub_group ] );
temp_time.setUTCHours( temp_time.getUTCHours() + 24 );
if( temp_time > date ) {
if( !confirm( "An identical " + params.sub_group + " has been issued in the last 24 hours. \nWould you still like to add this warning/notice?" ) ) {
pageobj.statelem.info( 'aborted per user request' );
return;
}
}
}
latest.date.setUTCMinutes( latest.date.getUTCMinutes() + 1 ); // after long debate, one minute is max
if( latest.date > date ) {
if( !confirm( "A " + latest.type + " has been issued in the last minute. \nWould you still like to add this warning/notice?" ) ) {
pageobj.statelem.info( 'aborted per user request' );
return;
}
}
var headerRe = new RegExp( "^==+\\s*(?:" + date.getUTCMonthName() + '|' + date.getUTCMonthNameAbbrev() + ")\\s+" + date.getUTCFullYear() + "\\s*==+", 'm' );
if( text.length > 0 ) {
text += "\n\n";
}
if( params.main_group === 'block' ) {
if( Twinkle.getPref('blankTalkpageOnIndefBlock') && params.sub_group !== 'uw-lblock' && ( messageData.indefinite || (/indef|\*|max/).exec( params.block_timer ) ) ) {
Morebits.status.info( 'Info', 'Blanking talk page per preferences and creating a new level 2 heading for the date' );
text = "== " + date.getUTCMonthName() + " " + date.getUTCFullYear() + " ==\n";
} else if( !headerRe.exec( text ) ) {
Morebits.status.info( 'Info', 'Will create a new level 2 heading for the date, as none was found for this month' );
text += "== " + date.getUTCMonthName() + " " + date.getUTCFullYear() + " ==\n";
}
text += Twinkle.warn.callbacks.getBlockNoticeWikitext(params.sub_group, params.article, params.block_timer, params.reason, messageData.indefinite);
} else {
if( !headerRe.exec( text ) ) {
Morebits.status.info( 'Info', 'Will create a new level 2 heading for the date, as none was found for this month' );
text += "== " + date.getUTCMonthName() + " " + date.getUTCFullYear() + " ==\n";
}
text += Twinkle.warn.callbacks.getWarningWikitext(params.sub_group, params.article, params.reason) + " ~~~~";
}
if ( Twinkle.getPref('showSharedIPNotice') && Morebits.isIPAddress( mw.config.get('wgTitle') ) ) {
Morebits.status.info( 'Info', 'Adding a shared IP notice' );
text += "\n{{subst:SharedIPAdvice}}";
}
// build the edit summary
var summary;
if( params.main_group === 'custom' ) {
switch( params.sub_group.substr( -1 ) ) {
case "1":
summary = "General note";
break;
case "2":
summary = "Caution";
break;
case "3":
summary = "Warning";
break;
case "4":
summary = "Final warning";
break;
case "m":
if( params.sub_group.substr( -3 ) === "4im" ) {
summary = "Only warning";
break;
}
summary = "Notice";
break;
default:
summary = "Notice";
break;
}
summary += ": " + Morebits.string.toUpperCaseFirstChar(messageData.label);
} else {
summary = messageData.summary;
if ( messageData.suppressArticleInSummary !== true && params.article ) {
if ( params.sub_group === "uw-socksuspect" ) { // this template requires a username
summary += " of [[User:" + params.article + "]]";
} else {
summary += " on [[" + params.article + "]]";
}
}
}
summary += "." + Twinkle.getPref("summaryAd");
pageobj.setPageText( text );
pageobj.setEditSummary( summary );
pageobj.setWatchlist( Twinkle.getPref('watchWarnings') );
pageobj.save();
}
};
Twinkle.warn.callback.evaluate = function twinklewarnCallbackEvaluate(e) {
// First, check to make sure a reason was filled in if uw-username was selected
if(e.target.sub_group.value === 'uw-username' && e.target.article.value.trim() === '') {
alert("You must supply a reason for the {{uw-username}} template.");
return;
}
// Find the selected <option> element so we can fetch the data structure
var selectedEl = $(e.target.sub_group).find('option[value="' + $(e.target.sub_group).val() + '"]');
// Then, grab all the values provided by the form
var params = {
reason: e.target.block_reason ? e.target.block_reason.value : e.target.reason.value,
main_group: e.target.main_group.value,
sub_group: e.target.sub_group.value,
article: e.target.article.value, // .replace( /^(Image|Category):/i, ':$1:' ), -- apparently no longer needed...
block_timer: e.target.block_timer ? e.target.block_timer.value : null,
messageData: selectedEl.data("messageData")
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( e.target );
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Warning complete, reloading talk page in a few seconds";
var wikipedia_page = new Morebits.wiki.page( mw.config.get('wgPageName'), 'User talk page modification' );
wikipedia_page.setCallbackParameters( params );
wikipedia_page.setFollowRedirect( true );
wikipedia_page.load( Twinkle.warn.callbacks.main );
};
})(jQuery);
//</nowiki>
b543b01ba57ef47042fdca64e0690e6108ab7b84
311
2013-11-19T10:14:50Z
Amalthea
0
v2.0-646-g981a645: warn: Add {{Template:uw-inline-el|uw-inline-el}}; batchprotect: Add templateeditor protection level; Migrate from deprecated wikiGetlink to getUrl; arv: AIV reports can end in ? ! ;
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklewarn.js: Warn module
****************************************
* Mode of invocation: Tab ("Warn")
* Active on: User talk pages
* Config directives in: TwinkleConfig
*/
Twinkle.warn = function twinklewarn() {
if( mw.config.get('wgNamespaceNumber') === 3 ) {
Twinkle.addPortletLink( Twinkle.warn.callback, "Warn", "tw-warn", "Warn/notify user" );
}
// modify URL of talk page on rollback success pages
if( mw.config.get('wgAction') === 'rollback' ) {
var $vandalTalkLink = $("#mw-rollback-success").find(".mw-usertoollinks a").first();
$vandalTalkLink.css("font-weight", "bold");
$vandalTalkLink.wrapInner($("<span/>").attr("title", "If appropriate, you can use Twinkle to warn the user about their edits to this page."));
var extraParam = "vanarticle=" + mw.util.rawurlencode(Morebits.pageNameNorm);
var href = $vandalTalkLink.attr("href");
if (href.indexOf("?") === -1) {
$vandalTalkLink.attr("href", href + "?" + extraParam);
} else {
$vandalTalkLink.attr("href", href + "&" + extraParam);
}
}
};
Twinkle.warn.callback = function twinklewarnCallback() {
if( mw.config.get('wgTitle').split( '/' )[0] === mw.config.get('wgUserName') &&
!confirm( 'You are about to warn yourself! Are you sure you want to proceed?' ) ) {
return;
}
var Window = new Morebits.simpleWindow( 600, 440 );
Window.setTitle( "Warn/notify user" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Choosing a warning level", "WP:UWUL#Levels" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#warn" );
var form = new Morebits.quickForm( Twinkle.warn.callback.evaluate );
var main_select = form.append( {
type: 'field',
label: 'Choose type of warning/notice to issue',
tooltip: 'First choose a main warning group, then the specific warning to issue.'
} );
var main_group = main_select.append( {
type: 'select',
name: 'main_group',
event:Twinkle.warn.callback.change_category
} );
var defaultGroup = parseInt(Twinkle.getPref('defaultWarningGroup'), 10);
main_group.append( { type: 'option', label: 'General note (1)', value: 'level1', selected: ( defaultGroup === 1 || defaultGroup < 1 || ( Morebits.userIsInGroup( 'sysop' ) ? defaultGroup > 8 : defaultGroup > 7 ) ) } );
main_group.append( { type: 'option', label: 'Caution (2)', value: 'level2', selected: ( defaultGroup === 2 ) } );
main_group.append( { type: 'option', label: 'Warning (3)', value: 'level3', selected: ( defaultGroup === 3 ) } );
main_group.append( { type: 'option', label: 'Final warning (4)', value: 'level4', selected: ( defaultGroup === 4 ) } );
main_group.append( { type: 'option', label: 'Only warning (4im)', value: 'level4im', selected: ( defaultGroup === 5 ) } );
main_group.append( { type: 'option', label: 'Single issue notices', value: 'singlenotice', selected: ( defaultGroup === 6 ) } );
main_group.append( { type: 'option', label: 'Single issue warnings', value: 'singlewarn', selected: ( defaultGroup === 7 ) } );
if( Twinkle.getPref( 'customWarningList' ).length ) {
main_group.append( { type: 'option', label: 'Custom warnings', value: 'custom', selected: ( defaultGroup === 9 ) } );
}
if( Morebits.userIsInGroup( 'sysop' ) ) {
main_group.append( { type: 'option', label: 'Blocking', value: 'block', selected: ( defaultGroup === 8 ) } );
}
main_select.append( { type: 'select', name: 'sub_group', event:Twinkle.warn.callback.change_subcategory } ); //Will be empty to begin with.
form.append( {
type: 'input',
name: 'article',
label: 'Linked article',
value:( Morebits.queryString.exists( 'vanarticle' ) ? Morebits.queryString.get( 'vanarticle' ) : '' ),
tooltip: 'An article can be linked within the notice, perhaps because it was a revert to said article that dispatched this notice. Leave empty for no article to be linked.'
} );
var more = form.append( { type: 'field', name: 'reasonGroup', label: 'Warning information' } );
more.append( { type: 'textarea', label: 'Optional message:', name: 'reason', tooltip: 'Perhaps a reason, or that a more detailed notice must be appended' } );
var previewlink = document.createElement( 'a' );
$(previewlink).click(function(){
Twinkle.warn.callbacks.preview(result); // |result| is defined below
});
previewlink.style.cursor = "pointer";
previewlink.textContent = 'Preview';
more.append( { type: 'div', id: 'warningpreview', label: [ previewlink ] } );
more.append( { type: 'div', id: 'twinklewarn-previewbox', style: 'display: none' } );
more.append( { type: 'submit', label: 'Submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
result.main_group.root = result;
result.previewer = new Morebits.wiki.preview($(result).find('div#twinklewarn-previewbox').last()[0]);
// We must init the first choice (General Note);
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.main_group.dispatchEvent( evt );
};
// This is all the messages that might be dispatched by the code
// Each of the individual templates require the following information:
// label (required): A short description displayed in the dialog
// summary (required): The edit summary used. If an article name is entered, the summary is postfixed with "on [[article]]", and it is always postfixed with ". $summaryAd"
// suppressArticleInSummary (optional): Set to true to suppress showing the article name in the edit summary. Useful if the warning relates to attack pages, or some such.
Twinkle.warn.messages = {
level1: {
"Common warnings": {
"uw-vandalism1": {
label: "Vandalism",
summary: "General note: Unconstructive editing"
},
"uw-disruptive1": {
label: "Disruptive editing",
summary: "General note: Unconstructive editing"
},
"uw-test1": {
label: "Editing tests",
summary: "General note: Editing tests"
},
"uw-delete1": {
label: "Removal of content, blanking",
summary: "General note: Removal of content, blanking"
}
},
"Behavior in articles": {
"uw-biog1": {
label: "Adding unreferenced controversial information about living persons",
summary: "General note: Adding unreferenced controversial information about living persons"
},
"uw-defam1": {
label: "Addition of defamatory content",
summary: "General note: Addition of defamatory content"
},
"uw-error1": {
label: "Introducing deliberate factual errors",
summary: "General note: Introducing factual errors"
},
"uw-genre1": {
label: "Frequent or mass changes to genres without consensus or references",
summary: "General note: Frequent or mass changes to genres without consensus or references"
},
"uw-image1": {
label: "Image-related vandalism in articles",
summary: "General note: Image-related vandalism in articles"
},
"uw-joke1": {
label: "Using improper humor in articles",
summary: "General note: Using improper humor in articles"
},
"uw-nor1": {
label: "Adding original research, including unpublished syntheses of sources",
summary: "General note: Adding original research, including unpublished syntheses of sources"
},
"uw-notcensored1": {
label: "Censorship of material",
summary: "General note: Censorship of material"
},
"uw-own1": {
label: "Ownership of articles",
summary: "General note: Ownership of articles"
},
"uw-tdel1": {
label: "Removal of maintenance templates",
summary: "General note: Removal of maintenance templates"
},
"uw-unsourced1": {
label: "Addition of unsourced or improperly cited material",
summary: "General note: Addition of unsourced or improperly cited material"
}
},
"Promotions and spam": {
"uw-advert1": {
label: "Using Wikipedia for advertising or promotion",
summary: "General note: Using Wikipedia for advertising or promotion"
},
"uw-npov1": {
label: "Not adhering to neutral point of view",
summary: "General note: Not adhering to neutral point of view"
},
"uw-spam1": {
label: "Adding spam links",
summary: "General note: Adding spam links"
}
},
"Behavior towards other editors": {
"uw-agf1": {
label: "Not assuming good faith",
summary: "General note: Not assuming good faith"
},
"uw-harass1": {
label: "Harassment of other users",
summary: "General note: Harassment of other users"
},
"uw-npa1": {
label: "Personal attack directed at a specific editor",
summary: "General note: Personal attack directed at a specific editor"
},
"uw-tempabuse1": {
label: "Improper use of warning or blocking template",
summary: "General note: Improper use of warning or blocking template"
}
},
"Removal of deletion tags": {
"uw-afd1": {
label: "Removing {{afd}} templates",
summary: "General note: Removing {{afd}} templates"
},
"uw-blpprod1": {
label: "Removing {{blp prod}} templates",
summary: "General note: Removing {{blp prod}} templates"
},
"uw-idt1": {
label: "Removing file deletion tags",
summary: "General note: Removing file deletion tags"
},
"uw-speedy1": {
label: "Removing speedy deletion tags",
summary: "General note: Removing speedy deletion tags"
}
},
"Other": {
"uw-chat1": {
label: "Using talk page as forum",
summary: "General note: Using talk page as forum"
},
"uw-create1": {
label: "Creating inappropriate pages",
summary: "General note: Creating inappropriate pages"
},
"uw-mos1": {
label: "Manual of style",
summary: "General note: Formatting, date, language, etc (Manual of style)"
},
"uw-move1": {
label: "Page moves against naming conventions or consensus",
summary: "General note: Page moves against naming conventions or consensus"
},
"uw-tpv1": {
label: "Refactoring others' talk page comments",
summary: "General note: Refactoring others' talk page comments"
},
"uw-upload1": {
label: "Uploading unencyclopedic images",
summary: "General note: Uploading unencyclopedic images"
}
}/*,
"To be removed from Twinkle": {
"uw-redirect1": {
label: "Creating malicious redirects",
summary: "General note: Creating malicious redirects"
},
"uw-ics1": {
label: "Uploading files missing copyright status",
summary: "General note: Uploading files missing copyright status"
},
"uw-af1": {
label: "Inappropriate feedback through the Article Feedback Tool",
summary: "General note: Inappropriate feedback through the Article Feedback Tool"
}
}*/
},
level2: {
"Common warnings": {
"uw-vandalism2": {
label: "Vandalism",
summary: "Caution: Unconstructive editing"
},
"uw-disruptive2": {
label: "Disruptive editing",
summary: "Caution: Unconstructive editing"
},
"uw-test2": {
label: "Editing tests",
summary: "Caution: Editing tests"
},
"uw-delete2": {
label: "Removal of content, blanking",
summary: "Caution: Removal of content, blanking"
}
},
"Behavior in articles": {
"uw-biog2": {
label: "Adding unreferenced controversial information about living persons",
summary: "Caution: Adding unreferenced controversial information about living persons"
},
"uw-defam2": {
label: "Addition of defamatory content",
summary: "Caution: Addition of defamatory content"
},
"uw-error2": {
label: "Introducing deliberate factual errors",
summary: "Caution: Introducing factual errors"
},
"uw-genre2": {
label: "Frequent or mass changes to genres without consensus or references",
summary: "Caution: Frequent or mass changes to genres without consensus or references"
},
"uw-image2": {
label: "Image-related vandalism in articles",
summary: "Caution: Image-related vandalism in articles"
},
"uw-joke2": {
label: "Using improper humor in articles",
summary: "Caution: Using improper humor in articles"
},
"uw-nor2": {
label: "Adding original research, including unpublished syntheses of sources",
summary: "Caution: Adding original research, including unpublished syntheses of sources"
},
"uw-notcensored2": {
label: "Censorship of material",
summary: "Caution: Censorship of material"
},
"uw-own2": {
label: "Ownership of articles",
summary: "Caution: Ownership of articles"
},
"uw-tdel2": {
label: "Removal of maintenance templates",
summary: "Caution: Removal of maintenance templates"
},
"uw-unsourced2": {
label: "Addition of unsourced or improperly cited material",
summary: "Caution: Addition of unsourced or improperly cited material"
}
},
"Promotions and spam": {
"uw-advert2": {
label: "Using Wikipedia for advertising or promotion",
summary: "Caution: Using Wikipedia for advertising or promotion"
},
"uw-npov2": {
label: "Not adhering to neutral point of view",
summary: "Caution: Not adhering to neutral point of view"
},
"uw-spam2": {
label: "Adding spam links",
summary: "Caution: Adding spam links"
}
},
"Behavior towards other editors": {
"uw-agf2": {
label: "Not assuming good faith",
summary: "Caution: Not assuming good faith"
},
"uw-harass2": {
label: "Harassment of other users",
summary: "Caution: Harassment of other users"
},
"uw-npa2": {
label: "Personal attack directed at a specific editor",
summary: "Caution: Personal attack directed at a specific editor"
},
"uw-tempabuse2": {
label: "Improper use of warning or blocking template",
summary: "Caution: Improper use of warning or blocking template"
}
},
"Removal of deletion tags": {
"uw-afd2": {
label: "Removing {{afd}} templates",
summary: "Caution: Removing {{afd}} templates"
},
"uw-blpprod2": {
label: "Removing {{blp prod}} templates",
summary: "Caution: Removing {{blp prod}} templates"
},
"uw-idt2": {
label: "Removing file deletion tags",
summary: "Caution: Removing file deletion tags"
},
"uw-speedy2": {
label: "Removing speedy deletion tags",
summary: "Caution: Removing speedy deletion tags"
}
},
"Other": {
"uw-chat2": {
label: "Using talk page as forum",
summary: "Caution: Using talk page as forum"
},
"uw-create2": {
label: "Creating inappropriate pages",
summary: "Caution: Creating inappropriate pages"
},
"uw-mos2": {
label: "Manual of style",
summary: "Caution: Formatting, date, language, etc (Manual of style)"
},
"uw-move2": {
label: "Page moves against naming conventions or consensus",
summary: "Caution: Page moves against naming conventions or consensus"
},
"uw-tpv2": {
label: "Refactoring others' talk page comments",
summary: "Caution: Refactoring others' talk page comments"
},
"uw-upload2": {
label: "Uploading unencyclopedic images",
summary: "Caution: Uploading unencyclopedic images"
}
}/*,
"To be removed from Twinkle": {
"uw-redirect2": {
label: "Creating malicious redirects",
summary: "Caution: Creating malicious redirects"
},
"uw-ics2": {
label: "Uploading files missing copyright status",
summary: "Caution: Uploading files missing copyright status"
},
"uw-af2": {
label: "Inappropriate feedback through the Article Feedback Tool",
summary: "Caution: Inappropriate feedback through the Article Feedback Tool"
}
}*/
},
level3: {
"Common warnings": {
"uw-vandalism3": {
label: "Vandalism",
summary: "Warning: Vandalism"
},
"uw-disruptive3": {
label: "Disruptive editing",
summary: "Warning: Disruptive editing"
},
"uw-test3": {
label: "Editing tests",
summary: "Warning: Editing tests"
},
"uw-delete3": {
label: "Removal of content, blanking",
summary: "Warning: Removal of content, blanking"
}
},
"Behavior in articles": {
"uw-biog3": {
label: "Adding unreferenced controversial/defamatory information about living persons",
summary: "Warning: Adding unreferenced controversial information about living persons"
},
"uw-defam3": {
label: "Addition of defamatory content",
summary: "Warning: Addition of defamatory content"
},
"uw-error3": {
label: "Introducing deliberate factual errors",
summary: "Warning: Introducing deliberate factual errors"
},
"uw-genre3": {
label: "Frequent or mass changes to genres without consensus or reference",
summary: "Warning: Frequent or mass changes to genres without consensus or reference"
},
"uw-image3": {
label: "Image-related vandalism in articles",
summary: "Warning: Image-related vandalism in articles"
},
"uw-joke3": {
label: "Using improper humor in articles",
summary: "Warning: Using improper humor in articles"
},
"uw-nor3": {
label: "Adding original research, including unpublished syntheses of sources",
summary: "Warning: Adding original research, including unpublished syntheses of sources"
},
"uw-notcensored3": {
label: "Censorship of material",
summary: "Warning: Censorship of material"
},
"uw-own3": {
label: "Ownership of articles",
summary: "Warning: Ownership of articles"
},
"uw-tdel3": {
label: "Removal of maintenance templates",
summary: "Warning: Removal of maintenance templates"
},
"uw-unsourced3": {
label: "Addition of unsourced or improperly cited material",
summary: "Warning: Addition of unsourced or improperly cited material"
}
},
"Promotions and spam": {
"uw-advert3": {
label: "Using Wikipedia for advertising or promotion",
summary: "Warning: Using Wikipedia for advertising or promotion"
},
"uw-npov3": {
label: "Not adhering to neutral point of view",
summary: "Warning: Not adhering to neutral point of view"
},
"uw-spam3": {
label: "Adding spam links",
summary: "Warning: Adding spam links"
}
},
"Behavior towards other users": {
"uw-agf3": {
label: "Not assuming good faith",
summary: "Warning: Not assuming good faith"
},
"uw-harass3": {
label: "Harassment of other users",
summary: "Warning: Harassment of other users"
},
"uw-npa3": {
label: "Personal attack directed at a specific editor",
summary: "Warning: Personal attack directed at a specific editor"
}
},
"Removal of deletion tags": {
"uw-afd3": {
label: "Removing {{afd}} templates",
summary: "Warning: Removing {{afd}} templates"
},
"uw-blpprod3": {
label: "Removing {{blpprod}} templates",
summary: "Warning: Removing {{blpprod}} templates"
},
"uw-idt3": {
label: "Removing file deletion tags",
summary: "Warning: Removing file deletion tags"
},
"uw-speedy3": {
label: "Removing speedy deletion tags",
summary: "Warning: Removing speedy deletion tags"
}
},
"Other": {
"uw-chat3": {
label: "Using talk page as forum",
summary: "Warning: Using talk page as forum"
},
"uw-create3": {
label: "Creating inappropriate pages",
summary: "Warning: Creating inappropriate pages"
},
"uw-mos3": {
label: "Manual of style",
summary: "Warning: Formatting, date, language, etc (Manual of style)"
},
"uw-move3": {
label: "Page moves against naming conventions or consensus",
summary: "Warning: Page moves against naming conventions or consensus"
},
"uw-tpv3": {
label: "Refactoring others' talk page comments",
summary: "Warning: Refactoring others' talk page comments"
},
"uw-upload3": {
label: "Uploading unencyclopedic images",
summary: "Warning: Uploading unencyclopedic images"
}
}/*,
"To be removed fomr Twinkle": {
"uw-af3": {
label: "Inappropriate feedback through the Article Feedback Tool",
summary: "Warning: Inappropriate feedback through the Article Feedback Tool"
},
"uw-ics3": {
label: "Uploading files missing copyright status",
summary: "Warning: Uploading files missing copyright status"
},
"uw-redirect3": {
label: "Creating malicious redirects",
summary: "Warning: Creating malicious redirects"
}
}*/
},
level4: {
"Common warnings": {
"uw-generic4": {
label: "Generic warning (for template series missing level 4)",
summary: "Final warning notice"
},
"uw-vandalism4": {
label: "Vandalism",
summary: "Final warning: Vandalism"
},
"uw-delete4": {
label: "Removal of content, blanking",
summary: "Final warning: Removal of content, blanking"
}
},
"Behavior in articles": {
"uw-biog4": {
label: "Adding unreferenced defamatory information about living persons",
summary: "Final warning: Adding unreferenced controversial information about living persons"
},
"uw-defam4": {
label: "Addition of defamatory content",
summary: "Final warning: Addition of defamatory content"
},
"uw-error4": {
label: "Introducing deliberate factual errors",
summary: "Final warning: Introducing deliberate factual errors"
},
"uw-genre4": {
label: "Frequent or mass changes to genres without consensus or reference",
summary: "Final warning: Frequent or mass changes to genres without consensus or reference"
},
"uw-image4": {
label: "Image-related vandalism in articles",
summary: "Final warning: Image-related vandalism in articles"
},
"uw-joke4": {
label: "Using improper humor in articles",
summary: "Final warning: Using improper humor in articles"
},
"uw-nor4": {
label: "Adding original research, including unpublished syntheses of sources",
summary: "Final warning: Adding original research, including unpublished syntheses of sources"
},
"uw-tdel4": {
label: "Removal of maintenance templates",
summary: "Final warning: Removal of maintenance templates"
},
"uw-unsourced4": {
label: "Addition of unsourced or improperly cited material",
summary: "Final warning: Addition of unsourced or improperly cited material"
}
},
"Promotions and spam": {
"uw-advert4": {
label: "Using Wikipedia for advertising or promotion",
summary: "Final warning: Using Wikipedia for advertising or promotion"
},
"uw-npov4": {
label: "Not adhering to neutral point of view",
summary: "Final warning: Not adhering to neutral point of view"
},
"uw-spam4": {
label: "Adding spam links",
summary: "Final warning: Adding spam links"
}
},
"Behavior towards other editors": {
"uw-harass4": {
label: "Harassment of other users",
summary: "Final warning: Harassment of other users"
},
"uw-npa4": {
label: "Personal attack directed at a specific editor",
summary: "Final warning: Personal attack directed at a specific editor"
}
},
"Removal of deletion tags": {
"uw-afd4": {
label: "Removing {{afd}} templates",
summary: "Final warning: Removing {{afd}} templates"
},
"uw-blpprod4": {
label: "Removing {{blp prod}} templates",
summary: "Final warning: Removing {{blp prod}} templates"
},
"uw-idt4": {
label: "Removing file deletion tags",
summary: "Final warning: Removing file deletion tags"
},
"uw-speedy4": {
label: "Removing speedy deletion tags",
summary: "Final warning: Removing speedy deletion tags"
}
},
"Other": {
"uw-chat4": {
label: "Using talk page as forum",
summary: "Final warning: Using talk page as forum"
},
"uw-create4": {
label: "Creating inappropriate pages",
summary: "Final warning: Creating inappropriate pages"
},
"uw-mos4": {
label: "Manual of style",
summary: "Final warning: Formatting, date, language, etc (Manual of style)"
},
"uw-move4": {
label: "Page moves against naming conventions or consensus",
summary: "Final warning: Page moves against naming conventions or consensus"
},
"uw-tpv4": {
label: "Refactoring others' talk page comments",
summary: "Final warning: Refactoring others' talk page comments"
},
"uw-upload4": {
label: "Uploading unencyclopedic images",
summary: "Final warning: Uploading unencyclopedic images"
}
}/*,
"To be removed from Twinkle": {
"uw-redirect4": {
label: "Creating malicious redirects",
summary: "Final warning: Creating malicious redirects"
},
"uw-ics4": {
label: "Uploading files missing copyright status",
summary: "Final warning: Uploading files missing copyright status"
},
"uw-af4": {
label: "Inappropriate feedback through the Article Feedback Tool",
summary: "Final warning: Inappropriate feedback through the Article Feedback Tool"
}
}*/
},
level4im: {
"Common warnings": {
"uw-vandalism4im": {
label: "Vandalism",
summary: "Only warning: Vandalism"
},
"uw-delete4im": {
label: "Removal of content, blanking",
summary: "Only warning: Removal of content, blanking"
}
},
"Behavior in articles": {
"uw-biog4im": {
label: "Adding unreferenced defamatory information about living persons",
summary: "Only warning: Adding unreferenced controversial information about living persons"
},
"uw-defam4im": {
label: "Addition of defamatory content",
summary: "Only warning: Addition of defamatory content"
},
"uw-image4im": {
label: "Image-related vandalism",
summary: "Only warning: Image-related vandalism"
},
"uw-joke4im": {
label: "Using improper humor",
summary: "Only warning: Using improper humor"
},
"uw-own4im": {
label: "Ownership of articles",
summary: "Only warning: Ownership of articles"
}
},
"Promotions and spam": {
"uw-advert4im": {
label: "Using Wikipedia for advertising or promotion",
summary: "Only warning: Using Wikipedia for advertising or promotion"
},
"uw-spam4im": {
label: "Adding spam links",
summary: "Only warning: Adding spam links"
}
},
"Behavior towards other editors": {
"uw-harass4im": {
label: "Harassment of other users",
summary: "Only warning: Harassment of other users"
},
"uw-npa4im": {
label: "Personal attack directed at a specific editor",
summary: "Only warning: Personal attack directed at a specific editor"
}
},
"Other": {
"uw-create4im": {
label: "Creating inappropriate pages",
summary: "Only warning: Creating inappropriate pages"
},
"uw-move4im": {
label: "Page moves against naming conventions or consensus",
summary: "Only warning: Page moves against naming conventions or consensus"
},
"uw-upload4im": {
label: "Uploading unencyclopedic images",
summary: "Only warning: Uploading unencyclopedic images"
}
}/*,
"To be removed from Twinkle": {
"uw-af4im": {
label: "Inappropriate feedback through the Article Feedback Tool",
summary: "Only warning: Inappropriate feedback through the Article Feedback Tool"
},
"uw-redirect4im": {
label: "Creating malicious redirects",
summary: "Only warning: Creating malicious redirects"
}
}*/
},
singlenotice: {
"uw-2redirect": {
label: "Creating double redirects through bad page moves",
summary: "Notice: Creating double redirects through bad page moves"
},
"uw-af-contact": {
label: "Attempting to contact the subject of an article via article feedback",
summary: "Notice: Contacting the subject of an article via article feedback"
},
"uw-af-personalinfo": {
label: "Including personal info in article feedback",
summary: "Notice: Including personal info in article feedback"
},
"uw-af-question": {
label: "Asking questions in article feedback",
summary: "Notice: Asking questions in article feedback"
},
"uw-aiv": {
label: "Bad AIV report",
summary: "Notice: Bad AIV report"
},
"uw-articlesig": {
label: "Adding signatures to article space",
summary: "Notice: Adding signatures to article space"
},
"uw-autobiography": {
label: "Creating autobiographies",
summary: "Notice: Creating autobiographies"
},
"uw-badcat": {
label: "Adding incorrect categories",
summary: "Notice: Adding incorrect categories"
},
"uw-badlistentry": {
label: "Adding inappropriate entries to lists",
summary: "Notice: Adding inappropriate entries to lists"
},
"uw-bite": {
label: "\"Biting\" newcomers",
summary: "Notice: \"Biting\" newcomers",
suppressArticleInSummary: true // non-standard (user name, not article), and not necessary
},
"uw-coi": {
label: "Conflict of Interest",
summary: "Notice: Conflict of Interest"
},
"uw-controversial": {
label: "Introducing controversial material",
summary: "Notice: Introducing controversial material"
},
"uw-copying": {
label: "Copying text to another page",
summary: "Notice: Copying text to another page"
},
"uw-crystal": {
label: "Adding speculative or unconfirmed information",
summary: "Notice: Adding speculative or unconfirmed information"
},
"uw-csd": {
label: "Speedy deletion declined",
summary: "Notice: Speedy deletion declined"
},
"uw-c&pmove": {
label: "Cut and paste moves",
summary: "Notice: Cut and paste moves"
},
"uw-dab": {
label: "Incorrect edit to a disambiguation page",
summary: "Notice: Incorrect edit to a disambiguation page"
},
"uw-date": {
label: "Unnecessarily changing date formats",
summary: "Notice: Unnecessarily changing date formats"
},
"uw-deadlink": {
label: "Removing proper sources containing dead links",
summary: "Notice: Removing proper sources containing dead links"
},
"uw-directcat": {
label: "Applying stub categories manually",
summary: "Notice: Applying stub categories manually"
},
"uw-draftfirst": {
label: "User should draft in userspace without the risk of speedy deletion",
summary: "Notice: Consider drafting your article in [[Help:Userspace draft|userspace]]"
},
"uw-editsummary": {
label: "Not using edit summary",
summary: "Notice: Not using edit summary"
},
"uw-english": {
label: "Not communicating in English",
summary: "Notice: Not communicating in English"
},
"uw-fuir": {
label: "Fair use image has been removed from your userpage",
summary: "Notice: A fair use image has been removed from your userpage"
},
"uw-hasty": {
label: "Hasty addition of speedy deletion tags",
summary: "Notice: Allow creators time to improve their articles before tagging them for deletion"
},
"uw-imageuse": {
label: "Incorrect image linking",
summary: "Notice: Incorrect image linking"
},
"uw-incompleteAFD": {
label: "Incomplete AFD",
summary: "Notice: Incomplete AFD"
},
"uw-inline-el": {
label: "Adding external links to the body of an article",
summary: "Notice: Keep external links to External links sections at the bottom of an article"
},
"uw-italicize": {
label: "Italicize books, films, albums, magazines, TV series, etc within articles",
summary: "Notice: Italicize books, films, albums, magazines, TV series, etc within articles"
},
"uw-lang": {
label: "Unnecessarily changing between British and American English",
summary: "Notice: Unnecessarily changing between British and American English"
},
"uw-linking": {
label: "Excessive addition of redlinks or repeated blue links",
summary: "Notice: Excessive addition of redlinks or repeated blue links"
},
"uw-minor": {
label: "Incorrect use of minor edits check box",
summary: "Notice: Incorrect use of minor edits check box"
},
"uw-nonfree": {
label: "Uploading replaceable non-free images",
summary: "Notice: Uploading replaceable non-free images"
},
"uw-notaiv": {
label: "Do not report complex abuse to AIV",
summary: "Notice: Do not report complex abuse to AIV"
},
"uw-notenglish": {
label: "Creating non-English articles",
summary: "Notice: Creating non-English articles"
},
"uw-notifysd": {
label: "Notify authors of speedy deletion tagged articles",
summary: "Notice: Please notify authors of articles tagged for speedy deletion"
},
"uw-notvand": {
label: "Mislabelling edits as vandalism",
summary: "Notice: Misidentifying edits as vandalism"
},
"uw-notvote": {
label: "We use consensus, not voting",
summary: "Notice: We use consensus, not voting"
},
"uw-patrolled": {
label: "Mark newpages as patrolled when patrolling",
summary: "Notice: Mark newpages as patrolled when patrolling"
},
"uw-plagiarism": {
label: "Copying from public domain sources without attribution",
summary: "Notice: Copying from public domain sources without attribution"
},
"uw-preview": {
label: "Use preview button to avoid mistakes",
summary: "Notice: Use preview button to avoid mistakes"
},
"uw-probation": {
label: "Article is on probation",
summary: "Notice: Article is on probation"
},
"uw-redlink": {
label: "Indiscriminate removal of redlinks",
summary: "Notice: Be careful when removing redlinks"
},
"uw-refimprove": {
label: "Creating unverifiable articles",
summary: "Notice: Creating unverifiable articles"
},
"uw-removevandalism": {
label: "Incorrect vandalism removal",
summary: "Notice: Incorrect vandalism removal"
},
"uw-repost": {
label: "Recreating material previously deleted via XfD process",
summary: "Notice: Recreating previously deleted material"
},
"uw-salt": {
label: "Recreating salted articles under a different title",
summary: "Notice: Recreating salted articles under a different title"
},
"uw-samename": {
label: "Rename request impossible",
summary: "Notice: Rename request impossible"
},
"uw-selfrevert": {
label: "Reverting self tests",
summary: "Notice: Reverting self tests"
},
"uw-socialnetwork": {
label: "Wikipedia is not a social network",
summary: "Notice: Wikipedia is not a social network"
},
"uw-sofixit": {
label: "Be bold and fix things yourself",
summary: "Notice: You can be bold and fix things yourself"
},
"uw-spoiler": {
label: "Adding spoiler alerts or removing spoilers from appropriate sections",
summary: "Notice: Don't delete or flag potential 'spoilers' in Wikipedia articles"
},
"uw-subst": {
label: "Remember to subst: templates",
summary: "Notice: Remember to subst: templates"
},
"uw-talkinarticle": {
label: "Talk in article",
summary: "Notice: Talk in article"
},
"uw-tilde": {
label: "Not signing posts",
summary: "Notice: Not signing posts"
},
"uw-toppost": {
label: "Posting at the top of talk pages",
summary: "Notice: Posting at the top of talk pages"
},
"uw-uaa": {
label: "Reporting of username to WP:UAA not accepted",
summary: "Notice: Reporting of username to WP:UAA not accepted"
},
"uw-upincat": {
label: "Accidentally including user page/subpage in a content category",
summary: "Notice: Informing user that one of his/her pages had accidentally been included in a content category"
},
"uw-uploadfirst": {
label: "Attempting to display an external image on a page",
summary: "Notice: Attempting to display an external image on a page"
},
"uw-userspace draft finish": {
label: "Stale userspace draft",
summary: "Notice: Stale userspace draft"
},
"uw-userspacenoindex": {
label: "User page/subpage isn't appropriate for search engine indexing",
summary: "Notice: User (sub)page isn't appropriate for search engine indexing"
},
"uw-vgscope": {
label: "Adding video game walkthroughs, cheats or instructions",
summary: "Notice: Adding video game walkthroughs, cheats or instructions"
},
"uw-warn": {
label: "Place user warning templates when reverting vandalism",
summary: "Notice: You can use user warning templates when reverting vandalism"
}
},
singlewarn: {
"uw-3rr": {
label: "Violating the three-revert rule; see also uw-ew",
summary: "Warning: Violating the three-revert rule"
},
"uw-affiliate": {
label: "Affiliate marketing",
summary: "Warning: Affiliate marketing"
},
"uw-agf-sock": {
label: "Use of multiple accounts (assuming good faith)",
summary: "Warning: Using multiple accounts"
},
"uw-attack": {
label: "Creating attack pages",
summary: "Warning: Creating attack pages",
suppressArticleInSummary: true
},
"uw-attempt": {
label: "Triggering the edit filter",
summary: "Warning: Triggering the edit filter"
},
"uw-bizlist": {
label: "Business promotion",
summary: "Warning: Promoting a business"
},
"uw-botun": {
label: "Bot username",
summary: "Warning: Bot username"
},
"uw-canvass": {
label: "Canvassing",
summary: "Warning: Canvassing"
},
"uw-copyright": {
label: "Copyright violation",
summary: "Warning: Copyright violation"
},
"uw-copyright-link": {
label: "Linking to copyrighted works violation",
summary: "Warning: Linking to copyrighted works violation"
},
"uw-copyright-new": {
label: "Copyright violation (with explanation for new users)",
summary: "Notice: Avoiding copyright problems"
},
"uw-copyright-remove": {
label: "Removing {{copyvio}} template from articles",
summary: "Warning: Removing {{copyvio}} templates"
},
"uw-efsummary": {
label: "Edit summary triggering the edit filter",
summary: "Warning: Edit summary triggering the edit filter"
},
"uw-ew": {
label: "Edit warring (stronger wording)",
summary: "Warning: Edit warring"
},
"uw-ewsoft": {
label: "Edit warring (softer wording for newcomers)",
summary: "Warning: Edit warring"
},
"uw-hoax": {
label: "Creating hoaxes",
summary: "Warning: Creating hoaxes"
},
"uw-legal": {
label: "Making legal threats",
summary: "Warning: Making legal threats"
},
"uw-login": {
label: "Editing while logged out",
summary: "Warning: Editing while logged out"
},
"uw-longterm": {
label: "Long term pattern of vandalism",
summary: "Warning: Long term pattern of vandalism"
},
"uw-multipleIPs": {
label: "Usage of multiple IPs",
summary: "Warning: Usage of multiple IPs"
},
"uw-pinfo": {
label: "Personal info",
summary: "Warning: Personal info"
},
"uw-socksuspect": {
label: "Sockpuppetry",
summary: "Warning: You are a suspected [[WP:SOCK|sockpuppet]]" // of User:...
},
"uw-upv": {
label: "Userpage vandalism",
summary: "Warning: Userpage vandalism"
},
"uw-username": {
label: "Username is against policy",
summary: "Warning: Your username might be against policy",
suppressArticleInSummary: true // not relevant for this template
},
"uw-coi-username": {
label: "Username is against policy, and conflict of interest",
summary: "Warning: Username and conflict of interest policy"
},
"uw-userpage": {
label: "Userpage or subpage is against policy",
summary: "Warning: Userpage or subpage is against policy"
},
"uw-wrongsummary": {
label: "Using inaccurate or inappropriate edit summaries",
summary: "Warning: Using inaccurate or inappropriate edit summaries"
}
},
block: {
"uw-block": {
label: "Block",
summary: "You have been blocked from editing",
pageParam: true,
reasonParam: true, // allows editing of reason for generic templates
suppressArticleInSummary: true
},
"uw-blocknotalk": {
label: "Block - talk page disabled",
summary: "You have been blocked from editing and your user talk page has been disabled",
pageParam: true,
reasonParam: true,
suppressArticleInSummary: true
},
"uw-blockindef": {
label: "Block - indefinite",
summary: "You have been indefinitely blocked from editing",
indefinite: true,
pageParam: true,
reasonParam: true,
suppressArticleInSummary: true
},
"uw-ablock": {
label: "Block - IP address",
summary: "Your IP address has been blocked from editing",
pageParam: true,
suppressArticleInSummary: true
},
"uw-vblock": {
label: "Vandalism block",
summary: "You have been blocked from editing for persistent [[WP:VAND|vandalism]]",
pageParam: true
},
"uw-voablock": {
label: "Vandalism-only account block (indefinite)",
summary: "You have been indefinitely blocked from editing because your account is being [[WP:VOA|used only for vandalism]]",
indefinite: true,
pageParam: true
},
"uw-bioblock": {
label: "BLP violations block",
summary: "You have been blocked from editing for violations of Wikipedia's [[WP:BLP|biographies of living persons policy]]",
pageParam: true
},
"uw-sblock": {
label: "Spam block",
summary: "You have been blocked from editing for using Wikipedia for [[WP:SPAM|spam]] purposes"
},
"uw-adblock": {
label: "Advertising block",
summary: "You have been blocked from editing for [[WP:SOAP|advertising or self-promotion]]",
pageParam: true
},
"uw-soablock": {
label: "Spam/advertising-only account block (indefinite)",
summary: "You have been indefinitely blocked from editing because your account is being used only for [[WP:SPAM|spam, advertising, or promotion]]",
indefinite: true,
pageParam: true
},
"uw-npblock": {
label: "Creating nonsense pages block",
summary: "You have been blocked from editing for creating [[WP:PN|nonsense pages]]",
pageParam: true
},
"uw-copyrightblock": {
label: "Copyright violation block",
summary: "You have been blocked from editing for continued [[WP:COPYVIO|copyright infringement]]",
pageParam: true
},
"uw-spoablock": {
label: "Sockpuppet account block (indefinite)",
summary: "You have been indefinitely blocked from editing because your account is being used only for [[WP:SOCK|sock puppetry]]",
indefinite: true
},
"uw-hblock": {
label: "Harassment block",
summary: "You have been blocked from editing for attempting to [[WP:HARASS|harass]] other users",
pageParam: true
},
"uw-ewblock": {
label: "Edit warring block",
summary: "You have been blocked from editing to prevent further [[WP:DE|disruption]] caused by your engagement in an [[WP:EW|edit war]]",
pageParam: true
},
"uw-3block": {
label: "Three-revert rule violation block",
summary: "You have been blocked from editing for violation of the [[WP:3RR|three-revert rule]]",
pageParam: true
},
"uw-disruptblock": {
label: "Disruptive editing block",
summary: "You have been blocked from editing for [[WP:DE|disruptive editing]]",
pageParam: true
},
"uw-deoablock": {
label: "Disruption/trolling-only account block (indefinite)",
summary: "You have been indefinitely blocked from editing because your account is being used only for [[WP:DE|trolling, disruption or harassment]]",
indefinite: true,
pageParam: true
},
"uw-lblock": {
label: "Legal threat block (indefinite)",
summary: "You have been indefinitely blocked from editing for making [[WP:NLT|legal threats or taking legal action]]",
indefinite: true
},
"uw-aeblock": {
label: "Arbitration enforcement block",
summary: "You have been blocked from editing for violating an [[WP:Arbitration|arbitration decision]] with your edits",
pageParam: true,
reasonParam: true
},
"uw-efblock": {
label: "Edit filter-related block",
summary: "You have been blocked from editing for making disruptive edits that repeatedly triggered the [[WP:EF|edit filter]]"
},
"uw-myblock": {
label: "Social networking block",
summary: "You have been blocked from editing for using user and/or article pages as a [[WP:NOTMYSPACE|blog, web host, social networking site or forum]]",
pageParam: true
},
"uw-dblock": {
label: "Deletion/removal of content block",
summary: "You have been blocked from editing for continued [[WP:VAND|removal of material]]",
pageParam: true
},
"uw-compblock": {
label: "Possible compromised account block (indefinite)",
summary: "You have been indefinitely blocked from editing because it is believed that your [[WP:SECURE|account has been compromised]]",
indefinite: true
},
"uw-botblock": {
label: "Unapproved bot block",
summary: "You have been blocked from editing because it appears you are running a [[WP:BOT|bot script]] without [[WP:BRFA|approval]]",
pageParam: true
},
"uw-ublock": {
label: "Username soft block (indefinite)",
summary: "You have been indefinitely blocked from editing because your username is a violation of the [[WP:U|username policy]]",
indefinite: true,
reasonParam: true
},
"uw-uhblock": {
label: "Username hard block (indefinite)",
summary: "You have been indefinitely blocked from editing because your username is a blatant violation of the [[WP:U|username policy]]",
indefinite: true,
reasonParam: true
},
"uw-softerblock": {
label: "Promotional username soft block (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] gives the impression that the account represents a group, organization or website",
indefinite: true
},
"uw-causeblock": {
label: "Promotional username soft block, for charitable causes (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] gives the impression that the account represents a group, organization or website",
indefinite: true
},
"uw-botublock": {
label: "Bot username soft block (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] indicates this is a [[WP:BOT|bot]] account, which is currently not approved",
indefinite: true
},
"uw-memorialblock": {
label: "Memorial username soft block (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] indicates this account may be used as a memorial or tribute to someone",
indefinite: true
},
"uw-ublock-famous": {
label: "Famous username soft block (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] matches the name of a well-known living individual",
indefinite: true
},
"uw-ublock-double": {
label: "Similar username soft block (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] is too similar to the username of another Wikipedia user",
indefinite: true
},
"uw-uhblock-double": {
label: "Username impersonation hard block (indefinite)",
summary: "You have been indefinitely blocked from editing because your [[WP:U|username]] appears to impersonate another established Wikipedia user",
indefinite: true
},
"uw-vaublock": {
label: "Vandalism-only account and username hard block (indefinite)",
summary: "You have been indefinitely blocked from editing because your account is being [[WP:VOA|used only for vandalism]] and your username is a blatant violation of the [[WP:U|username policy]]",
indefinite: true,
pageParam: true
},
"uw-spamublock": {
label: "Spam-only account and promotional username hard block (indefinite)",
summary: "You have been indefinitely blocked from editing because your account is being used only for [[WP:SPAM|spam or advertising]] and your username is a violation of the [[WP:U|username policy]]",
indefinite: true
}
}
};
Twinkle.warn.prev_block_timer = null;
Twinkle.warn.prev_block_reason = null;
Twinkle.warn.prev_article = null;
Twinkle.warn.prev_reason = null;
Twinkle.warn.callback.change_category = function twinklewarnCallbackChangeCategory(e) {
var value = e.target.value;
var sub_group = e.target.root.sub_group;
sub_group.main_group = value;
var old_subvalue = sub_group.value;
var old_subvalue_re;
if( old_subvalue ) {
old_subvalue = old_subvalue.replace(/\d*(im)?$/, '' );
old_subvalue_re = new RegExp( $.escapeRE( old_subvalue ) + "(\\d*(?:im)?)$" );
}
while( sub_group.hasChildNodes() ){
sub_group.removeChild( sub_group.firstChild );
}
// worker function to create the combo box entries
var createEntries = function( contents, container ) {
$.each( contents, function( itemKey, itemProperties ) {
var key = (typeof itemKey === "string") ? itemKey : itemProperties.value;
var selected = false;
if( old_subvalue && old_subvalue_re.test( key ) ) {
selected = true;
}
var elem = new Morebits.quickForm.element( {
type: 'option',
label: "{{" + key + "}}: " + itemProperties.label,
value: key,
selected: selected
} );
var elemRendered = container.appendChild( elem.render() );
$(elemRendered).data("messageData", itemProperties);
} );
};
if( value === "singlenotice" || value === "singlewarn" || value === "block" ) {
// no categories, just create the options right away
createEntries( Twinkle.warn.messages[ value ], sub_group );
} else if( value === "custom" ) {
createEntries( Twinkle.getPref("customWarningList"), sub_group );
} else {
// create the option-groups
$.each( Twinkle.warn.messages[ value ], function( groupLabel, groupContents ) {
var optgroup = new Morebits.quickForm.element( {
type: 'optgroup',
label: groupLabel
} );
optgroup = optgroup.render();
sub_group.appendChild( optgroup );
// create the options
createEntries( groupContents, optgroup );
} );
}
if( value === 'block' ) {
// create the block-related fields
var more = new Morebits.quickForm.element( { type: 'div', id: 'block_fields' } );
more.append( {
type: 'input',
name: 'block_timer',
label: 'Period of blocking: ',
tooltip: 'The period the blocking is due for, for example 24 hours, 2 weeks, indefinite etc...'
} );
more.append( {
type: 'input',
name: 'block_reason',
label: '"You have been blocked for ..." ',
tooltip: 'An optional reason, to replace the default generic reason. Only available for the generic block templates.'
} );
e.target.root.insertBefore( more.render(), e.target.root.lastChild );
// restore saved values of fields
if(Twinkle.warn.prev_block_timer !== null) {
e.target.root.block_timer.value = Twinkle.warn.prev_block_timer;
Twinkle.warn.prev_block_timer = null;
}
if(Twinkle.warn.prev_block_reason !== null) {
e.target.root.block_reason.value = Twinkle.warn.prev_block_reason;
Twinkle.warn.prev_block_reason = null;
}
if(Twinkle.warn.prev_article === null) {
Twinkle.warn.prev_article = e.target.root.article.value;
}
e.target.root.article.disabled = false;
$(e.target.root.reason).parent().hide();
e.target.root.previewer.closePreview();
} else if( e.target.root.block_timer ) {
// hide the block-related fields
if(!e.target.root.block_timer.disabled && Twinkle.warn.prev_block_timer === null) {
Twinkle.warn.prev_block_timer = e.target.root.block_timer.value;
}
if(!e.target.root.block_reason.disabled && Twinkle.warn.prev_block_reason === null) {
Twinkle.warn.prev_block_reason = e.target.root.block_reason.value;
}
// hack to fix something really weird - removed elements seem to somehow keep an association with the form
e.target.root.block_reason = null;
$(e.target.root).find("#block_fields").remove();
if(e.target.root.article.disabled && Twinkle.warn.prev_article !== null) {
e.target.root.article.value = Twinkle.warn.prev_article;
Twinkle.warn.prev_article = null;
}
e.target.root.article.disabled = false;
$(e.target.root.reason).parent().show();
e.target.root.previewer.closePreview();
}
// clear overridden label on article textbox
Morebits.quickForm.setElementTooltipVisibility(e.target.root.article, true);
Morebits.quickForm.resetElementLabel(e.target.root.article);
// hide the big red notice
$("#tw-warn-red-notice").remove();
};
Twinkle.warn.callback.change_subcategory = function twinklewarnCallbackChangeSubcategory(e) {
var main_group = e.target.form.main_group.value;
var value = e.target.form.sub_group.value;
if( main_group === 'singlenotice' || main_group === 'singlewarn' ) {
if( value === 'uw-bite' || value === 'uw-username' || value === 'uw-socksuspect' ) {
if(Twinkle.warn.prev_article === null) {
Twinkle.warn.prev_article = e.target.form.article.value;
}
e.target.form.article.notArticle = true;
e.target.form.article.value = '';
} else if( e.target.form.article.notArticle ) {
if(Twinkle.warn.prev_article !== null) {
e.target.form.article.value = Twinkle.warn.prev_article;
Twinkle.warn.prev_article = null;
}
e.target.form.article.notArticle = false;
}
} else if( main_group === 'block' ) {
if( Twinkle.warn.messages.block[value].indefinite ) {
if(Twinkle.warn.prev_block_timer === null) {
Twinkle.warn.prev_block_timer = e.target.form.block_timer.value;
}
e.target.form.block_timer.disabled = true;
e.target.form.block_timer.value = 'indefinite';
} else if( e.target.form.block_timer.disabled ) {
if(Twinkle.warn.prev_block_timer !== null) {
e.target.form.block_timer.value = Twinkle.warn.prev_block_timer;
Twinkle.warn.prev_block_timer = null;
}
e.target.form.block_timer.disabled = false;
}
if( Twinkle.warn.messages.block[value].pageParam ) {
if(Twinkle.warn.prev_article !== null) {
e.target.form.article.value = Twinkle.warn.prev_article;
Twinkle.warn.prev_article = null;
}
e.target.form.article.disabled = false;
} else if( !e.target.form.article.disabled ) {
if(Twinkle.warn.prev_article === null) {
Twinkle.warn.prev_article = e.target.form.article.value;
}
e.target.form.article.disabled = true;
e.target.form.article.value = '';
}
if( Twinkle.warn.messages.block[value].reasonParam ) {
if(Twinkle.warn.prev_block_reason !== null) {
e.target.form.block_reason.value = Twinkle.warn.prev_block_reason;
Twinkle.warn.prev_block_reason = null;
}
e.target.form.block_reason.disabled = false;
} else if( !e.target.form.block_reason.disabled ) {
if(Twinkle.warn.prev_block_reason === null) {
Twinkle.warn.prev_block_reason = e.target.form.block_reason.value;
}
e.target.form.block_reason.disabled = true;
e.target.form.block_reason.value = '';
}
}
// change form labels according to the warning selected
if (value === "uw-socksuspect") {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, false);
Morebits.quickForm.overrideElementLabel(e.target.form.article, "Username of sock master, if known (without User:) ");
} else if (value === "uw-username") {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, false);
Morebits.quickForm.overrideElementLabel(e.target.form.article, "Username violates policy because... ");
} else if (value === "uw-bite") {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, false);
Morebits.quickForm.overrideElementLabel(e.target.form.article, "Username of 'bitten' user (without User:) ");
} else {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, true);
Morebits.quickForm.resetElementLabel(e.target.form.article);
}
// add big red notice, warning users about how to use {{uw-[coi-]username}} appropriately
$("#tw-warn-red-notice").remove();
var $redWarning;
if (value === "uw-username") {
$redWarning = $("<div style='color: red;' id='tw-warn-red-notice'>{{uw-username}} should <b>not</b> be used for <b>blatant</b> username policy violations. " +
"Blatant violations should be reported directly to UAA (via Twinkle's ARV tab). " +
"{{uw-username}} should only be used in edge cases in order to engage in discussion with the user.</div>");
$redWarning.insertAfter(Morebits.quickForm.getElementLabelObject(e.target.form.reasonGroup));
} else if (value === "uw-coi-username") {
$redWarning = $("<div style='color: red;' id='tw-warn-red-notice'>{{uw-coi-username}} should <b>not</b> be used for <b>blatant</b> username policy violations. " +
"Blatant violations should be reported directly to UAA (via Twinkle's ARV tab). " +
"{{uw-coi-username}} should only be used in edge cases in order to engage in discussion with the user.</div>");
$redWarning.insertAfter(Morebits.quickForm.getElementLabelObject(e.target.form.reasonGroup));
}
};
Twinkle.warn.callbacks = {
getWarningWikitext: function(templateName, article, reason) {
var text = "{{subst:" + templateName;
if (article) {
// add linked article for user warnings (non-block templates)
text += '|1=' + article;
}
text += '}}';
// add extra message for non-block templates
if (reason) {
text += " ''" + reason + "''";
}
return text;
},
getBlockNoticeWikitext: function(templateName, article, blockTime, blockReason, isIndefTemplate) {
var text = "{{subst:" + templateName;
if (article && Twinkle.warn.messages.block[templateName].pageParam) {
text += '|page=' + article;
}
if (!/te?mp|^\s*$|min/.exec(blockTime) && !isIndefTemplate) {
if (/indef|\*|max/.exec(blockTime)) {
text += '|indef=yes';
} else {
text += '|time=' + blockTime;
}
}
if (blockReason) {
text += '|reason=' + blockReason;
}
text += "|sig=true}}";
return text;
},
preview: function(form) {
var templatename = form.sub_group.value;
var linkedarticle = form.article.value;
var templatetext;
if (templatename in Twinkle.warn.messages.block) {
templatetext = Twinkle.warn.callbacks.getBlockNoticeWikitext(templatename, linkedarticle, form.block_timer.value,
form.block_reason.value, Twinkle.warn.messages.block[templatename].indefinite);
} else {
templatetext = Twinkle.warn.callbacks.getWarningWikitext(templatename, linkedarticle, form.reason.value);
}
form.previewer.beginRender(templatetext);
},
main: function( pageobj ) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var messageData = params.messageData;
var history_re = /<!-- Template:(uw-.*?) -->.*?(\d{1,2}:\d{1,2}, \d{1,2} \w+ \d{4}) \(UTC\)/g;
var history = {};
var latest = { date: new Date( 0 ), type: '' };
var current;
while( ( current = history_re.exec( text ) ) ) {
var current_date = new Date( current[2] + ' UTC' );
if( !( current[1] in history ) || history[ current[1] ] < current_date ) {
history[ current[1] ] = current_date;
}
if( current_date > latest.date ) {
latest.date = current_date;
latest.type = current[1];
}
}
var date = new Date();
if( params.sub_group in history ) {
var temp_time = new Date( history[ params.sub_group ] );
temp_time.setUTCHours( temp_time.getUTCHours() + 24 );
if( temp_time > date ) {
if( !confirm( "An identical " + params.sub_group + " has been issued in the last 24 hours. \nWould you still like to add this warning/notice?" ) ) {
pageobj.statelem.info( 'aborted per user request' );
return;
}
}
}
latest.date.setUTCMinutes( latest.date.getUTCMinutes() + 1 ); // after long debate, one minute is max
if( latest.date > date ) {
if( !confirm( "A " + latest.type + " has been issued in the last minute. \nWould you still like to add this warning/notice?" ) ) {
pageobj.statelem.info( 'aborted per user request' );
return;
}
}
var headerRe = new RegExp( "^==+\\s*(?:" + date.getUTCMonthName() + '|' + date.getUTCMonthNameAbbrev() + ")\\s+" + date.getUTCFullYear() + "\\s*==+", 'm' );
if( text.length > 0 ) {
text += "\n\n";
}
if( params.main_group === 'block' ) {
if( Twinkle.getPref('blankTalkpageOnIndefBlock') && params.sub_group !== 'uw-lblock' && ( messageData.indefinite || (/indef|\*|max/).exec( params.block_timer ) ) ) {
Morebits.status.info( 'Info', 'Blanking talk page per preferences and creating a new level 2 heading for the date' );
text = "== " + date.getUTCMonthName() + " " + date.getUTCFullYear() + " ==\n";
} else if( !headerRe.exec( text ) ) {
Morebits.status.info( 'Info', 'Will create a new level 2 heading for the date, as none was found for this month' );
text += "== " + date.getUTCMonthName() + " " + date.getUTCFullYear() + " ==\n";
}
text += Twinkle.warn.callbacks.getBlockNoticeWikitext(params.sub_group, params.article, params.block_timer, params.reason, messageData.indefinite);
} else {
if( !headerRe.exec( text ) ) {
Morebits.status.info( 'Info', 'Will create a new level 2 heading for the date, as none was found for this month' );
text += "== " + date.getUTCMonthName() + " " + date.getUTCFullYear() + " ==\n";
}
text += Twinkle.warn.callbacks.getWarningWikitext(params.sub_group, params.article, params.reason) + " ~~~~";
}
if ( Twinkle.getPref('showSharedIPNotice') && Morebits.isIPAddress( mw.config.get('wgTitle') ) ) {
Morebits.status.info( 'Info', 'Adding a shared IP notice' );
text += "\n{{subst:SharedIPAdvice}}";
}
// build the edit summary
var summary;
if( params.main_group === 'custom' ) {
switch( params.sub_group.substr( -1 ) ) {
case "1":
summary = "General note";
break;
case "2":
summary = "Caution";
break;
case "3":
summary = "Warning";
break;
case "4":
summary = "Final warning";
break;
case "m":
if( params.sub_group.substr( -3 ) === "4im" ) {
summary = "Only warning";
break;
}
summary = "Notice";
break;
default:
summary = "Notice";
break;
}
summary += ": " + Morebits.string.toUpperCaseFirstChar(messageData.label);
} else {
summary = messageData.summary;
if ( messageData.suppressArticleInSummary !== true && params.article ) {
if ( params.sub_group === "uw-socksuspect" ) { // this template requires a username
summary += " of [[User:" + params.article + "]]";
} else {
summary += " on [[" + params.article + "]]";
}
}
}
summary += "." + Twinkle.getPref("summaryAd");
pageobj.setPageText( text );
pageobj.setEditSummary( summary );
pageobj.setWatchlist( Twinkle.getPref('watchWarnings') );
pageobj.save();
}
};
Twinkle.warn.callback.evaluate = function twinklewarnCallbackEvaluate(e) {
// First, check to make sure a reason was filled in if uw-username was selected
if(e.target.sub_group.value === 'uw-username' && e.target.article.value.trim() === '') {
alert("You must supply a reason for the {{uw-username}} template.");
return;
}
// Find the selected <option> element so we can fetch the data structure
var selectedEl = $(e.target.sub_group).find('option[value="' + $(e.target.sub_group).val() + '"]');
// Then, grab all the values provided by the form
var params = {
reason: e.target.block_reason ? e.target.block_reason.value : e.target.reason.value,
main_group: e.target.main_group.value,
sub_group: e.target.sub_group.value,
article: e.target.article.value, // .replace( /^(Image|Category):/i, ':$1:' ), -- apparently no longer needed...
block_timer: e.target.block_timer ? e.target.block_timer.value : null,
messageData: selectedEl.data("messageData")
};
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( e.target );
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = "Warning complete, reloading talk page in a few seconds";
var wikipedia_page = new Morebits.wiki.page( mw.config.get('wgPageName'), 'User talk page modification' );
wikipedia_page.setCallbackParameters( params );
wikipedia_page.setFollowRedirect( true );
wikipedia_page.load( Twinkle.warn.callbacks.main );
};
})(jQuery);
//</nowiki>
b543b01ba57ef47042fdca64e0690e6108ab7b84
MediaWiki:Gadget-twinklexfd.js
8
130
330
329
2014-01-17T00:43:57Z
Ffkapa
2
1 wersja
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklexfd.js: XFD module
****************************************
* Mode of invocation: Tab ("XFD")
* Active on: Existing, non-special pages, except for file pages with no local (non-Commons) file which are not redirects
* Config directives in: TwinkleConfig
*/
Twinkle.xfd = function twinklexfd() {
// Disable on:
// * special pages
// * non-existent pages
// * files on Commons, whether there is a local page or not (unneeded local pages of files on Commons are eligible for CSD F2)
// * file pages without actual files (these are eligible for CSD G8)
if ( mw.config.get('wgNamespaceNumber') < 0 || !mw.config.get('wgArticleId') || (mw.config.get('wgNamespaceNumber') === 6 && (document.getElementById('mw-sharedupload') || (!document.getElementById('mw-imagepage-section-filehistory') && !Morebits.wiki.isPageRedirect()))) ) {
return;
}
Twinkle.addPortletLink( Twinkle.xfd.callback, "XFD", "tw-xfd", "Nominate for deletion" );
};
Twinkle.xfd.num2order = function twinklexfdNum2order( num ) {
switch( num ) {
case 1: return '';
case 2: return '2nd';
case 3: return '3rd';
default: return num + 'th';
}
};
Twinkle.xfd.currentRationale = null;
// error callback on Morebits.status.object
Twinkle.xfd.printRationale = function twinklexfdPrintRationale() {
if (Twinkle.xfd.currentRationale) {
var p = document.createElement("p");
p.textContent = "Your deletion rationale is provided below, which you can copy and paste into a new XFD dialog if you wish to try again:";
var pre = document.createElement("pre");
pre.className = "toccolours";
pre.style.marginTop = "0";
pre.textContent = Twinkle.xfd.currentRationale;
p.appendChild(pre);
Morebits.status.root.appendChild(p);
// only need to print the rationale once
Twinkle.xfd.currentRationale = null;
}
};
Twinkle.xfd.callback = function twinklexfdCallback() {
var Window = new Morebits.simpleWindow( 600, 350 );
Window.setTitle( "Nominate for deletion (XfD)" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "About deletion discussions", "WP:XFD" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#xfd" );
var form = new Morebits.quickForm( Twinkle.xfd.callback.evaluate );
var categories = form.append( {
type: 'select',
name: 'category',
label: 'Deletion discussion venue:',
tooltip: 'When activated, a default choice is made, based on what namespace you are in. This default should be the most appropriate',
event: Twinkle.xfd.callback.change_category
} );
categories.append( {
type: 'option',
label: 'AfD (Articles for deletion)',
selected: mw.config.get('wgNamespaceNumber') === 0, // Main namespace
value: 'afd'
} );
categories.append( {
type: 'option',
label: 'TfD (Templates for discussion)',
selected: mw.config.get('wgNamespaceNumber') === 10, // Template namespace
value: 'tfd'
} );
categories.append( {
type: 'option',
label: 'Discussion venues for files (FFD, PUF or NFCR)',
selected: mw.config.get('wgNamespaceNumber') === 6, // File namespace
value: 'ffd'
} );
categories.append( {
type: 'option',
label: 'CfD (Categories for discussion)',
selected: mw.config.get('wgNamespaceNumber') === 14, // Category namespace
value: 'cfd'
} );
categories.append( {
type: 'option',
label: 'CfD/S (Categories for speedy renaming)',
value: 'cfds'
} );
categories.append( {
type: 'option',
label: 'MfD (Miscellany for deletion)',
selected: [ 0, 6, 10, 14 ].indexOf( mw.config.get('wgNamespaceNumber') ) === -1,
value: 'mfd'
} );
categories.append( {
type: 'option',
label: 'RfD (Redirects for discussion)',
selected: Morebits.wiki.isPageRedirect(),
value: 'rfd'
} );
form.append( {
type: 'checkbox',
list: [
{
label: 'Notify page creator if possible',
value: 'notify',
name: 'notify',
tooltip: "A notification template will be placed on the creator's talk page if this is true.",
checked: true
}
]
}
);
form.append( {
type: 'field',
label:'Work area',
name: 'work_area'
} );
form.append( { type:'submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
// We must init the controls
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.category.dispatchEvent( evt );
};
Twinkle.xfd.previousNotify = true;
Twinkle.xfd.callback.change_category = function twinklexfdCallbackChangeCategory(e) {
var value = e.target.value;
var form = e.target.form;
var old_area = Morebits.quickForm.getElements(e.target.form, "work_area")[0];
var work_area = null;
var oldreasontextbox = form.getElementsByTagName('textarea')[0];
var oldreason = (oldreasontextbox ? oldreasontextbox.value : '');
var appendReasonBox = function twinklexfdAppendReasonBox() {
work_area.append( {
type: 'textarea',
name: 'xfdreason',
label: 'Reason: ',
value: oldreason,
tooltip: 'You can use wikimarkup in your reason. Twinkle will automatically sign your post.'
} );
// TODO possible future "preview" link here
};
switch( value ) {
case 'afd':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Articles for deletion',
name: 'work_area'
} );
work_area.append( {
type: 'checkbox',
list: [
{
label: 'Wrap deletion tag with <noinclude>',
value: 'noinclude',
name: 'noinclude',
tooltip: 'Will wrap the deletion tag in <noinclude> tags, so that it won\'t transclude. This option is not normally required.'
}
]
} );
var afd_category = work_area.append( {
type:'select',
name:'xfdcat',
label:'Choose what category this nomination belongs in:'
} );
afd_category.append( { type:'option', label:'Unknown', value:'?', selected:true } );
afd_category.append( { type:'option', label:'Media and music', value:'M' } );
afd_category.append( { type:'option', label:'Organisation, corporation, or product', value:'O' } );
afd_category.append( { type:'option', label:'Biographical', value:'B' } );
afd_category.append( { type:'option', label:'Society topics', value:'S' } );
afd_category.append( { type:'option', label:'Web or internet', value:'W' } );
afd_category.append( { type:'option', label:'Games or sports', value:'G' } );
afd_category.append( { type:'option', label:'Science and technology', value:'T' } );
afd_category.append( { type:'option', label:'Fiction and the arts', value:'F' } );
afd_category.append( { type:'option', label:'Places and transportation', value:'P' } );
afd_category.append( { type:'option', label:'Indiscernible or unclassifiable topic', value:'I' } );
afd_category.append( { type:'option', label:'Debate not yet sorted', value:'U' } );
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'tfd':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Templates for discussion',
name: 'work_area'
} );
work_area.append( {
type: 'div',
label: 'Stub types and userboxes are not eligible for TfD. Stub types go to CfD, and userboxes go to MfD.'
} );
var tfd_category = work_area.append( {
type: 'select',
label: 'Choose type of action wanted: ',
name: 'xfdcat',
event: function(e) {
var target = e.target;
// add/remove extra input box
if( target.value === 'tfm' && !target.form.xfdtarget ) { //$(target.parentNode).find("input[name='xfdtarget']").length === 0 ) {
var xfdtarget = new Morebits.quickForm.element( {
name: 'xfdtarget',
type: 'input',
label: 'Other template to be merged: '
} );
target.parentNode.appendChild(xfdtarget.render());
} else {
$(Morebits.quickForm.getElementContainer(target.form.xfdtarget)).remove();
target.form.xfdtarget = null;
//$(target.parentNode).find("input[name='xfdtarget']").remove();
}
}
} );
tfd_category.append( { type: 'option', label: 'Deletion', value: 'tfd', selected: true } );
tfd_category.append( { type: 'option', label: 'Merge', value: 'tfm' } );
work_area.append( {
type: 'checkbox',
list: [
{
label: 'Inline deletion tag',
value: 'tfdinline',
name: 'tfdinline',
tooltip: 'Use {{tfd|type=inline}} to tag the page instead of {{tfd}}. Good for inline templates (those that appear amongst the words of text).',
checked: false
},
{
label: 'Wrap deletion tag with <noinclude> (for substituted templates only)',
value: 'noinclude',
name: 'noinclude',
tooltip: 'Will wrap the deletion tag in <noinclude> tags, so that it won\'t get substituted along with the template.'
}
]
} );
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'mfd':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Miscellany for deletion',
name: 'work_area'
} );
work_area.append( {
type: 'checkbox',
list: [
{
label: 'Wrap deletion tag with <noinclude>',
value: 'noinclude',
name: 'noinclude',
tooltip: 'Will wrap the deletion tag in <noinclude> tags, so that it won\'t transclude. Select this option for userboxes.'
}
]
} );
if (mw.config.get('wgNamespaceNumber') === 2 /* User: */ || mw.config.get('wgNamespaceNumber') === 3 /* User talk: */) {
work_area.append( {
type: 'checkbox',
list: [
{
label: 'Also notify owner of userspace if they are not the page creator',
value: 'notifyuserspace',
name: 'notifyuserspace',
tooltip: 'If the user in whose userspace this page is located, is not the page creator (for example, the page is a rescued article stored as a userspace draft), notify the userspace owner as well.',
checked: true
}
]
} );
}
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'ffd':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Discussion venues for files',
name: 'work_area'
} );
work_area.append( {
type: 'radio',
name: 'ffdvenue',
event: Twinkle.xfd.callback.ffdvenue_change,
list: [
{
label: 'File for deletion',
value: 'ffd',
tooltip: 'General deletion discussion',
checked: mw.config.get('wgNamespaceNumber') === 6
},
{
label: 'Possibly unfree file',
value: 'puf',
tooltip: 'File has disputed source or licensing information'
},
{
label: 'Non-free content review',
value: 'nfcr',
tooltip: 'File\'s compliance with non-free content criteria ([[WP:NFCC]]) is disputed. User notification does not occur for NFCR, as it is not deemed relevant.',
checked: mw.config.get('wgNamespaceNumber') !== 6
}
]
} );
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'cfd':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Categories for discussion',
name: 'work_area'
} );
var cfd_category = work_area.append( {
type: 'select',
label: 'Choose type of action wanted: ',
name: 'xfdcat',
event: function(e) {
var value = e.target.value;
var target = e.target.form.xfdtarget;
// update enabled status
if( value === 'cfd' ) {
target.disabled = true;
} else {
target.disabled = false;
}
// update label
if( value === 'cfs' ) {
target.previousSibling.textContent = "Target categories: ";
} else if( value === 'cfc' ) {
target.previousSibling.textContent = "Target article: ";
} else {
target.previousSibling.textContent = "Target category: ";
}
// add/remove extra input box
if( value === 'cfs' && $(target.parentNode).find("input[name='xfdtarget2']").length === 0 ) {
var xfdtarget2 = document.createElement("input");
xfdtarget2.setAttribute("name", "xfdtarget2");
xfdtarget2.setAttribute("type", "text");
target.parentNode.appendChild(xfdtarget2);
} else {
$(target.parentNode).find("input[name='xfdtarget2']").remove();
}
}
} );
cfd_category.append( { type: 'option', label: 'Deletion', value: 'cfd', selected: true } );
cfd_category.append( { type: 'option', label: 'Merge', value: 'cfm' } );
cfd_category.append( { type: 'option', label: 'Renaming', value: 'cfr' } );
cfd_category.append( { type: 'option', label: 'Split', value: 'cfs' } );
cfd_category.append( { type: 'option', label: 'Convert into article', value: 'cfc' } );
work_area.append( {
type: 'input',
name: 'xfdtarget',
label: 'Target page: ',
disabled: true,
value: ''
} );
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'cfds':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Categories for speedy renaming',
name: 'work_area'
} );
var cfds_category = work_area.append( {
type: 'select',
label: 'C2 sub-criterion: ',
name: 'xfdcat',
tooltip: 'See WP:CFDS for full explanations.',
event: function(e) {
var value = e.target.value;
var target = e.target.form.xfdtarget;
if( value === 'cfd' ) {
target.disabled = true;
} else {
target.disabled = false;
}
}
} );
cfds_category.append( { type: 'option', label: 'C2A: Typographic and spelling fixes', value: 'C2A', selected: true } );
cfds_category.append( { type: 'option', label: 'C2B: Naming conventions and disambiguation', value: 'C2B' } );
cfds_category.append( { type: 'option', label: 'C2C: Consistency with names of similar categories', value: 'C2C' } );
cfds_category.append( { type: 'option', label: 'C2D: Rename to match article name', value: 'C2D' } );
cfds_category.append( { type: 'option', label: 'C2E: Author request', value: 'C2E' } );
work_area.append( {
type: 'input',
name: 'xfdtarget',
label: 'New name: ',
value: ''
} );
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'rfd':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Redirects for discussion',
name: 'work_area'
} );
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
default:
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Nothing for anything',
name: 'work_area'
} );
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
}
// No creator notification for CFDS
if (value === "cfds") {
Twinkle.xfd.previousNotify = form.notify.checked;
form.notify.checked = false;
form.notify.disabled = true;
} else {
form.notify.checked = Twinkle.xfd.previousNotify;
form.notify.disabled = false;
}
};
Twinkle.xfd.callback.ffdvenue_change = function twinklexfdCallbackFfdvenueChange(e) {
if (e.target.values === "nfcr") {
e.target.form.notify.disabled = true;
e.target.form.notify.checked = false;
} else {
e.target.form.notify.disabled = false;
e.target.form.notify.checked = true;
}
};
Twinkle.xfd.callbacks = {
afd: {
main: function(apiobj) {
var xmlDoc = apiobj.responseXML;
var titles = $(xmlDoc).find('allpages p');
// There has been no earlier entries with this prefix, just go on.
if( titles.length <= 0 ) {
apiobj.params.numbering = apiobj.params.number = '';
} else {
var number = 0;
for( var i = 0; i < titles.length; ++i ) {
var title = titles[i].getAttribute('title');
// First, simple test, is there an instance with this exact name?
if( title === 'Wikipedia:Articles for deletion/' + Morebits.pageNameNorm ) {
number = Math.max( number, 1 );
continue;
}
var order_re = new RegExp( '^' +
RegExp.escape( 'Wikipedia:Articles for deletion/' + Morebits.pageNameNorm, true ) +
'\\s*\\(\\s*(\\d+)(?:(?:th|nd|rd|st) nom(?:ination)?)?\\s*\\)\\s*$');
var match = order_re.exec( title );
// No match; A non-good value
if( !match ) {
continue;
}
// A match, set number to the max of current
number = Math.max( number, Number(match[1]) );
}
apiobj.params.number = Twinkle.xfd.num2order( parseInt( number, 10 ) + 1);
apiobj.params.numbering = number > 0 ? ' (' + apiobj.params.number + ' nomination)' : '';
}
apiobj.params.discussionpage = 'Wikipedia:Articles for deletion/' + Morebits.pageNameNorm + apiobj.params.numbering;
Morebits.status.info( "Next discussion page", "[[" + apiobj.params.discussionpage + "]]" );
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = apiobj.params.discussionpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to the discussion page";
// Tagging article
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Adding deletion tag to article");
wikipedia_page.setFollowRedirect(true); // should never be needed, but if the article is moved, we would want to follow the redirect
wikipedia_page.setCallbackParameters(apiobj.params);
wikipedia_page.load(Twinkle.xfd.callbacks.afd.taggingArticle);
},
// Tagging needs to happen before everything else: this means we can check if there is an AfD tag already on the page
taggingArticle: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
if (!pageobj.exists()) {
statelem.error("It seems that the page doesn't exist; perhaps it has already been deleted");
return;
}
// Check for existing AfD tag, for the benefit of new page patrollers
var textNoAfd = text.replace(/\{\{\s*(Article for deletion\/dated|AfDM)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/g, "");
if (text !== textNoAfd) {
if (confirm("An AfD tag was found on this article. Maybe someone beat you to it. \nClick OK to replace the current AfD tag (not recommended), or Cancel to abandon your nomination.")) {
text = textNoAfd;
} else {
statelem.error("Article already tagged with AfD tag, and you chose to abort");
window.location.reload();
return;
}
}
// Now we know we want to go ahead with it, trigger the other AJAX requests
// Starting discussion page
var wikipedia_page = new Morebits.wiki.page(params.discussionpage, "Creating article deletion discussion page");
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.afd.discussionPage);
// Today's list
var date = new Date();
wikipedia_page = new Morebits.wiki.page('Wikipedia:Articles for deletion/Log/' + date.getUTCFullYear() + ' ' +
date.getUTCMonthName() + ' ' + date.getUTCDate(), "Adding discussion to today's list");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.afd.todaysList);
// Notification to first contributor
if (params.usertalk) {
var thispage = new Morebits.wiki.page(mw.config.get('wgPageName'));
thispage.setCallbackParameters(params);
thispage.lookupCreator(Twinkle.xfd.callbacks.afd.userNotification);
}
// Remove some tags that should always be removed on AfD.
text = text.replace(/\{\{\s*(dated prod|dated prod blp|Prod blp\/dated|Proposed deletion\/dated|prod2|Proposed deletion endorsed|New unreviewed article|Unreviewed|Userspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/ig, "");
// Then, test if there are speedy deletion-related templates on the article.
var textNoSd = text.replace(/\{\{\s*(db(-\w*)?|delete|(?:hang|hold)[\- ]?on)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/ig, "");
if (text !== textNoSd && confirm("A speedy deletion tag was found on this page. Should it be removed?")) {
text = textNoSd;
}
pageobj.setPageText((params.noinclude ? "<noinclude>{{" : "{{") + (params.number === '' ? "subst:afd|help=off" : ('subst:afdx|' +
params.number + "|help=off")) + (params.noinclude ? "}}</noinclude>\n" : "}}\n") + text);
pageobj.setEditSummary("Nominated for deletion; see [[" + params.discussionpage + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('nocreate');
pageobj.save();
},
discussionPage: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText("{{subst:afd2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|pg=" + Morebits.pageNameNorm + "|cat=" + params.xfdcat + "}}\n");
pageobj.setEditSummary("Creating deletion discussion page for [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('createonly');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
},
todaysList: function(pageobj) {
var old_text = pageobj.getPageText() + "\n"; // MW strips trailing blanks, but we like them, so we add a fake one
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var text = old_text.replace( /(<\!-- Add new entries to the TOP of the following list -->\n+)/, "$1{{subst:afd3|pg=" + Morebits.pageNameNorm + params.numbering + "}}\n");
if( text === old_text ) {
var linknode = document.createElement('a');
linknode.setAttribute("href", mw.util.getUrl("Wikipedia:Twinkle/Fixing AFD") + "?action=purge" );
linknode.appendChild(document.createTextNode('How to fix AFD'));
statelem.error( [ 'Could not find the target spot for the discussion. To fix this problem, please see ', linknode, '.' ] );
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary("Adding [[" + params.discussionpage + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchList')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save();
},
userNotification: function(pageobj) {
var params = pageobj.getCallbackParameters();
var initialContrib = pageobj.getCreator();
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:AFDWarning|1=" + Morebits.pageNameNorm + ( params.numbering !== '' ? '|order= ' + params.numbering : '' ) + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:AFD|articles for deletion]] of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
},
tfd: {
taggingTemplate: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText((params.noinclude ? "<noinclude>" : "") + "{{subst:template for discussion|help=off|" +
(params.tfdinline ? "type=inline|" : "") + mw.config.get('wgTitle') + (params.noinclude ? "}}</noinclude>" : "}}\n") + text);
pageobj.setEditSummary("Nominated for deletion; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('nocreate');
pageobj.save();
},
taggingTemplateForMerge: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText((params.noinclude ? "<noinclude>" : "") + "{{subst:tfm|help=off|" +
(params.tfdinline ? "type=inline|1=" : "1=") + params.otherTemplateName.replace(/^Template:/, "") +
(params.noinclude ? "}}</noinclude>" : "}}\n") + text);
pageobj.setEditSummary("Nominated for merging with [[" + params.otherTemplateName + "]]; see [[" +
params.logpage + "#" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('nocreate');
pageobj.save();
},
todaysList: function(pageobj) {
var old_text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var added_data = "";
switch( params.xfdcat ) {
case 'tfd':
added_data = "{{subst:tfd2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "}}";
break;
case 'tfm':
added_data = "{{subst:tfm2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "|2=" + params.target + "}}";
break;
default:
alert("twinklexfd in todaysList: unknown TFD action");
break;
}
var text = old_text.replace( '-->', "-->\n" + added_data );
if( text === old_text ) {
statelem.error( 'failed to find target spot for the discussion' );
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary("Adding [[Template:" + mw.config.get('wgTitle') + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
},
userNotification: function(pageobj) {
var initialContrib = pageobj.getCreator();
var params = pageobj.getCallbackParameters();
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n";
switch (params.xfdcat) {
case 'tfd':
notifytext += "{{subst:tfdnotice|1=" + mw.config.get('wgTitle') + "}} ~~~~";
break;
case 'tfm':
notifytext += "{{subst:tfmnotice|1=" + mw.config.get('wgTitle') + "|2=" + params.target + "}} ~~~~";
break;
default:
alert("twinklexfd in userNotification: unknown TFD action");
break;
}
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: nomination at [[WP:TFD|templates for discussion]] of [[" + pageobj.getPageName() + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
},
mfd: {
main: function(apiobj) {
var xmlDoc = apiobj.responseXML;
var titles = $(xmlDoc).find('allpages p');
// There has been no earlier entries with this prefix, just go on.
if( titles.length <= 0 ) {
apiobj.params.numbering = apiobj.params.number = '';
numbering = number = '';
} else {
var number = 0;
for( var i = 0; i < titles.length; ++i ) {
var title = titles[i].getAttribute('title');
// First, simple test, is there an instance with this exact name?
if( title === 'Wikipedia:Miscellany for deletion/' + Morebits.pageNameNorm ) {
number = Math.max( number, 1 );
continue;
}
var order_re = new RegExp( '^' +
RegExp.escape( 'Wikipedia:Miscellany for deletion/' + Morebits.pageNameNorm, true ) +
'\\s*\\(\\s*(\\d+)(?:(?:th|nd|rd|st) nom(?:ination)?)?\\s*\\)\\s*$' );
var match = order_re.exec( title );
// No match; A non-good value
if( !match ) {
continue;
}
// A match, set number to the max of current
number = Math.max( number, Number(match[1]) );
}
apiobj.params.number = Twinkle.xfd.num2order( parseInt( number, 10 ) + 1);
apiobj.params.numbering = number > 0 ? ' (' + apiobj.params.number + ' nomination)' : '';
}
apiobj.params.discussionpage = "Wikipedia:Miscellany for deletion/" + Morebits.pageNameNorm + apiobj.params.numbering;
apiobj.statelem.info( "next in order is [[" + apiobj.params.discussionpage + ']]');
// Tagging page
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging page with deletion tag");
wikipedia_page.setFollowRedirect(true); // should never be needed, but if the page is moved, we would want to follow the redirect
wikipedia_page.setCallbackParameters(apiobj.params);
wikipedia_page.load(Twinkle.xfd.callbacks.mfd.taggingPage);
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = apiobj.params.discussionpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to the discussion page";
// Discussion page
wikipedia_page = new Morebits.wiki.page(apiobj.params.discussionpage, "Creating deletion discussion page");
wikipedia_page.setCallbackParameters(apiobj.params);
wikipedia_page.load(Twinkle.xfd.callbacks.mfd.discussionPage);
// Today's list
wikipedia_page = new Morebits.wiki.page("Wikipedia:Miscellany for deletion", "Adding discussion to today's list");
//wikipedia_page.setPageSection(2);
// pageSection has been disabled - the API seems to throw up with nonexistent edit conflicts
// it can be turned on again once the problem is fixed, to save bandwidth
//wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(apiobj.params);
wikipedia_page.load(Twinkle.xfd.callbacks.mfd.todaysList);
// Notification to first contributor, and notification to owner of userspace (if applicable and required)
if (apiobj.params.usertalk) {
var thispage = new Morebits.wiki.page(mw.config.get('wgPageName'));
thispage.setCallbackParameters(apiobj.params);
thispage.lookupCreator(Twinkle.xfd.callbacks.mfd.userNotification);
}
},
taggingPage: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText((params.noinclude ? "<noinclude>" : "") + "{{" + ((params.number === '') ? "mfd}}\n" : ('mfdx|' + params.number + "}}\n")) +
(params.noinclude ? "</noinclude>" : "") + text);
pageobj.setEditSummary("Nominated for deletion; see [[" + params.discussionpage + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('nocreate');
pageobj.save();
},
discussionPage: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText("{{subst:mfd2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|pg=" + Morebits.pageNameNorm + "}}\n");
pageobj.setEditSummary("Creating deletion discussion page for [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('createonly');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
},
todaysList: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var date = new Date();
var date_header = "===" + date.getUTCMonthName() + ' ' + date.getUTCDate() + ', ' + date.getUTCFullYear() + "===\n";
var date_header_regex = new RegExp( "(===\\s*" + date.getUTCMonthName() + '\\s+' + date.getUTCDate() + ',\\s+' + date.getUTCFullYear() + "\\s*===)" );
var new_data = "{{subst:mfd3|pg=" + Morebits.pageNameNorm + params.numbering + "}}";
if( date_header_regex.test( text ) ) { // we have a section already
statelem.info( 'Found today\'s section, proceeding to add new entry' );
text = text.replace( date_header_regex, "$1\n" + new_data );
} else { // we need to create a new section
statelem.info( 'No section for today found, proceeding to create one' );
text = text.replace("===", date_header + new_data + "\n\n===");
}
pageobj.setPageText(text);
pageobj.setEditSummary("Adding [[" + params.discussionpage + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchList')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save();
},
userNotification: function(pageobj) {
var initialContrib = pageobj.getCreator();
var params = pageobj.getCallbackParameters();
// Really notify the creator
Twinkle.xfd.callbacks.mfd.userNotificationMain(params, initialContrib, "Notifying initial contributor");
// Also notify the user who owns the subpage if they are not the creator
if (params.notifyuserspace) {
var userspaceOwner = ((mw.config.get('wgTitle').indexOf('/') === -1) ? mw.config.get('wgTitle') : mw.config.get('wgTitle').substring(0, mw.config.get('wgTitle').indexOf('/')));
if (userspaceOwner !== initialContrib) {
Twinkle.xfd.callbacks.mfd.userNotificationMain(params, userspaceOwner, "Notifying owner of userspace");
}
}
},
userNotificationMain: function(params, initialContrib, actionName)
{
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, actionName + " (" + initialContrib + ")");
var notifytext = "\n{{subst:MFDWarning|1=" + Morebits.pageNameNorm + ( params.numbering !== '' ? '|order= ' + params.numbering : '' ) + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:MFD|miscellany for deletion]] of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
},
ffd: {
main: function(pageobj) {
// this is coming in from lookupCreator...!
var params = pageobj.getCallbackParameters();
var initialContrib = pageobj.getCreator();
params.uploader = initialContrib;
// Adding discussion
wikipedia_page = new Morebits.wiki.page(params.logpage, "Adding discussion to today's list");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.ffd.todaysList);
// Notification to first contributor
if(params.usertalk) {
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:idw|1=" + mw.config.get('wgTitle') + "}}";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:FFD|files for deletion]] of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
},
taggingImage: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, "");
pageobj.setPageText("{{ffd|log=" + params.date + "}}\n" + text);
pageobj.setEditSummary("Nominated for deletion; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate'); // it might be possible for a file to exist without a description page
pageobj.save();
},
todaysList: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
// add date header if the log is found to be empty (a bot should do this automatically, but it sometimes breaks down)
if (!pageobj.exists()) {
text = "{{subst:Ffd log}}";
}
pageobj.setPageText(text + "\n{{subst:ffd2|Reason=" + Morebits.string.formatReasonText(params.reason) +
"|Uploader=" + params.uploader + "|1=" + mw.config.get('wgTitle') + "}} ~~~~");
pageobj.setEditSummary("Adding [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
}
},
puf: {
taggingImage: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, "");
pageobj.setPageText("{{puf|help=off|log=" + params.date + "}}\n" + text);
pageobj.setEditSummary("Listed at [[WP:PUF|possibly unfree files]]: [[" + params.logpage + "#" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate'); // it might be possible for a file to exist without a description page
pageobj.save();
},
todaysList: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText(text + "\n{{subst:puf2|reason=" + Morebits.string.formatReasonText(params.reason) +
"|image=" + mw.config.get('wgTitle') + "}} ~~~~");
pageobj.setEditSummary("Adding [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
},
userNotification: function(pageobj) {
var initialContrib = pageobj.getCreator();
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:idw-puf|1=" + mw.config.get('wgTitle') + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:PUF|possibly unfree files]] of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
},
// NOTE: NFCR doesn't have any callbacks here, everything happens in callback.evaluate
cfd: {
taggingCategory: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var added_data = "";
var editsummary = "";
switch( params.xfdcat ) {
case 'cfd':
added_data = "{{subst:cfd}}";
editsummary = "Category being considered for deletion; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]].";
break;
case 'cfm':
added_data = "{{subst:cfm|" + params.target + "}}";
editsummary = "Category being considered for merging; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]].";
break;
case 'cfr':
added_data = "{{subst:cfr|" + params.target + "}}";
editsummary = "Category being considered for renaming; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]].";
break;
case 'cfs':
added_data = "{{subst:cfs|" + params.target + "|" + params.target2 + "}}";
editsummary = "Category being considered for splitting; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]].";
break;
case 'cfc':
added_data = "{{subst:cfc|" + params.target + "}}";
editsummary = "Category being considered for conversion to an article; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]].";
break;
default:
alert("twinklexfd in taggingCategory(): unknown CFD action");
break;
}
pageobj.setPageText(added_data + "\n" + text);
pageobj.setEditSummary(editsummary + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate'); // since categories can be populated without an actual page at that title
pageobj.save();
},
todaysList: function(pageobj) {
var old_text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var added_data = "";
var editsummary = "";
switch( params.xfdcat ) {
case 'cfd':
added_data = "{{subst:cfd2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "}}";
editsummary = "Added delete nomination of [[:" + Morebits.pageNameNorm + "]].";
break;
case 'cfm':
added_data = "{{subst:cfm2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "|2=" + params.target + "}}";
editsummary = "Added merge nomination of [[:" + Morebits.pageNameNorm + "]].";
break;
case 'cfr':
added_data = "{{subst:cfr2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "|2=" + params.target + "}}";
editsummary = "Added rename nomination of [[:" + Morebits.pageNameNorm + "]].";
break;
case 'cfs':
added_data = "{{subst:cfs2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "|2=" + params.target + "|3=" + params.target2 + "}}";
editsummary = "Added split nomination of [[:" + Morebits.pageNameNorm + "]].";
break;
case 'cfc':
added_data = "{{subst:cfc2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "|2=" + params.target + "}}";
editsummary = "Added convert nomination of [[:" + Morebits.pageNameNorm + "]].";
break;
default:
alert("twinklexfd in todaysList: unknown CFD action");
break;
}
text = old_text.replace( 'below this line -->', "below this line -->\n" + added_data );
if( text === old_text ) {
statelem.error( 'failed to find target spot for the discussion' );
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary(editsummary + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
},
userNotification: function(pageobj) {
var initialContrib = pageobj.getCreator();
var params = pageobj.getCallbackParameters();
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:CFDNote|1=" + Morebits.pageNameNorm + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:CFD|categories for discussion]] of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
},
cfds: {
taggingCategory: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText("{{subst:cfr-speedy|1=" + params.target + "}}\n" + text);
pageobj.setEditSummary("Nominated for speedy renaming; see [[WP:CFDS|Categories for discussion/Speedy]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate'); // since categories can be populated without an actual page at that title
pageobj.save();
},
addToList: function(pageobj) {
var old_text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var newcatname = (/^Category:/.test(params.target) ? params.target : ("Category:" + params.target));
text = old_text.replace( 'BELOW THIS LINE -->', "BELOW THIS LINE -->\n* [[:" + Morebits.pageNameNorm + "]] to [[:" +
newcatname + "]]\u00A0\u2013 " + params.xfdcat + (params.reason ? (": " + Morebits.string.formatReasonText(params.reason)) : ".") +
" ~~~~" );
// U+00A0 NO-BREAK SPACE; U+2013 EN RULE
if( text === old_text ) {
statelem.error( 'failed to find target spot for the discussion' );
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary("Adding [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
}
},
rfd: {
// This is a callback from an API request, which gets the target of the redirect
findTargetCallback: function(apiobj) {
var xmlDoc = apiobj.responseXML;
var target = $(xmlDoc).find('redirects r').first().attr('to');
if( !target ) {
apiobj.statelem.error( "This page is currently not a redirect, aborting" );
return;
}
apiobj.params.target = target;
Twinkle.xfd.callbacks.rfd.main(apiobj.params);
},
main: function(params) {
var date = new Date();
params.logpage = 'Wikipedia:Redirects for discussion/Log/' + date.getUTCFullYear() + ' ' + date.getUTCMonthName() + ' ' + date.getUTCDate();
// Tagging redirect
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Adding deletion tag to redirect");
wikipedia_page.setFollowRedirect(false);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.rfd.taggingRedirect);
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = params.logpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to today's log";
// Adding discussion
wikipedia_page = new Morebits.wiki.page(params.logpage, "Adding discussion to today's log");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.rfd.todaysList);
// Notifying initial contributor
if (params.usertalk) {
var thispage = new Morebits.wiki.page(mw.config.get('wgPageName'));
thispage.setCallbackParameters(params);
thispage.lookupCreator(Twinkle.xfd.callbacks.rfd.userNotification);
}
},
taggingRedirect: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText("{{subst:rfd}}\n" + text);
pageobj.setEditSummary("Listed for discussion at [[" + params.logpage + "#" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('nocreate');
pageobj.save();
},
todaysList: function(pageobj) {
var old_text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var text = old_text.replace( /(<\!-- Add new entries directly below this line\.? -->)/, "$1\n{{subst:rfd2|text=" +
Morebits.string.formatReasonText(params.reason) + "|redirect="+ Morebits.pageNameNorm + "|target=" +
params.target + "}} ~~~~\n" );
if( text === old_text ) {
statelem.error( 'failed to find target spot for the discussion' );
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary("Adding [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
},
userNotification: function(pageobj) {
var initialContrib = pageobj.getCreator();
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:RFDNote|1=" + Morebits.pageNameNorm + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:RFD|redirects for discussion]] of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
}
};
Twinkle.xfd.callback.evaluate = function(e) {
var type = e.target.category.value;
var usertalk = e.target.notify.checked;
var reason = e.target.xfdreason.value;
var xfdcat, xfdtarget, xfdtarget2, ffdvenue, noinclude, tfdinline, notifyuserspace;
if( type === "afd" || type === "cfd" || type === "cfds" || type === "tfd" ) {
xfdcat = e.target.xfdcat.value;
}
if( type === "cfd" || type === "cfds" ) {
xfdtarget = e.target.xfdtarget.value;
if (e.target.xfdtarget2) {
xfdtarget2 = e.target.xfdtarget2.value;
}
}
if( type === 'ffd' ) {
var ffdvenues = e.target.ffdvenue;
for( var i = 0; i < ffdvenues.length; i++ )
{
if( !ffdvenues[i].checked ) {
continue;
}
ffdvenue = ffdvenues[i].values;
break;
}
}
if( type === "afd" || type === "mfd" || type === "tfd" ) {
noinclude = e.target.noinclude.checked;
}
if( type === 'tfd' ) {
tfdinline = e.target.tfdinline.checked;
if (e.target.xfdtarget) {
xfdtarget = e.target.xfdtarget.value;
}
}
if( type === 'mfd' ) {
notifyuserspace = e.target.notifyuserspace && e.target.notifyuserspace.checked;
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( e.target );
Twinkle.xfd.currentRationale = reason;
Morebits.status.onError(Twinkle.xfd.printRationale);
if( !type ) {
Morebits.status.error( 'Error', 'no action given' );
return;
}
var query, wikipedia_page, wikipedia_api, logpage, params;
var date = new Date();
switch( type ) {
case 'afd': // AFD
query = {
'action': 'query',
'list': 'allpages',
'apprefix': 'Articles for deletion/' + Morebits.pageNameNorm,
'apnamespace': 4,
'apfilterredir': 'nonredirects',
'aplimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500
};
wikipedia_api = new Morebits.wiki.api( 'Tagging article with deletion tag', query, Twinkle.xfd.callbacks.afd.main );
wikipedia_api.params = { usertalk:usertalk, reason:reason, noinclude:noinclude, xfdcat:xfdcat };
wikipedia_api.post();
break;
case 'tfd': // TFD
Morebits.wiki.addCheckpoint();
if (xfdtarget) {
xfdtarget = Morebits.string.toUpperCaseFirstChar(xfdtarget.replace(/^\:?Template\:/i, ''));
} else {
xfdtarget = '';
}
logpage = 'Wikipedia:Templates for discussion/Log/' + date.getUTCFullYear() + ' ' + date.getUTCMonthName() + ' ' + date.getUTCDate();
params = { tfdinline: tfdinline, logpage: logpage, noinclude: noinclude, xfdcat: xfdcat, target: xfdtarget, reason: reason };
// Tagging template(s)
if (xfdcat === "tfm") {
// Tag this template
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging this template with merge tag");
wikipedia_page.setFollowRedirect(true);
params.otherTemplateName = "Template:" + xfdtarget;
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.tfd.taggingTemplateForMerge);
// Tag other template
wikipedia_page = new Morebits.wiki.page("Template:" + xfdtarget, "Tagging other template with merge tag");
wikipedia_page.setFollowRedirect(true);
params = $.extend(params);
params.otherTemplateName = Morebits.pageNameNorm;
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.tfd.taggingTemplateForMerge);
} else {
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging template with deletion tag");
wikipedia_page.setFollowRedirect(true); // should never be needed, but if the page is moved, we would want to follow the redirect
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.tfd.taggingTemplate);
}
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = logpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to today's log";
// Adding discussion
wikipedia_page = new Morebits.wiki.page(logpage, "Adding discussion to today's log");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.tfd.todaysList);
// Notification to first contributor
if (usertalk) {
var thispage = new Morebits.wiki.page(mw.config.get('wgPageName'));
thispage.setCallbackParameters(params);
thispage.lookupCreator(Twinkle.xfd.callbacks.tfd.userNotification);
// Nice try, but what if the two page creators are the same user?
// Also, other XFD types don't do this... yet!
//if (xfdcat === "tfm") {
// thispage = new Morebits.wiki.page("Template:" + xfdtarget);
// thispage.setCallbackParameters(params);
// thispage.lookupCreator(Twinkle.xfd.callbacks.tfd.userNotification);
//}
}
Morebits.wiki.removeCheckpoint();
break;
case 'mfd': // MFD
query = {
'action': 'query',
'list': 'allpages',
'apprefix': 'Miscellany for deletion/' + Morebits.pageNameNorm,
'apnamespace': 4,
'apfilterredir': 'nonredirects',
'aplimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500
};
wikipedia_api = new Morebits.wiki.api( "Looking for prior nominations of this page", query, Twinkle.xfd.callbacks.mfd.main );
wikipedia_api.params = { usertalk: usertalk, notifyuserspace: notifyuserspace, reason: reason, noinclude: noinclude, xfdcat: xfdcat };
wikipedia_api.post();
break;
case 'ffd': // FFD/PUF/NFCR
var dateString = date.getUTCFullYear() + ' ' + date.getUTCMonthName() + ' ' + date.getUTCDate();
logpage = 'Wikipedia:Files for deletion/' + dateString;
params = { usertalk: usertalk, reason: reason, date: dateString, logpage: logpage };
Morebits.wiki.addCheckpoint();
switch( ffdvenue ) {
case 'puf':
params.logpage = logpage = 'Wikipedia:Possibly unfree files/' + dateString;
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = logpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to today's list";
// Tagging file
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging file with PUF tag");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.puf.taggingImage);
// Adding discussion
wikipedia_page = new Morebits.wiki.page(params.logpage, "Adding discussion to today's list");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.puf.todaysList);
// Notification to first contributor
if (usertalk) {
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'));
wikipedia_page.setCallbackParameters(params);
wikipedia_page.lookupCreator(Twinkle.xfd.callbacks.puf.userNotification);
}
Morebits.wiki.removeCheckpoint();
break;
case 'nfcr':
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = "Wikipedia:Non-free content review";
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to the discussion page";
// Tagging file
if (mw.config.get('wgNamespaceNumber') === 6) {
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging file with review tag");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setPrependText("{{non-free review}}\n");
wikipedia_page.setEditSummary("This file" +
" has been listed for review at [[Wikipedia:Non-free content review#" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
wikipedia_page.setWatchlist(true);
break;
case 'no':
wikipedia_page.setWatchlistFromPreferences(false);
break;
default:
wikipedia_page.setWatchlistFromPreferences(true);
break;
}
wikipedia_page.setCreateOption('recreate'); // it might be possible for a file to exist without a description page
wikipedia_page.prepend();
}
// Adding discussion
wikipedia_page = new Morebits.wiki.page("Wikipedia:Non-free content review", "Adding discussion to the NFCR page");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setAppendText("\n\n== [[:" + Morebits.pageNameNorm + "]] ==\n\n" +
Morebits.string.formatReasonText(params.reason) + " ~~~~");
wikipedia_page.setEditSummary("Adding [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
wikipedia_page.setWatchlist(true);
break;
case 'no':
wikipedia_page.setWatchlistFromPreferences(false);
break;
default:
wikipedia_page.setWatchlistFromPreferences(true);
break;
}
wikipedia_page.setCreateOption('recreate');
wikipedia_page.append(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
// can't notify user on NFCR, so don't
Morebits.wiki.removeCheckpoint();
break;
default:
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = logpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to the discussion page";
// Tagging file
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Adding deletion tag to file page");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.ffd.taggingImage);
// Contributor specific edits
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'));
wikipedia_page.setCallbackParameters(params);
wikipedia_page.lookupCreator(Twinkle.xfd.callbacks.ffd.main);
break;
}
Morebits.wiki.removeCheckpoint();
break;
case 'cfd':
Morebits.wiki.addCheckpoint();
if( xfdtarget ) {
xfdtarget = xfdtarget.replace( /^\:?Category\:/i, '' );
} else {
xfdtarget = '';
}
if( xfdtarget2 ) {
xfdtarget2 = xfdtarget2.replace( /^\:?Category\:/i, '' );
}
logpage = 'Wikipedia:Categories for discussion/Log/' + date.getUTCFullYear() + ' ' + date.getUTCMonthName() + ' ' + date.getUTCDate();
params = { reason: reason, xfdcat: xfdcat, target: xfdtarget, target2: xfdtarget2, logpage: logpage };
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = logpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to today's log";
// Tagging category
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging category with deletion tag");
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.cfd.taggingCategory);
// Adding discussion to list
wikipedia_page = new Morebits.wiki.page(logpage, "Adding discussion to today's list");
//wikipedia_page.setPageSection(2);
// pageSection has been disabled - the API seems to throw up with nonexistent edit conflicts
// it can be turned on again once the problem is fixed, to save bandwidth
//wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.cfd.todaysList);
// Notification to first contributor
if (usertalk) {
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'));
wikipedia_page.setCallbackParameters(params);
wikipedia_page.lookupCreator(Twinkle.xfd.callbacks.cfd.userNotification);
}
Morebits.wiki.removeCheckpoint();
break;
case 'cfds':
xfdtarget = xfdtarget.replace( /^\:?Category\:/, '' );
logpage = "Wikipedia:Categories for discussion/Speedy";
params = { reason: reason, xfdcat: xfdcat, target: xfdtarget };
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = logpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to the discussion page";
// Tagging category
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging category with rename tag");
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.cfds.taggingCategory);
// Adding discussion to list
wikipedia_page = new Morebits.wiki.page(logpage, "Adding discussion to the list");
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.cfds.addToList);
break;
case 'rfd':
params = { usertalk: usertalk, reason: reason };
if (document.getElementById("softredirect")) {
// For soft redirects, skip straight to the callback
params.target = document.getElementById("softredirect").textContent.replace(/^\:+/, "");
Twinkle.xfd.callbacks.rfd.main(params);
} else {
// Find current target of redirect
query = {
'action': 'query',
'titles': mw.config.get('wgPageName'),
'redirects': true
};
wikipedia_api = new Morebits.wiki.api( "Finding target of redirect", query, Twinkle.xfd.callbacks.rfd.findTargetCallback );
wikipedia_api.params = params;
wikipedia_api.post();
}
break;
default:
alert("twinklexfd: unknown XFD discussion venue");
break;
}
};
})(jQuery);
//</nowiki>
abd745bf5d0eb47fb5469cb692b0226f50f6e425
329
2014-01-05T16:00:48Z
Amalthea
0
v2.0-681-g31f8e14: xfd: Restrict NFCR tagging to File namespace; Revert "tag: Remove {{[[Template:orphan|orphan]]}} tag"; morebits: fix a nasty typo in Morebits.wiki.api
javascript
text/javascript
//<nowiki>
(function($){
/*
****************************************
*** twinklexfd.js: XFD module
****************************************
* Mode of invocation: Tab ("XFD")
* Active on: Existing, non-special pages, except for file pages with no local (non-Commons) file which are not redirects
* Config directives in: TwinkleConfig
*/
Twinkle.xfd = function twinklexfd() {
// Disable on:
// * special pages
// * non-existent pages
// * files on Commons, whether there is a local page or not (unneeded local pages of files on Commons are eligible for CSD F2)
// * file pages without actual files (these are eligible for CSD G8)
if ( mw.config.get('wgNamespaceNumber') < 0 || !mw.config.get('wgArticleId') || (mw.config.get('wgNamespaceNumber') === 6 && (document.getElementById('mw-sharedupload') || (!document.getElementById('mw-imagepage-section-filehistory') && !Morebits.wiki.isPageRedirect()))) ) {
return;
}
Twinkle.addPortletLink( Twinkle.xfd.callback, "XFD", "tw-xfd", "Nominate for deletion" );
};
Twinkle.xfd.num2order = function twinklexfdNum2order( num ) {
switch( num ) {
case 1: return '';
case 2: return '2nd';
case 3: return '3rd';
default: return num + 'th';
}
};
Twinkle.xfd.currentRationale = null;
// error callback on Morebits.status.object
Twinkle.xfd.printRationale = function twinklexfdPrintRationale() {
if (Twinkle.xfd.currentRationale) {
var p = document.createElement("p");
p.textContent = "Your deletion rationale is provided below, which you can copy and paste into a new XFD dialog if you wish to try again:";
var pre = document.createElement("pre");
pre.className = "toccolours";
pre.style.marginTop = "0";
pre.textContent = Twinkle.xfd.currentRationale;
p.appendChild(pre);
Morebits.status.root.appendChild(p);
// only need to print the rationale once
Twinkle.xfd.currentRationale = null;
}
};
Twinkle.xfd.callback = function twinklexfdCallback() {
var Window = new Morebits.simpleWindow( 600, 350 );
Window.setTitle( "Nominate for deletion (XfD)" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "About deletion discussions", "WP:XFD" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#xfd" );
var form = new Morebits.quickForm( Twinkle.xfd.callback.evaluate );
var categories = form.append( {
type: 'select',
name: 'category',
label: 'Deletion discussion venue:',
tooltip: 'When activated, a default choice is made, based on what namespace you are in. This default should be the most appropriate',
event: Twinkle.xfd.callback.change_category
} );
categories.append( {
type: 'option',
label: 'AfD (Articles for deletion)',
selected: mw.config.get('wgNamespaceNumber') === 0, // Main namespace
value: 'afd'
} );
categories.append( {
type: 'option',
label: 'TfD (Templates for discussion)',
selected: mw.config.get('wgNamespaceNumber') === 10, // Template namespace
value: 'tfd'
} );
categories.append( {
type: 'option',
label: 'Discussion venues for files (FFD, PUF or NFCR)',
selected: mw.config.get('wgNamespaceNumber') === 6, // File namespace
value: 'ffd'
} );
categories.append( {
type: 'option',
label: 'CfD (Categories for discussion)',
selected: mw.config.get('wgNamespaceNumber') === 14, // Category namespace
value: 'cfd'
} );
categories.append( {
type: 'option',
label: 'CfD/S (Categories for speedy renaming)',
value: 'cfds'
} );
categories.append( {
type: 'option',
label: 'MfD (Miscellany for deletion)',
selected: [ 0, 6, 10, 14 ].indexOf( mw.config.get('wgNamespaceNumber') ) === -1,
value: 'mfd'
} );
categories.append( {
type: 'option',
label: 'RfD (Redirects for discussion)',
selected: Morebits.wiki.isPageRedirect(),
value: 'rfd'
} );
form.append( {
type: 'checkbox',
list: [
{
label: 'Notify page creator if possible',
value: 'notify',
name: 'notify',
tooltip: "A notification template will be placed on the creator's talk page if this is true.",
checked: true
}
]
}
);
form.append( {
type: 'field',
label:'Work area',
name: 'work_area'
} );
form.append( { type:'submit' } );
var result = form.render();
Window.setContent( result );
Window.display();
// We must init the controls
var evt = document.createEvent( "Event" );
evt.initEvent( 'change', true, true );
result.category.dispatchEvent( evt );
};
Twinkle.xfd.previousNotify = true;
Twinkle.xfd.callback.change_category = function twinklexfdCallbackChangeCategory(e) {
var value = e.target.value;
var form = e.target.form;
var old_area = Morebits.quickForm.getElements(e.target.form, "work_area")[0];
var work_area = null;
var oldreasontextbox = form.getElementsByTagName('textarea')[0];
var oldreason = (oldreasontextbox ? oldreasontextbox.value : '');
var appendReasonBox = function twinklexfdAppendReasonBox() {
work_area.append( {
type: 'textarea',
name: 'xfdreason',
label: 'Reason: ',
value: oldreason,
tooltip: 'You can use wikimarkup in your reason. Twinkle will automatically sign your post.'
} );
// TODO possible future "preview" link here
};
switch( value ) {
case 'afd':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Articles for deletion',
name: 'work_area'
} );
work_area.append( {
type: 'checkbox',
list: [
{
label: 'Wrap deletion tag with <noinclude>',
value: 'noinclude',
name: 'noinclude',
tooltip: 'Will wrap the deletion tag in <noinclude> tags, so that it won\'t transclude. This option is not normally required.'
}
]
} );
var afd_category = work_area.append( {
type:'select',
name:'xfdcat',
label:'Choose what category this nomination belongs in:'
} );
afd_category.append( { type:'option', label:'Unknown', value:'?', selected:true } );
afd_category.append( { type:'option', label:'Media and music', value:'M' } );
afd_category.append( { type:'option', label:'Organisation, corporation, or product', value:'O' } );
afd_category.append( { type:'option', label:'Biographical', value:'B' } );
afd_category.append( { type:'option', label:'Society topics', value:'S' } );
afd_category.append( { type:'option', label:'Web or internet', value:'W' } );
afd_category.append( { type:'option', label:'Games or sports', value:'G' } );
afd_category.append( { type:'option', label:'Science and technology', value:'T' } );
afd_category.append( { type:'option', label:'Fiction and the arts', value:'F' } );
afd_category.append( { type:'option', label:'Places and transportation', value:'P' } );
afd_category.append( { type:'option', label:'Indiscernible or unclassifiable topic', value:'I' } );
afd_category.append( { type:'option', label:'Debate not yet sorted', value:'U' } );
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'tfd':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Templates for discussion',
name: 'work_area'
} );
work_area.append( {
type: 'div',
label: 'Stub types and userboxes are not eligible for TfD. Stub types go to CfD, and userboxes go to MfD.'
} );
var tfd_category = work_area.append( {
type: 'select',
label: 'Choose type of action wanted: ',
name: 'xfdcat',
event: function(e) {
var target = e.target;
// add/remove extra input box
if( target.value === 'tfm' && !target.form.xfdtarget ) { //$(target.parentNode).find("input[name='xfdtarget']").length === 0 ) {
var xfdtarget = new Morebits.quickForm.element( {
name: 'xfdtarget',
type: 'input',
label: 'Other template to be merged: '
} );
target.parentNode.appendChild(xfdtarget.render());
} else {
$(Morebits.quickForm.getElementContainer(target.form.xfdtarget)).remove();
target.form.xfdtarget = null;
//$(target.parentNode).find("input[name='xfdtarget']").remove();
}
}
} );
tfd_category.append( { type: 'option', label: 'Deletion', value: 'tfd', selected: true } );
tfd_category.append( { type: 'option', label: 'Merge', value: 'tfm' } );
work_area.append( {
type: 'checkbox',
list: [
{
label: 'Inline deletion tag',
value: 'tfdinline',
name: 'tfdinline',
tooltip: 'Use {{tfd|type=inline}} to tag the page instead of {{tfd}}. Good for inline templates (those that appear amongst the words of text).',
checked: false
},
{
label: 'Wrap deletion tag with <noinclude> (for substituted templates only)',
value: 'noinclude',
name: 'noinclude',
tooltip: 'Will wrap the deletion tag in <noinclude> tags, so that it won\'t get substituted along with the template.'
}
]
} );
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'mfd':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Miscellany for deletion',
name: 'work_area'
} );
work_area.append( {
type: 'checkbox',
list: [
{
label: 'Wrap deletion tag with <noinclude>',
value: 'noinclude',
name: 'noinclude',
tooltip: 'Will wrap the deletion tag in <noinclude> tags, so that it won\'t transclude. Select this option for userboxes.'
}
]
} );
if (mw.config.get('wgNamespaceNumber') === 2 /* User: */ || mw.config.get('wgNamespaceNumber') === 3 /* User talk: */) {
work_area.append( {
type: 'checkbox',
list: [
{
label: 'Also notify owner of userspace if they are not the page creator',
value: 'notifyuserspace',
name: 'notifyuserspace',
tooltip: 'If the user in whose userspace this page is located, is not the page creator (for example, the page is a rescued article stored as a userspace draft), notify the userspace owner as well.',
checked: true
}
]
} );
}
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'ffd':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Discussion venues for files',
name: 'work_area'
} );
work_area.append( {
type: 'radio',
name: 'ffdvenue',
event: Twinkle.xfd.callback.ffdvenue_change,
list: [
{
label: 'File for deletion',
value: 'ffd',
tooltip: 'General deletion discussion',
checked: mw.config.get('wgNamespaceNumber') === 6
},
{
label: 'Possibly unfree file',
value: 'puf',
tooltip: 'File has disputed source or licensing information'
},
{
label: 'Non-free content review',
value: 'nfcr',
tooltip: 'File\'s compliance with non-free content criteria ([[WP:NFCC]]) is disputed. User notification does not occur for NFCR, as it is not deemed relevant.',
checked: mw.config.get('wgNamespaceNumber') !== 6
}
]
} );
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'cfd':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Categories for discussion',
name: 'work_area'
} );
var cfd_category = work_area.append( {
type: 'select',
label: 'Choose type of action wanted: ',
name: 'xfdcat',
event: function(e) {
var value = e.target.value;
var target = e.target.form.xfdtarget;
// update enabled status
if( value === 'cfd' ) {
target.disabled = true;
} else {
target.disabled = false;
}
// update label
if( value === 'cfs' ) {
target.previousSibling.textContent = "Target categories: ";
} else if( value === 'cfc' ) {
target.previousSibling.textContent = "Target article: ";
} else {
target.previousSibling.textContent = "Target category: ";
}
// add/remove extra input box
if( value === 'cfs' && $(target.parentNode).find("input[name='xfdtarget2']").length === 0 ) {
var xfdtarget2 = document.createElement("input");
xfdtarget2.setAttribute("name", "xfdtarget2");
xfdtarget2.setAttribute("type", "text");
target.parentNode.appendChild(xfdtarget2);
} else {
$(target.parentNode).find("input[name='xfdtarget2']").remove();
}
}
} );
cfd_category.append( { type: 'option', label: 'Deletion', value: 'cfd', selected: true } );
cfd_category.append( { type: 'option', label: 'Merge', value: 'cfm' } );
cfd_category.append( { type: 'option', label: 'Renaming', value: 'cfr' } );
cfd_category.append( { type: 'option', label: 'Split', value: 'cfs' } );
cfd_category.append( { type: 'option', label: 'Convert into article', value: 'cfc' } );
work_area.append( {
type: 'input',
name: 'xfdtarget',
label: 'Target page: ',
disabled: true,
value: ''
} );
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'cfds':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Categories for speedy renaming',
name: 'work_area'
} );
var cfds_category = work_area.append( {
type: 'select',
label: 'C2 sub-criterion: ',
name: 'xfdcat',
tooltip: 'See WP:CFDS for full explanations.',
event: function(e) {
var value = e.target.value;
var target = e.target.form.xfdtarget;
if( value === 'cfd' ) {
target.disabled = true;
} else {
target.disabled = false;
}
}
} );
cfds_category.append( { type: 'option', label: 'C2A: Typographic and spelling fixes', value: 'C2A', selected: true } );
cfds_category.append( { type: 'option', label: 'C2B: Naming conventions and disambiguation', value: 'C2B' } );
cfds_category.append( { type: 'option', label: 'C2C: Consistency with names of similar categories', value: 'C2C' } );
cfds_category.append( { type: 'option', label: 'C2D: Rename to match article name', value: 'C2D' } );
cfds_category.append( { type: 'option', label: 'C2E: Author request', value: 'C2E' } );
work_area.append( {
type: 'input',
name: 'xfdtarget',
label: 'New name: ',
value: ''
} );
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
case 'rfd':
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Redirects for discussion',
name: 'work_area'
} );
appendReasonBox();
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
default:
work_area = new Morebits.quickForm.element( {
type: 'field',
label: 'Nothing for anything',
name: 'work_area'
} );
work_area = work_area.render();
old_area.parentNode.replaceChild( work_area, old_area );
break;
}
// No creator notification for CFDS
if (value === "cfds") {
Twinkle.xfd.previousNotify = form.notify.checked;
form.notify.checked = false;
form.notify.disabled = true;
} else {
form.notify.checked = Twinkle.xfd.previousNotify;
form.notify.disabled = false;
}
};
Twinkle.xfd.callback.ffdvenue_change = function twinklexfdCallbackFfdvenueChange(e) {
if (e.target.values === "nfcr") {
e.target.form.notify.disabled = true;
e.target.form.notify.checked = false;
} else {
e.target.form.notify.disabled = false;
e.target.form.notify.checked = true;
}
};
Twinkle.xfd.callbacks = {
afd: {
main: function(apiobj) {
var xmlDoc = apiobj.responseXML;
var titles = $(xmlDoc).find('allpages p');
// There has been no earlier entries with this prefix, just go on.
if( titles.length <= 0 ) {
apiobj.params.numbering = apiobj.params.number = '';
} else {
var number = 0;
for( var i = 0; i < titles.length; ++i ) {
var title = titles[i].getAttribute('title');
// First, simple test, is there an instance with this exact name?
if( title === 'Wikipedia:Articles for deletion/' + Morebits.pageNameNorm ) {
number = Math.max( number, 1 );
continue;
}
var order_re = new RegExp( '^' +
RegExp.escape( 'Wikipedia:Articles for deletion/' + Morebits.pageNameNorm, true ) +
'\\s*\\(\\s*(\\d+)(?:(?:th|nd|rd|st) nom(?:ination)?)?\\s*\\)\\s*$');
var match = order_re.exec( title );
// No match; A non-good value
if( !match ) {
continue;
}
// A match, set number to the max of current
number = Math.max( number, Number(match[1]) );
}
apiobj.params.number = Twinkle.xfd.num2order( parseInt( number, 10 ) + 1);
apiobj.params.numbering = number > 0 ? ' (' + apiobj.params.number + ' nomination)' : '';
}
apiobj.params.discussionpage = 'Wikipedia:Articles for deletion/' + Morebits.pageNameNorm + apiobj.params.numbering;
Morebits.status.info( "Next discussion page", "[[" + apiobj.params.discussionpage + "]]" );
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = apiobj.params.discussionpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to the discussion page";
// Tagging article
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Adding deletion tag to article");
wikipedia_page.setFollowRedirect(true); // should never be needed, but if the article is moved, we would want to follow the redirect
wikipedia_page.setCallbackParameters(apiobj.params);
wikipedia_page.load(Twinkle.xfd.callbacks.afd.taggingArticle);
},
// Tagging needs to happen before everything else: this means we can check if there is an AfD tag already on the page
taggingArticle: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
if (!pageobj.exists()) {
statelem.error("It seems that the page doesn't exist; perhaps it has already been deleted");
return;
}
// Check for existing AfD tag, for the benefit of new page patrollers
var textNoAfd = text.replace(/\{\{\s*(Article for deletion\/dated|AfDM)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/g, "");
if (text !== textNoAfd) {
if (confirm("An AfD tag was found on this article. Maybe someone beat you to it. \nClick OK to replace the current AfD tag (not recommended), or Cancel to abandon your nomination.")) {
text = textNoAfd;
} else {
statelem.error("Article already tagged with AfD tag, and you chose to abort");
window.location.reload();
return;
}
}
// Now we know we want to go ahead with it, trigger the other AJAX requests
// Starting discussion page
var wikipedia_page = new Morebits.wiki.page(params.discussionpage, "Creating article deletion discussion page");
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.afd.discussionPage);
// Today's list
var date = new Date();
wikipedia_page = new Morebits.wiki.page('Wikipedia:Articles for deletion/Log/' + date.getUTCFullYear() + ' ' +
date.getUTCMonthName() + ' ' + date.getUTCDate(), "Adding discussion to today's list");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.afd.todaysList);
// Notification to first contributor
if (params.usertalk) {
var thispage = new Morebits.wiki.page(mw.config.get('wgPageName'));
thispage.setCallbackParameters(params);
thispage.lookupCreator(Twinkle.xfd.callbacks.afd.userNotification);
}
// Remove some tags that should always be removed on AfD.
text = text.replace(/\{\{\s*(dated prod|dated prod blp|Prod blp\/dated|Proposed deletion\/dated|prod2|Proposed deletion endorsed|New unreviewed article|Unreviewed|Userspace draft)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/ig, "");
// Then, test if there are speedy deletion-related templates on the article.
var textNoSd = text.replace(/\{\{\s*(db(-\w*)?|delete|(?:hang|hold)[\- ]?on)\s*(\|(?:\{\{[^{}]*\}\}|[^{}])*)?\}\}\s*/ig, "");
if (text !== textNoSd && confirm("A speedy deletion tag was found on this page. Should it be removed?")) {
text = textNoSd;
}
pageobj.setPageText((params.noinclude ? "<noinclude>{{" : "{{") + (params.number === '' ? "subst:afd|help=off" : ('subst:afdx|' +
params.number + "|help=off")) + (params.noinclude ? "}}</noinclude>\n" : "}}\n") + text);
pageobj.setEditSummary("Nominated for deletion; see [[" + params.discussionpage + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('nocreate');
pageobj.save();
},
discussionPage: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText("{{subst:afd2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|pg=" + Morebits.pageNameNorm + "|cat=" + params.xfdcat + "}}\n");
pageobj.setEditSummary("Creating deletion discussion page for [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('createonly');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
},
todaysList: function(pageobj) {
var old_text = pageobj.getPageText() + "\n"; // MW strips trailing blanks, but we like them, so we add a fake one
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var text = old_text.replace( /(<\!-- Add new entries to the TOP of the following list -->\n+)/, "$1{{subst:afd3|pg=" + Morebits.pageNameNorm + params.numbering + "}}\n");
if( text === old_text ) {
var linknode = document.createElement('a');
linknode.setAttribute("href", mw.util.getUrl("Wikipedia:Twinkle/Fixing AFD") + "?action=purge" );
linknode.appendChild(document.createTextNode('How to fix AFD'));
statelem.error( [ 'Could not find the target spot for the discussion. To fix this problem, please see ', linknode, '.' ] );
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary("Adding [[" + params.discussionpage + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchList')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save();
},
userNotification: function(pageobj) {
var params = pageobj.getCallbackParameters();
var initialContrib = pageobj.getCreator();
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:AFDWarning|1=" + Morebits.pageNameNorm + ( params.numbering !== '' ? '|order= ' + params.numbering : '' ) + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:AFD|articles for deletion]] of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
},
tfd: {
taggingTemplate: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText((params.noinclude ? "<noinclude>" : "") + "{{subst:template for discussion|help=off|" +
(params.tfdinline ? "type=inline|" : "") + mw.config.get('wgTitle') + (params.noinclude ? "}}</noinclude>" : "}}\n") + text);
pageobj.setEditSummary("Nominated for deletion; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('nocreate');
pageobj.save();
},
taggingTemplateForMerge: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText((params.noinclude ? "<noinclude>" : "") + "{{subst:tfm|help=off|" +
(params.tfdinline ? "type=inline|1=" : "1=") + params.otherTemplateName.replace(/^Template:/, "") +
(params.noinclude ? "}}</noinclude>" : "}}\n") + text);
pageobj.setEditSummary("Nominated for merging with [[" + params.otherTemplateName + "]]; see [[" +
params.logpage + "#" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('nocreate');
pageobj.save();
},
todaysList: function(pageobj) {
var old_text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var added_data = "";
switch( params.xfdcat ) {
case 'tfd':
added_data = "{{subst:tfd2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "}}";
break;
case 'tfm':
added_data = "{{subst:tfm2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "|2=" + params.target + "}}";
break;
default:
alert("twinklexfd in todaysList: unknown TFD action");
break;
}
var text = old_text.replace( '-->', "-->\n" + added_data );
if( text === old_text ) {
statelem.error( 'failed to find target spot for the discussion' );
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary("Adding [[Template:" + mw.config.get('wgTitle') + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
},
userNotification: function(pageobj) {
var initialContrib = pageobj.getCreator();
var params = pageobj.getCallbackParameters();
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n";
switch (params.xfdcat) {
case 'tfd':
notifytext += "{{subst:tfdnotice|1=" + mw.config.get('wgTitle') + "}} ~~~~";
break;
case 'tfm':
notifytext += "{{subst:tfmnotice|1=" + mw.config.get('wgTitle') + "|2=" + params.target + "}} ~~~~";
break;
default:
alert("twinklexfd in userNotification: unknown TFD action");
break;
}
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: nomination at [[WP:TFD|templates for discussion]] of [[" + pageobj.getPageName() + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
},
mfd: {
main: function(apiobj) {
var xmlDoc = apiobj.responseXML;
var titles = $(xmlDoc).find('allpages p');
// There has been no earlier entries with this prefix, just go on.
if( titles.length <= 0 ) {
apiobj.params.numbering = apiobj.params.number = '';
numbering = number = '';
} else {
var number = 0;
for( var i = 0; i < titles.length; ++i ) {
var title = titles[i].getAttribute('title');
// First, simple test, is there an instance with this exact name?
if( title === 'Wikipedia:Miscellany for deletion/' + Morebits.pageNameNorm ) {
number = Math.max( number, 1 );
continue;
}
var order_re = new RegExp( '^' +
RegExp.escape( 'Wikipedia:Miscellany for deletion/' + Morebits.pageNameNorm, true ) +
'\\s*\\(\\s*(\\d+)(?:(?:th|nd|rd|st) nom(?:ination)?)?\\s*\\)\\s*$' );
var match = order_re.exec( title );
// No match; A non-good value
if( !match ) {
continue;
}
// A match, set number to the max of current
number = Math.max( number, Number(match[1]) );
}
apiobj.params.number = Twinkle.xfd.num2order( parseInt( number, 10 ) + 1);
apiobj.params.numbering = number > 0 ? ' (' + apiobj.params.number + ' nomination)' : '';
}
apiobj.params.discussionpage = "Wikipedia:Miscellany for deletion/" + Morebits.pageNameNorm + apiobj.params.numbering;
apiobj.statelem.info( "next in order is [[" + apiobj.params.discussionpage + ']]');
// Tagging page
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging page with deletion tag");
wikipedia_page.setFollowRedirect(true); // should never be needed, but if the page is moved, we would want to follow the redirect
wikipedia_page.setCallbackParameters(apiobj.params);
wikipedia_page.load(Twinkle.xfd.callbacks.mfd.taggingPage);
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = apiobj.params.discussionpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to the discussion page";
// Discussion page
wikipedia_page = new Morebits.wiki.page(apiobj.params.discussionpage, "Creating deletion discussion page");
wikipedia_page.setCallbackParameters(apiobj.params);
wikipedia_page.load(Twinkle.xfd.callbacks.mfd.discussionPage);
// Today's list
wikipedia_page = new Morebits.wiki.page("Wikipedia:Miscellany for deletion", "Adding discussion to today's list");
//wikipedia_page.setPageSection(2);
// pageSection has been disabled - the API seems to throw up with nonexistent edit conflicts
// it can be turned on again once the problem is fixed, to save bandwidth
//wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(apiobj.params);
wikipedia_page.load(Twinkle.xfd.callbacks.mfd.todaysList);
// Notification to first contributor, and notification to owner of userspace (if applicable and required)
if (apiobj.params.usertalk) {
var thispage = new Morebits.wiki.page(mw.config.get('wgPageName'));
thispage.setCallbackParameters(apiobj.params);
thispage.lookupCreator(Twinkle.xfd.callbacks.mfd.userNotification);
}
},
taggingPage: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText((params.noinclude ? "<noinclude>" : "") + "{{" + ((params.number === '') ? "mfd}}\n" : ('mfdx|' + params.number + "}}\n")) +
(params.noinclude ? "</noinclude>" : "") + text);
pageobj.setEditSummary("Nominated for deletion; see [[" + params.discussionpage + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('nocreate');
pageobj.save();
},
discussionPage: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText("{{subst:mfd2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|pg=" + Morebits.pageNameNorm + "}}\n");
pageobj.setEditSummary("Creating deletion discussion page for [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('createonly');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
},
todaysList: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var date = new Date();
var date_header = "===" + date.getUTCMonthName() + ' ' + date.getUTCDate() + ', ' + date.getUTCFullYear() + "===\n";
var date_header_regex = new RegExp( "(===\\s*" + date.getUTCMonthName() + '\\s+' + date.getUTCDate() + ',\\s+' + date.getUTCFullYear() + "\\s*===)" );
var new_data = "{{subst:mfd3|pg=" + Morebits.pageNameNorm + params.numbering + "}}";
if( date_header_regex.test( text ) ) { // we have a section already
statelem.info( 'Found today\'s section, proceeding to add new entry' );
text = text.replace( date_header_regex, "$1\n" + new_data );
} else { // we need to create a new section
statelem.info( 'No section for today found, proceeding to create one' );
text = text.replace("===", date_header + new_data + "\n\n===");
}
pageobj.setPageText(text);
pageobj.setEditSummary("Adding [[" + params.discussionpage + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchList')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save();
},
userNotification: function(pageobj) {
var initialContrib = pageobj.getCreator();
var params = pageobj.getCallbackParameters();
// Really notify the creator
Twinkle.xfd.callbacks.mfd.userNotificationMain(params, initialContrib, "Notifying initial contributor");
// Also notify the user who owns the subpage if they are not the creator
if (params.notifyuserspace) {
var userspaceOwner = ((mw.config.get('wgTitle').indexOf('/') === -1) ? mw.config.get('wgTitle') : mw.config.get('wgTitle').substring(0, mw.config.get('wgTitle').indexOf('/')));
if (userspaceOwner !== initialContrib) {
Twinkle.xfd.callbacks.mfd.userNotificationMain(params, userspaceOwner, "Notifying owner of userspace");
}
}
},
userNotificationMain: function(params, initialContrib, actionName)
{
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, actionName + " (" + initialContrib + ")");
var notifytext = "\n{{subst:MFDWarning|1=" + Morebits.pageNameNorm + ( params.numbering !== '' ? '|order= ' + params.numbering : '' ) + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:MFD|miscellany for deletion]] of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
},
ffd: {
main: function(pageobj) {
// this is coming in from lookupCreator...!
var params = pageobj.getCallbackParameters();
var initialContrib = pageobj.getCreator();
params.uploader = initialContrib;
// Adding discussion
wikipedia_page = new Morebits.wiki.page(params.logpage, "Adding discussion to today's list");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.ffd.todaysList);
// Notification to first contributor
if(params.usertalk) {
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:idw|1=" + mw.config.get('wgTitle') + "}}";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:FFD|files for deletion]] of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
},
taggingImage: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, "");
pageobj.setPageText("{{ffd|log=" + params.date + "}}\n" + text);
pageobj.setEditSummary("Nominated for deletion; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate'); // it might be possible for a file to exist without a description page
pageobj.save();
},
todaysList: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
// add date header if the log is found to be empty (a bot should do this automatically, but it sometimes breaks down)
if (!pageobj.exists()) {
text = "{{subst:Ffd log}}";
}
pageobj.setPageText(text + "\n{{subst:ffd2|Reason=" + Morebits.string.formatReasonText(params.reason) +
"|Uploader=" + params.uploader + "|1=" + mw.config.get('wgTitle') + "}} ~~~~");
pageobj.setEditSummary("Adding [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
}
},
puf: {
taggingImage: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, "");
pageobj.setPageText("{{puf|help=off|log=" + params.date + "}}\n" + text);
pageobj.setEditSummary("Listed at [[WP:PUF|possibly unfree files]]: [[" + params.logpage + "#" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate'); // it might be possible for a file to exist without a description page
pageobj.save();
},
todaysList: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText(text + "\n{{subst:puf2|reason=" + Morebits.string.formatReasonText(params.reason) +
"|image=" + mw.config.get('wgTitle') + "}} ~~~~");
pageobj.setEditSummary("Adding [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
},
userNotification: function(pageobj) {
var initialContrib = pageobj.getCreator();
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:idw-puf|1=" + mw.config.get('wgTitle') + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:PUF|possibly unfree files]] of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
},
// NOTE: NFCR doesn't have any callbacks here, everything happens in callback.evaluate
cfd: {
taggingCategory: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var added_data = "";
var editsummary = "";
switch( params.xfdcat ) {
case 'cfd':
added_data = "{{subst:cfd}}";
editsummary = "Category being considered for deletion; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]].";
break;
case 'cfm':
added_data = "{{subst:cfm|" + params.target + "}}";
editsummary = "Category being considered for merging; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]].";
break;
case 'cfr':
added_data = "{{subst:cfr|" + params.target + "}}";
editsummary = "Category being considered for renaming; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]].";
break;
case 'cfs':
added_data = "{{subst:cfs|" + params.target + "|" + params.target2 + "}}";
editsummary = "Category being considered for splitting; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]].";
break;
case 'cfc':
added_data = "{{subst:cfc|" + params.target + "}}";
editsummary = "Category being considered for conversion to an article; see [[" + params.logpage + "#" + Morebits.pageNameNorm + "]].";
break;
default:
alert("twinklexfd in taggingCategory(): unknown CFD action");
break;
}
pageobj.setPageText(added_data + "\n" + text);
pageobj.setEditSummary(editsummary + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate'); // since categories can be populated without an actual page at that title
pageobj.save();
},
todaysList: function(pageobj) {
var old_text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var added_data = "";
var editsummary = "";
switch( params.xfdcat ) {
case 'cfd':
added_data = "{{subst:cfd2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "}}";
editsummary = "Added delete nomination of [[:" + Morebits.pageNameNorm + "]].";
break;
case 'cfm':
added_data = "{{subst:cfm2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "|2=" + params.target + "}}";
editsummary = "Added merge nomination of [[:" + Morebits.pageNameNorm + "]].";
break;
case 'cfr':
added_data = "{{subst:cfr2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "|2=" + params.target + "}}";
editsummary = "Added rename nomination of [[:" + Morebits.pageNameNorm + "]].";
break;
case 'cfs':
added_data = "{{subst:cfs2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "|2=" + params.target + "|3=" + params.target2 + "}}";
editsummary = "Added split nomination of [[:" + Morebits.pageNameNorm + "]].";
break;
case 'cfc':
added_data = "{{subst:cfc2|text=" + Morebits.string.formatReasonText(params.reason) +
" ~~~~|1=" + mw.config.get('wgTitle') + "|2=" + params.target + "}}";
editsummary = "Added convert nomination of [[:" + Morebits.pageNameNorm + "]].";
break;
default:
alert("twinklexfd in todaysList: unknown CFD action");
break;
}
text = old_text.replace( 'below this line -->', "below this line -->\n" + added_data );
if( text === old_text ) {
statelem.error( 'failed to find target spot for the discussion' );
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary(editsummary + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
},
userNotification: function(pageobj) {
var initialContrib = pageobj.getCreator();
var params = pageobj.getCallbackParameters();
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:CFDNote|1=" + Morebits.pageNameNorm + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:CFD|categories for discussion]] of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
},
cfds: {
taggingCategory: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText("{{subst:cfr-speedy|1=" + params.target + "}}\n" + text);
pageobj.setEditSummary("Nominated for speedy renaming; see [[WP:CFDS|Categories for discussion/Speedy]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate'); // since categories can be populated without an actual page at that title
pageobj.save();
},
addToList: function(pageobj) {
var old_text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var newcatname = (/^Category:/.test(params.target) ? params.target : ("Category:" + params.target));
text = old_text.replace( 'BELOW THIS LINE -->', "BELOW THIS LINE -->\n* [[:" + Morebits.pageNameNorm + "]] to [[:" +
newcatname + "]]\u00A0\u2013 " + params.xfdcat + (params.reason ? (": " + Morebits.string.formatReasonText(params.reason)) : ".") +
" ~~~~" );
// U+00A0 NO-BREAK SPACE; U+2013 EN RULE
if( text === old_text ) {
statelem.error( 'failed to find target spot for the discussion' );
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary("Adding [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
}
},
rfd: {
// This is a callback from an API request, which gets the target of the redirect
findTargetCallback: function(apiobj) {
var xmlDoc = apiobj.responseXML;
var target = $(xmlDoc).find('redirects r').first().attr('to');
if( !target ) {
apiobj.statelem.error( "This page is currently not a redirect, aborting" );
return;
}
apiobj.params.target = target;
Twinkle.xfd.callbacks.rfd.main(apiobj.params);
},
main: function(params) {
var date = new Date();
params.logpage = 'Wikipedia:Redirects for discussion/Log/' + date.getUTCFullYear() + ' ' + date.getUTCMonthName() + ' ' + date.getUTCDate();
// Tagging redirect
var wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Adding deletion tag to redirect");
wikipedia_page.setFollowRedirect(false);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.rfd.taggingRedirect);
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = params.logpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to today's log";
// Adding discussion
wikipedia_page = new Morebits.wiki.page(params.logpage, "Adding discussion to today's log");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.rfd.todaysList);
// Notifying initial contributor
if (params.usertalk) {
var thispage = new Morebits.wiki.page(mw.config.get('wgPageName'));
thispage.setCallbackParameters(params);
thispage.lookupCreator(Twinkle.xfd.callbacks.rfd.userNotification);
}
},
taggingRedirect: function(pageobj) {
var text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
pageobj.setPageText("{{subst:rfd}}\n" + text);
pageobj.setEditSummary("Listed for discussion at [[" + params.logpage + "#" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('nocreate');
pageobj.save();
},
todaysList: function(pageobj) {
var old_text = pageobj.getPageText();
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();
var text = old_text.replace( /(<\!-- Add new entries directly below this line\.? -->)/, "$1\n{{subst:rfd2|text=" +
Morebits.string.formatReasonText(params.reason) + "|redirect="+ Morebits.pageNameNorm + "|target=" +
params.target + "}} ~~~~\n" );
if( text === old_text ) {
statelem.error( 'failed to find target spot for the discussion' );
return;
}
pageobj.setPageText(text);
pageobj.setEditSummary("Adding [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
pageobj.setWatchlist(true);
break;
case 'no':
pageobj.setWatchlistFromPreferences(false);
break;
default:
pageobj.setWatchlistFromPreferences(true);
break;
}
pageobj.setCreateOption('recreate');
pageobj.save(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
},
userNotification: function(pageobj) {
var initialContrib = pageobj.getCreator();
var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "Notifying initial contributor (" + initialContrib + ")");
var notifytext = "\n{{subst:RFDNote|1=" + Morebits.pageNameNorm + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:RFD|redirects for discussion]] of [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
case 'yes':
usertalkpage.setWatchlist(true);
break;
case 'no':
usertalkpage.setWatchlistFromPreferences(false);
break;
default:
usertalkpage.setWatchlistFromPreferences(true);
break;
}
usertalkpage.setFollowRedirect(true);
usertalkpage.append();
}
}
};
Twinkle.xfd.callback.evaluate = function(e) {
var type = e.target.category.value;
var usertalk = e.target.notify.checked;
var reason = e.target.xfdreason.value;
var xfdcat, xfdtarget, xfdtarget2, ffdvenue, noinclude, tfdinline, notifyuserspace;
if( type === "afd" || type === "cfd" || type === "cfds" || type === "tfd" ) {
xfdcat = e.target.xfdcat.value;
}
if( type === "cfd" || type === "cfds" ) {
xfdtarget = e.target.xfdtarget.value;
if (e.target.xfdtarget2) {
xfdtarget2 = e.target.xfdtarget2.value;
}
}
if( type === 'ffd' ) {
var ffdvenues = e.target.ffdvenue;
for( var i = 0; i < ffdvenues.length; i++ )
{
if( !ffdvenues[i].checked ) {
continue;
}
ffdvenue = ffdvenues[i].values;
break;
}
}
if( type === "afd" || type === "mfd" || type === "tfd" ) {
noinclude = e.target.noinclude.checked;
}
if( type === 'tfd' ) {
tfdinline = e.target.tfdinline.checked;
if (e.target.xfdtarget) {
xfdtarget = e.target.xfdtarget.value;
}
}
if( type === 'mfd' ) {
notifyuserspace = e.target.notifyuserspace && e.target.notifyuserspace.checked;
}
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( e.target );
Twinkle.xfd.currentRationale = reason;
Morebits.status.onError(Twinkle.xfd.printRationale);
if( !type ) {
Morebits.status.error( 'Error', 'no action given' );
return;
}
var query, wikipedia_page, wikipedia_api, logpage, params;
var date = new Date();
switch( type ) {
case 'afd': // AFD
query = {
'action': 'query',
'list': 'allpages',
'apprefix': 'Articles for deletion/' + Morebits.pageNameNorm,
'apnamespace': 4,
'apfilterredir': 'nonredirects',
'aplimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500
};
wikipedia_api = new Morebits.wiki.api( 'Tagging article with deletion tag', query, Twinkle.xfd.callbacks.afd.main );
wikipedia_api.params = { usertalk:usertalk, reason:reason, noinclude:noinclude, xfdcat:xfdcat };
wikipedia_api.post();
break;
case 'tfd': // TFD
Morebits.wiki.addCheckpoint();
if (xfdtarget) {
xfdtarget = Morebits.string.toUpperCaseFirstChar(xfdtarget.replace(/^\:?Template\:/i, ''));
} else {
xfdtarget = '';
}
logpage = 'Wikipedia:Templates for discussion/Log/' + date.getUTCFullYear() + ' ' + date.getUTCMonthName() + ' ' + date.getUTCDate();
params = { tfdinline: tfdinline, logpage: logpage, noinclude: noinclude, xfdcat: xfdcat, target: xfdtarget, reason: reason };
// Tagging template(s)
if (xfdcat === "tfm") {
// Tag this template
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging this template with merge tag");
wikipedia_page.setFollowRedirect(true);
params.otherTemplateName = "Template:" + xfdtarget;
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.tfd.taggingTemplateForMerge);
// Tag other template
wikipedia_page = new Morebits.wiki.page("Template:" + xfdtarget, "Tagging other template with merge tag");
wikipedia_page.setFollowRedirect(true);
params = $.extend(params);
params.otherTemplateName = Morebits.pageNameNorm;
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.tfd.taggingTemplateForMerge);
} else {
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging template with deletion tag");
wikipedia_page.setFollowRedirect(true); // should never be needed, but if the page is moved, we would want to follow the redirect
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.tfd.taggingTemplate);
}
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = logpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to today's log";
// Adding discussion
wikipedia_page = new Morebits.wiki.page(logpage, "Adding discussion to today's log");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.tfd.todaysList);
// Notification to first contributor
if (usertalk) {
var thispage = new Morebits.wiki.page(mw.config.get('wgPageName'));
thispage.setCallbackParameters(params);
thispage.lookupCreator(Twinkle.xfd.callbacks.tfd.userNotification);
// Nice try, but what if the two page creators are the same user?
// Also, other XFD types don't do this... yet!
//if (xfdcat === "tfm") {
// thispage = new Morebits.wiki.page("Template:" + xfdtarget);
// thispage.setCallbackParameters(params);
// thispage.lookupCreator(Twinkle.xfd.callbacks.tfd.userNotification);
//}
}
Morebits.wiki.removeCheckpoint();
break;
case 'mfd': // MFD
query = {
'action': 'query',
'list': 'allpages',
'apprefix': 'Miscellany for deletion/' + Morebits.pageNameNorm,
'apnamespace': 4,
'apfilterredir': 'nonredirects',
'aplimit': Morebits.userIsInGroup( 'sysop' ) ? 5000 : 500
};
wikipedia_api = new Morebits.wiki.api( "Looking for prior nominations of this page", query, Twinkle.xfd.callbacks.mfd.main );
wikipedia_api.params = { usertalk: usertalk, notifyuserspace: notifyuserspace, reason: reason, noinclude: noinclude, xfdcat: xfdcat };
wikipedia_api.post();
break;
case 'ffd': // FFD/PUF/NFCR
var dateString = date.getUTCFullYear() + ' ' + date.getUTCMonthName() + ' ' + date.getUTCDate();
logpage = 'Wikipedia:Files for deletion/' + dateString;
params = { usertalk: usertalk, reason: reason, date: dateString, logpage: logpage };
Morebits.wiki.addCheckpoint();
switch( ffdvenue ) {
case 'puf':
params.logpage = logpage = 'Wikipedia:Possibly unfree files/' + dateString;
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = logpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to today's list";
// Tagging file
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging file with PUF tag");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.puf.taggingImage);
// Adding discussion
wikipedia_page = new Morebits.wiki.page(params.logpage, "Adding discussion to today's list");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.puf.todaysList);
// Notification to first contributor
if (usertalk) {
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'));
wikipedia_page.setCallbackParameters(params);
wikipedia_page.lookupCreator(Twinkle.xfd.callbacks.puf.userNotification);
}
Morebits.wiki.removeCheckpoint();
break;
case 'nfcr':
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = "Wikipedia:Non-free content review";
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to the discussion page";
// Tagging file
if (mw.config.get('wgNamespaceNumber') === 6) {
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging file with review tag");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setPrependText("{{non-free review}}\n");
wikipedia_page.setEditSummary("This file" +
" has been listed for review at [[Wikipedia:Non-free content review#" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
wikipedia_page.setWatchlist(true);
break;
case 'no':
wikipedia_page.setWatchlistFromPreferences(false);
break;
default:
wikipedia_page.setWatchlistFromPreferences(true);
break;
}
wikipedia_page.setCreateOption('recreate'); // it might be possible for a file to exist without a description page
wikipedia_page.prepend();
}
// Adding discussion
wikipedia_page = new Morebits.wiki.page("Wikipedia:Non-free content review", "Adding discussion to the NFCR page");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setAppendText("\n\n== [[:" + Morebits.pageNameNorm + "]] ==\n\n" +
Morebits.string.formatReasonText(params.reason) + " ~~~~");
wikipedia_page.setEditSummary("Adding [[" + Morebits.pageNameNorm + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchDiscussion')) {
case 'yes':
wikipedia_page.setWatchlist(true);
break;
case 'no':
wikipedia_page.setWatchlistFromPreferences(false);
break;
default:
wikipedia_page.setWatchlistFromPreferences(true);
break;
}
wikipedia_page.setCreateOption('recreate');
wikipedia_page.append(function() {
Twinkle.xfd.currentRationale = null; // any errors from now on do not need to print the rationale, as it is safely saved on-wiki
});
// can't notify user on NFCR, so don't
Morebits.wiki.removeCheckpoint();
break;
default:
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = logpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to the discussion page";
// Tagging file
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Adding deletion tag to file page");
wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.ffd.taggingImage);
// Contributor specific edits
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'));
wikipedia_page.setCallbackParameters(params);
wikipedia_page.lookupCreator(Twinkle.xfd.callbacks.ffd.main);
break;
}
Morebits.wiki.removeCheckpoint();
break;
case 'cfd':
Morebits.wiki.addCheckpoint();
if( xfdtarget ) {
xfdtarget = xfdtarget.replace( /^\:?Category\:/i, '' );
} else {
xfdtarget = '';
}
if( xfdtarget2 ) {
xfdtarget2 = xfdtarget2.replace( /^\:?Category\:/i, '' );
}
logpage = 'Wikipedia:Categories for discussion/Log/' + date.getUTCFullYear() + ' ' + date.getUTCMonthName() + ' ' + date.getUTCDate();
params = { reason: reason, xfdcat: xfdcat, target: xfdtarget, target2: xfdtarget2, logpage: logpage };
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = logpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to today's log";
// Tagging category
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging category with deletion tag");
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.cfd.taggingCategory);
// Adding discussion to list
wikipedia_page = new Morebits.wiki.page(logpage, "Adding discussion to today's list");
//wikipedia_page.setPageSection(2);
// pageSection has been disabled - the API seems to throw up with nonexistent edit conflicts
// it can be turned on again once the problem is fixed, to save bandwidth
//wikipedia_page.setFollowRedirect(true);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.cfd.todaysList);
// Notification to first contributor
if (usertalk) {
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'));
wikipedia_page.setCallbackParameters(params);
wikipedia_page.lookupCreator(Twinkle.xfd.callbacks.cfd.userNotification);
}
Morebits.wiki.removeCheckpoint();
break;
case 'cfds':
xfdtarget = xfdtarget.replace( /^\:?Category\:/, '' );
logpage = "Wikipedia:Categories for discussion/Speedy";
params = { reason: reason, xfdcat: xfdcat, target: xfdtarget };
// Updating data for the action completed event
Morebits.wiki.actionCompleted.redirect = logpage;
Morebits.wiki.actionCompleted.notice = "Nomination completed, now redirecting to the discussion page";
// Tagging category
wikipedia_page = new Morebits.wiki.page(mw.config.get('wgPageName'), "Tagging category with rename tag");
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.cfds.taggingCategory);
// Adding discussion to list
wikipedia_page = new Morebits.wiki.page(logpage, "Adding discussion to the list");
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.xfd.callbacks.cfds.addToList);
break;
case 'rfd':
params = { usertalk: usertalk, reason: reason };
if (document.getElementById("softredirect")) {
// For soft redirects, skip straight to the callback
params.target = document.getElementById("softredirect").textContent.replace(/^\:+/, "");
Twinkle.xfd.callbacks.rfd.main(params);
} else {
// Find current target of redirect
query = {
'action': 'query',
'titles': mw.config.get('wgPageName'),
'redirects': true
};
wikipedia_api = new Morebits.wiki.api( "Finding target of redirect", query, Twinkle.xfd.callbacks.rfd.findTargetCallback );
wikipedia_api.params = params;
wikipedia_api.post();
}
break;
default:
alert("twinklexfd: unknown XFD discussion venue");
break;
}
};
})(jQuery);
//</nowiki>
abd745bf5d0eb47fb5469cb692b0226f50f6e425
MediaWiki:Gadget-wikEd
8
50
198
134
2014-01-16T16:43:39Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
[[User:Cacycle/wikEd|wikEd]], a full-featured integrated text editor for [[Mozilla Firefox|Firefox]], [[Safari (web browser)|Safari]], and [[Google Chrome]]. Please read the [[User:Cacycle/wikEd help|help page]] for usage instructions.
2636eac59a8a85b9b194ce9a50119a5d9f385214
134
133
2014-01-16T15:42:43Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
[[User:Cacycle/wikEd|wikEd]], a full-featured integrated text editor for [[Mozilla Firefox|Firefox]], [[Safari (web browser)|Safari]], and [[Google Chrome]]. Please read the [[User:Cacycle/wikEd help|help page]] for usage instructions.
2636eac59a8a85b9b194ce9a50119a5d9f385214
197
134
2011-11-16T19:40:59Z
Beau
0
drobne merytoryczne
wikitext
text/x-wiki
[[Wikipedia:Narzędzia/wikEd|wikEd]] – narzędzie rozszerzające możliwości edytora artykułów. Po zainstalowaniu go nad oknem edycji pojawia się zestaw pasków edycyjnych, dzięki którym można szybko i łatwo przeprowadzać edycję treści, która dodatkowo prezentowana jest w sposób, który podkreśla składnię MediaWiki.
2b591b088be2eb51042f562124757e64f47f33c7
133
2008-09-21T06:28:09Z
Cacycle
0
wikEd, a full-featured integrated text editor for Firefox, Safari, and Google Chrome. Please read the help page for usage instructions.
wikitext
text/x-wiki
[[User:Cacycle/wikEd|wikEd]], a full-featured integrated text editor for [[Mozilla Firefox|Firefox]], [[Safari (web browser)|Safari]], and [[Google Chrome]]. Please read the [[User:Cacycle/wikEd help|help page]] for usage instructions.
2636eac59a8a85b9b194ce9a50119a5d9f385214
MediaWiki:Gadget-wikEd.js
8
51
200
136
2014-01-16T16:43:39Z
Ffkapa
2
1 wersja
javascript
text/javascript
// _________________________________________________________________________________________
// | |
// | === WARNING: GLOBAL GADGET FILE === |
// | Changes to this page affect many users. |
// | Please discuss changes on the talk page or on [[Wikipedia_talk:Gadget]] before editing. |
// |_________________________________________________________________________________________|
//
// Imports [[User:Cacycle/wikEd.js]]
// wikEd is a full-featured in-browser editor for Wikipedia, see [[User:Cacycle/wikEd]]
// disable loading for IE, not needed, but might save a few milliseconds
if ( navigator.appName !== 'Microsoft Internet Explorer' ) {
// load [[User:Cacycle/wikEd]] in-browser text editor
importScript('User:Cacycle/wikEd.js');
}
e318182b42a7175aec006bf7bb7ffdc0e48e0b0d
136
135
2014-01-16T15:42:43Z
Ffkapa
2
1 wersja
javascript
text/javascript
// _________________________________________________________________________________________
// | |
// | === WARNING: GLOBAL GADGET FILE === |
// | Changes to this page affect many users. |
// | Please discuss changes on the talk page or on [[Wikipedia_talk:Gadget]] before editing. |
// |_________________________________________________________________________________________|
//
// Imports [[User:Cacycle/wikEd.js]]
// wikEd is a full-featured in-browser editor for Wikipedia, see [[User:Cacycle/wikEd]]
// disable loading for IE, not needed, but might save a few milliseconds
if ( navigator.appName !== 'Microsoft Internet Explorer' ) {
// load [[User:Cacycle/wikEd]] in-browser text editor
importScript('User:Cacycle/wikEd.js');
}
e318182b42a7175aec006bf7bb7ffdc0e48e0b0d
135
2012-01-16T20:56:27Z
Krinkle
0
javascript
text/javascript
// _________________________________________________________________________________________
// | |
// | === WARNING: GLOBAL GADGET FILE === |
// | Changes to this page affect many users. |
// | Please discuss changes on the talk page or on [[Wikipedia_talk:Gadget]] before editing. |
// |_________________________________________________________________________________________|
//
// Imports [[User:Cacycle/wikEd.js]]
// wikEd is a full-featured in-browser editor for Wikipedia, see [[User:Cacycle/wikEd]]
// disable loading for IE, not needed, but might save a few milliseconds
if ( navigator.appName !== 'Microsoft Internet Explorer' ) {
// load [[User:Cacycle/wikEd]] in-browser text editor
importScript('User:Cacycle/wikEd.js');
}
e318182b42a7175aec006bf7bb7ffdc0e48e0b0d
199
136
2011-10-02T19:14:46Z
Beau
0
javascript
text/javascript
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript');
87261b40bffafa2053e1e98bdc5f1b74508d0a0d
MediaWiki:Gadgets-definition
8
31
296
295
2014-01-17T00:35:33Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== Biblioteki ==
* lib-toolbar [ResourceLoader | dependencies=mediawiki.user, user.options | rights=hidden | hidden] | lib-toolbar.js
* style-summary-buttons [ResourceLoader | rights=hidden | hidden] | summary-buttons.css
* gConfig [ResourceLoader | dependencies=jquery.cookie, mediawiki.api, mediawiki, mediawiki.jqueryMsg | rights=hidden | hidden] | gConfig.js | gConfig.css
== browsing ==
* main-page [ResourceLoader | top | default] | main-page.js | main-page.css
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
* ReferenceTooltips [ResourceLoader | default] | ReferenceTooltips.js | ReferenceTooltips.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
* diffhistory | diffhistory.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
* move-to-sandbox [ResourceLoader | dependencies=mediawiki.util, jquery.ui.dialog | rights=move] | move-to-sandbox.css | move-to-sandbox.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== Administracja ==
* wikEd | wikEd.js
delete [ResourceLoader | dependencies=mediawiki.util, ext.gadget.style-summary-buttons | rights=delete] | delete-local.js | delete.js
* edit-summaries [ResourceLoader | dependencies=ext.gadget.style-summary-buttons | default] | edit-summaries.js
== deprecated ==
ee98810ba47a5b00318f316a4d685b2bdd1cc8d8
295
284
2014-01-17T00:33:25Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== Biblioteki ==
* lib-toolbar [ResourceLoader | dependencies=mediawiki.user, user.options | rights=hidden | hidden] | lib-toolbar.js
* style-summary-buttons [ResourceLoader | rights=hidden | hidden] | summary-buttons.css
* gConfig [ResourceLoader | dependencies=jquery.cookie, mediawiki.api, mediawiki, mediawiki.jqueryMsg | rights=hidden | hidden] | gConfig.js | gConfig.css
== browsing ==
* main-page [ResourceLoader | top | default] | main-page.js | main-page.css
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
* ReferenceTooltips [ResourceLoader | default] | ReferenceTooltips.js | ReferenceTooltips.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
* diffhistory | diffhistory.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
* move-to-sandbox [ResourceLoader | dependencies=mediawiki.util, jquery.ui.dialog | rights=move] | move-to-sandbox.css | move-to-sandbox.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== Administracja ==
* wikEd | wikEd.js
delete [ResourceLoader | dependencies=mediawiki.util, ext.gadget.style-summary-buttons | rights=delete] | delete-local.js | delete.js
== deprecated ==
229afc3e35da036888acd2e3c2cdde0230473ced
284
279
2014-01-17T00:29:43Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== Biblioteki ==
* lib-toolbar [ResourceLoader | dependencies=mediawiki.user, user.options | rights=hidden | hidden] | lib-toolbar.js
== browsing ==
* main-page [ResourceLoader | top | default] | main-page.js | main-page.css
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
* ReferenceTooltips [ResourceLoader | default] | ReferenceTooltips.js | ReferenceTooltips.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
* diffhistory | diffhistory.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
* move-to-sandbox [ResourceLoader | dependencies=mediawiki.util, jquery.ui.dialog | rights=move] | move-to-sandbox.css | move-to-sandbox.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== Administracja ==
* wikEd | wikEd.js
delete [ResourceLoader | dependencies=mediawiki.util, ext.gadget.style-summary-buttons | rights=delete] | delete-local.js | delete.js
== deprecated ==
6f3baeeea87534869321a9b2f0ce640145cf8872
279
278
2014-01-17T00:24:51Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* main-page [ResourceLoader | top | default] | main-page.js | main-page.css
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
* ReferenceTooltips [ResourceLoader | default] | ReferenceTooltips.js | ReferenceTooltips.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
* diffhistory | diffhistory.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
* move-to-sandbox [ResourceLoader | dependencies=mediawiki.util, jquery.ui.dialog | rights=move] | move-to-sandbox.css | move-to-sandbox.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== Administracja ==
* wikEd | wikEd.js
delete [ResourceLoader | dependencies=mediawiki.util, ext.gadget.style-summary-buttons | rights=delete] | delete-local.js | delete.js
== deprecated ==
0efcfc143bb8df44632e14af0a49fc06faebda7f
278
277
2014-01-17T00:23:57Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* main-page [ResourceLoader | top | default] | main-page.js | main-page.css
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
* ReferenceTooltips [ResourceLoader | default] | ReferenceTooltips.js | ReferenceTooltips.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
* diffhistory | diffhistory.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
* move-to-sandbox [ResourceLoader | dependencies=mediawiki.util, jquery.ui.dialog | rights=move] | move-to-sandbox.css | move-to-sandbox.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== Administracja ==
delete [ResourceLoader | dependencies=mediawiki.util, ext.gadget.style-summary-buttons | rights=delete] | delete-local.js | delete.js
== deprecated ==
53e3e3a53968f10ca128e60df17d2828645aedb8
277
276
2014-01-17T00:10:22Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* main-page [ResourceLoader | top | default] | main-page.js | main-page.css
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
* ReferenceTooltips [ResourceLoader | default] | ReferenceTooltips.js | ReferenceTooltips.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
* diffhistory | diffhistory.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
* move-to-sandbox [ResourceLoader | dependencies=mediawiki.util, jquery.ui.dialog | rights=move] | move-to-sandbox.css | move-to-sandbox.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== Administracja ==
delete [ResourceLoader | dependencies=mediawiki.util, ext.gadget.style-summary-buttons | rights=delete] | delete-local.js | delete.js
== deprecated ==
6927f34f214800758b7b2d1c919dbfade2cfe9e5
276
269
2014-01-17T00:05:12Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* main-page [ResourceLoader | top | default] | main-page.js | main-page.css
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
* ReferenceTooltips [ResourceLoader | default] | ReferenceTooltips.js | ReferenceTooltips.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
* diffhistory | diffhistory.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
* move-to-sandbox [ResourceLoader | dependencies=mediawiki.util, jquery.ui.dialog | rights=move] | move-to-sandbox.css | move-to-sandbox.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== Administracja ==
* delete [ResourceLoader | dependencies=mediawiki.util, ext.gadget.style-summary-buttons | rights=delete] | delete-local.js | delete.js
== deprecated ==
64582ddce32495e3d7a41c018d95a7d97376bb08
269
251
2014-01-17T00:01:22Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* main-page [ResourceLoader | top | default] | main-page.js | main-page.css
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
* ReferenceTooltips [ResourceLoader | default] | ReferenceTooltips.js | ReferenceTooltips.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
* diffhistory | diffhistory.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
* move-to-sandbox [ResourceLoader | dependencies=mediawiki.util, jquery.ui.dialog | rights=move] | move-to-sandbox.css | move-to-sandbox.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
f17f4ad718c71cdb133c0138acbff07ba48788ba
251
244
2014-01-16T23:53:46Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
* ReferenceTooltips [ResourceLoader | default] | ReferenceTooltips.js | ReferenceTooltips.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
* diffhistory | diffhistory.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
* move-to-sandbox [ResourceLoader | dependencies=mediawiki.util, jquery.ui.dialog | rights=move] | move-to-sandbox.css | move-to-sandbox.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
a47ddabf98f403658fb29823e35bb4ecd4d1f272
244
233
2014-01-16T23:49:49Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
* ReferenceTooltips [ResourceLoader | default] | ReferenceTooltips.js | ReferenceTooltips.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
* diffhistory | diffhistory.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
f5ecfa820d4f52500ab47b768629f6a058864da4
233
232
2014-01-16T23:44:54Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
* ReferenceTooltips [ResourceLoader | default] | ReferenceTooltips.js | ReferenceTooltips.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
9f914160800d6e062dd1e4abd981137f32461aeb
232
225
2014-01-16T23:43:10Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
* ReferenceTooltips [ResourceLoader | default] | ReferenceTooltips.js | ReferenceTooltips.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
99946cd6f51f8a693cbb0638f10212541aba1f11
225
220
2014-01-16T23:40:15Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
abebaab7056e4a8adac040f272a948227729d556
220
215
2014-01-16T23:36:26Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
cc2fa3dfd0137d3f3c92a416455e31150536f933
215
210
2014-01-16T23:32:46Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-references [ResourceLoader | default] | small-references.css
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
c15a192d6fc499335ff4c710ffa47b6b524b9569
210
205
2014-01-16T23:28:39Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
d149de92eadafc2990cf6079d8de3e292fb88f31
205
204
2014-01-16T23:22:18Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
e413ba463028adca36f89141118a7c536a9d36b1
204
203
2014-01-16T23:20:42Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* edit-summaries [ResourceLoader | default] | edit-summaries.js
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
16e22cd814b0367f2de08bfdf1fcdf854e1972d8
203
202
2014-01-16T23:07:14Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* edit-summaries [ResourceLoader | dependencies=ext.gadget.style-summary-buttons | default] | edit-summaries.js
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
70c719e6dad378518bd5f0460d3b703e565fbb88
202
201
2014-01-16T16:51:12Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
2b4b1ec92aa45bf2f4121cc9e3c68f59fd939032
201
196
2014-01-16T16:45:50Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
wikEdDiff|wikEdDiff.js
* wikEd|wikEd.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
84828976bb0596b0ab7bf8a19cf84bfd32fdcdb6
196
191
2014-01-16T16:38:05Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Extra-tabs | Extra-tabs.js
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
2b4b1ec92aa45bf2f4121cc9e3c68f59fd939032
191
186
2014-01-16T16:34:23Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* quickeditcounter[ResourceLoader|dependencies=mediawiki.util]|quickeditcounter.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
ab22c3599913f6be4089a2faed98aba6b2bb5d0f
186
108
2014-01-16T16:31:36Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
Navigation_popups|popups.js|navpop.css
* Navigation popups|Popups.js|Popups.css|Popups-strings.js
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
7ff88b0b6c163598e0bd8ebebc1fd76b1fa19aa5
108
107
2014-01-16T13:49:02Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
* Navigation_popups|popups.js|navpop.css
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
330484092eb1615ed23067f4add4e6d00ab0abce
107
106
2014-01-16T13:41:09Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
* Navigation_popups|popups.js|navpop.css
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
* edit-summaries[ResourceLoader|dependencies=ext.gadget.style-summary-buttons|default]|edit-summaries.js
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
f6acfef1fa45f060ae1adcd7e09e053b23723d1a
106
105
2014-01-16T13:31:18Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
* Navigation_popups|popups.js|navpop.css
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
330484092eb1615ed23067f4add4e6d00ab0abce
105
104
2014-01-16T13:09:14Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
* Navigation_popups|popups.js|navpop.css
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
* editform-ui-fixes[ResourceLoader|dependencies=ext.gadget.gConfig,ext.gadget.edittools-enhanced]|editform-ui-fixes.css
* edit-summaries[ResourceLoader|dependencies=ext.gadget.style-summary-buttons|default]|edit-summaries.js
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
072087c51ea34e66e1531d7f52ce3e04949c6c8b
104
103
2014-01-16T13:07:21Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
* Navigation_popups|popups.js|navpop.css
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
* editform-ui-fixes[ResourceLoader|dependencies=ext.gadget.gConfig, ext.gadget.edittools-enhanced]|editform-ui-fixes.css
* edit-summaries[ResourceLoader|dependencies=ext.gadget.style-summary-buttons|default]|edit-summaries.js
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
69a9662d6f37f3f54260174e2fac566f53395cfa
103
98
2014-01-16T13:06:14Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
* Navigation_popups|popups.js|navpop.css
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
* editform-ui-fixes [ResourceLoader|dependencies=ext.gadget.gConfig, ext.gadget.edittools-enhanced]|editform-ui-fixes.css
* edit-summaries [ResourceLoader|dependencies=ext.gadget.style-summary-buttons|default]|edit-summaries.js
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
9720a8a38aa8fc9cfb09eef320e00aca48b31410
98
97
2014-01-16T13:01:18Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
* Navigation_popups|popups.js|navpop.css
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
* editform-ui-fixes [ResourceLoader | dependencies=ext.gadget.gConfig, ext.gadget.edittools-enhanced] | editform-ui-fixes.css
* edit-summaries [ResourceLoader | dependencies=ext.gadget.style-summary-buttons | default] | edit-summaries.js
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
5fe62bda0743eae55b9b7a65f6848755a2a3116b
97
90
2014-01-16T12:53:48Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
* Navigation_popups|popups.js|navpop.css
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
* editform-ui-fixes [ResourceLoader | dependencies=ext.gadget.gConfig, ext.gadget.edittools-enhanced] | editform-ui-fixes.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
4db5c6ffe06f479c36503219dc8328af3225f2ab
90
87
2014-01-16T12:14:00Z
Ffkapa
2
wikitext
text/x-wiki
<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Gadget/proposals]] or [[Wikipedia_talk:Gadget]].'''
Please add an entry for any new gadget to the table at [[Wikipedia:Gadget#Currently installed gadgets]] to make maintenance easier. You can review and edit the descriptions on [[Special:Gadgets]].
</noinclude>
== browsing ==
* modrollback|modrollback.js
* removeAccessKeys|removeAccessKeys.js
* searchFocus|searchFocus.js
* GoogleTrans|GoogleTrans.js
* ImageAnnotator|ImageAnnotator.js
* imagelinks|imagelinks.js
* Navigation_popups|popups.js|navpop.css
* exlinks[ResourceLoader|dependencies=mediawiki.util]|exlinks.js
* search-new-tab[ResourceLoader]|search-new-tab.js
* PrintOptions[ResourceLoader|dependencies=jquery.ui.dialog]|PrintOptions.js
* revisionjumper|revisionjumper.js
* Twinkle[ResourceLoader|dependencies=mediawiki.user,mediawiki.util,jquery.ui.dialog,jquery.tipsy|rights=autoconfirmed]|moment.js|morebits.js|morebits.css|Twinkle.js|twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js|twinkleprotect.js|twinklearv.js|friendlytalkback.js
* HideFundraisingNotice|HideFundraisingNotice.js|HideFundraisingNotice.css
* teahouse[ResourceLoader|default]|teahouse.js|teahouse.css
* ReferenceTooltips[ResourceLoader|default]|ReferenceTooltips.js|ReferenceTooltips.css
== watchlist ==
* WatchlistNoMarkers[ResourceLoader]|WatchlistNoMarkers.css
* WatchlistChangesBold[ResourceLoader]|WatchlistChangesBold.js|WatchlistChangesBold.css
== editing ==
* defaultsummaries|defaultsummaries.js
* citations|citations.js
* DotsSyntaxHighlighter[ResourceLoader]|DotsSyntaxHighlighter.js
* HotCat[ResourceLoader|rights=edit,purge]|HotCat.js <!-- purge is a work-around to default-enable only for logged-in users. -->
* wikEdDiff|wikEdDiff.js
* ProveIt[ResourceLoader|dependencies=jquery.ui.tabs,jquery.ui.button,jquery.effects.highlight,jquery.textSelection]|ProveIt.css|ProveIt.js
* wikEd|wikEd.js
* afchelper[ResourceLoader|dependencies=mediawiki.api,mediawiki.user,jquery.chosen]|afchelper.js
* DRN-wizard[ResourceLoader|default]|DRN-wizard-loader.js
* charinsert[ResourceLoader|default]|charinsert.js|charinsert.css
== appearance ==
* edittop[ResourceLoader|dependencies=user.options]|edittop.js|edittop.css
* UTCLiveClock[ResourceLoader]|UTCLiveClock.js
* mySandbox[ResourceLoader|dependencies=mediawiki.util,mediawiki.Title,mediawiki.Uri|default|rights=createpage]|mySandbox.js
* purgetab[ResourceLoader|dependencies=mediawiki.util]|purgetab.js
* ExternalSearch|externalsearch.js
* dropdown-menus|dropdown-menus.js|dropdown-menus.css
* CategoryAboveAll|CategoryAboveAll.js
* addsection-plus|addsection-plus.js
* CommentsInLocalTime|CommentsInLocalTime.js
* OldDiff[ResourceLoader]|OldDiff.css
* NoAnimations[ResourceLoader]|NoAnimations.js
* NoSmallFonts[ResourceLoader]|NoSmallFonts.css
* metadata|metadata.js
* MenuTabsToggle[ResourceLoader|dependencies=jquery.cookie]|MenuTabsToggle.js|MenuTabsToggle.css
* righteditlinks[ResourceLoader]|righteditlinks.css
* PrettyLog[ResourceLoader|dependencies=mediawiki.util]|PrettyLog.js|PrettyLog.css
* SidebarTranslate[ResourceLoader]|SidebarTranslate.js|SidebarTranslate.css
* Blackskin[ResourceLoader]|Blackskin.css
* widensearch[ResourceLoader]|widensearch.css
* topalert[ResourceLoader]|topalert.js|topalert.css
== compatibility ==
* DejaVu_Sans[ResourceLoader]|DejaVu_Sans.css
* JSL|JSL.js
== advanced ==
* RegexMenuFramework|RegexMenuFramework.js
* ShowMessageNames[ResourceLoader|dependencies=mediawiki.util]|ShowMessageNames.js
* DebugMode[ResourceLoader|dependencies=mediawiki.util]|DebugMode.js
* contribsrange|contribsrange.js
* BugStatusUpdate[ResourceLoader]|BugStatusUpdate.js
* RTRC[ResourceLoader]|RTRC.js
== test ==
* NewImageThumb[ResourceLoader]|NewImageThumb.js|NewImageThumb.css
== deprecated ==
330484092eb1615ed23067f4add4e6d00ab0abce
87
2014-01-16T11:44:13Z
Ffkapa
2
Utworzono nową stronę "* lib-toolbar [ResourceLoader | dependencies=mediawiki.user, user.options | rights=hidden | hidden] | lib-toolbar.js * style-summary-buttons [ResourceLoader | rights=hid..."
wikitext
text/x-wiki
* lib-toolbar [ResourceLoader | dependencies=mediawiki.user, user.options | rights=hidden | hidden] | lib-toolbar.js
* style-summary-buttons [ResourceLoader | rights=hidden | hidden] | summary-buttons.css
* mark-disambigs-core [ResourceLoader | dependencies=mediawiki.util | rights=hidden | hidden] | mark-disambigs.js
* lib-sel_t [ResourceLoader | rights=hidden | hidden] | sel t.js
* gConfig [ResourceLoader | dependencies=jquery.cookie, mediawiki.api, mediawiki, mediawiki.jqueryMsg | rights=hidden | hidden] | gConfig.js | gConfig.css
* bioindex-editor [ResourceLoader | dependencies=jquery.spinner, mediawiki.api, jquery.wikibase.linkitem | rights=hidden | hidden] | bioindex-editor.js | bioindex-editor.css
== browsing ==
* Navigation popups | Popups.js | Popups.css | Popups-strings.js
* hideSidebar | hideSidebar.js
* edithysteria [ResourceLoader | dependencies=mediawiki.util] | edithysteria.js
* quickeditcounter [ResourceLoader | dependencies=mediawiki.util] | quickeditcounter.js
* maps [ResourceLoader | default] | maps.js
* btm-actions [ResourceLoader] | btm-actions.js | btm-actions.css
* Extra-tabs | Extra-tabs.js
* enhanced-search [ResourceLoader | default | dependencies=mediawiki.util, jquery.textSelection] | enhanced-search.js | enhanced-search.css
* iw-links [ResourceLoader | dependencies=mediawiki.util] | iw-links.js
* hide-rollback [ResourceLoader | rights=rollback ] | hide-rollback.css
* heading-icons [ResourceLoader | default | dependencies=mediawiki.util, mediawiki.legacy.wikibits] | heading-icons.js
* purge-tab [ResourceLoader | dependencies=mediawiki.util] | purge.js
* WikidataInfo [ResourceLoader] | WikidataInfo.js
== editing ==
* HotCat [ResourceLoader] | HotCat.js
* disFixer [ResourceLoader | dependencies=ext.gadget.gConfig, ext.gadget.mark-disambigs-core, mediawiki.util, mediawiki.legacy.wikibits] | disFixer.js
* QuickEdit | QuickEdit-lang.js | QuickEdit.js
* wp_sk [ResourceLoader | dependencies=ext.gadget.lib-toolbar, ext.gadget.lib-sel_t, mediawiki.util ] | sk.js | sk-local.js
* checksitelinks [ResourceLoader] | checksitelinks.js
* wikEd | wikEd.js
* searchbox [ResourceLoader | dependencies=ext.gadget.lib-toolbar, ext.gadget.lib-sel_t ] | searchbox.css | searchbox.js
* refToolbar [ResourceLoader | default | dependencies=ext.gadget.lib-toolbar, ext.gadget.lib-sel_t ] | refToolbar.js
* edit-buttons [ResourceLoader | default | dependencies=ext.gadget.lib-toolbar ] | edit-buttons.js
* edit-summaries [ResourceLoader | dependencies=ext.gadget.style-summary-buttons | default] | edit-summaries.js
* my-sandbox [ResourceLoader | default | dependencies=mediawiki.util] | my-sandbox.js
* edit-first-section [ResourceLoader | default] | edit-first-section.js
* edit-summary-warning [ResourceLoader | default] | edit-summary-warning.js | edit-summary-warning.css
* wikibugs [ResourceLoader | default | dependencies=mediawiki.util, mediawiki.user, jquery.ui.dialog] | JsMwApi.js | wikibugs.js | wikibugs.css
* nuxTBKeys [ResourceLoader | default | dependencies=mediawiki.user, user.options, ext.gadget.lib-sel_t ] | nuxTBKeys.js
* enhanced-upload [ResourceLoader | default | dependencies=mediawiki.util] | enhanced-upload.js
* edittools-enhanced [ResourceLoader | dependencies=ext.gadget.gConfig] | edittools-enhanced.js
* editform-ui-fixes [ResourceLoader | dependencies=ext.gadget.gConfig, ext.gadget.edittools-enhanced] | editform-ui-fixes.css
== appearance ==
* vector4monobookies [ResourceLoader] | vector4monobookies.css | vector4monobookies.js
* colored-discussion [ResourceLoader] | colored-discussion.css
* mark-redirs [ResourceLoader] | mark-redirs.css
* mark-disambigs [ResourceLoader | dependencies=ext.gadget.mark-disambigs-core] | mark-disambigs.css
* disable-animations [ResourceLoader] | disable-animations.js
* featured-articles-links [ResourceLoader | default] | featured-articles-links.js | featured-articles-links.css
* small-sections [ResourceLoader | rights=hidden | hidden | dependencies=mediawiki.user,user.options] | small-sections.js
* small-bibliography [ResourceLoader | dependencies=ext.gadget.small-sections] | small-bibliography.css
* small-external-links [ResourceLoader | dependencies=ext.gadget.small-sections] | small-external-links.css
* small-references [ResourceLoader | default] | small-references.css
* OldDiff [ResourceLoader] | OldDiff.css
* map-toggler [ResourceLoader | default] | map-toggler.js
* Direct-link-to-Commons [ResourceLoader|dependencies=mediawiki.util] | Direct-link-to-Commons.js
* ReferenceTooltips [ResourceLoader | default] | ReferenceTooltips.js | ReferenceTooltips.css
* mylanguages [ResourceLoader | dependencies=ext.gadget.gConfig] | mylanguages.js
* topalert [ResourceLoader] | topalert.js | topalert.css
== editor ==
* diffhistory | diffhistory.js
* oldreviewedpages [ResourceLoader | dependencies=mediawiki.util] | oldreviewedpages.js
== patrol ==
* liverc | liverc.js
* dynamic-ips [ResourceLoader] | dynamic-ips.js
* colored-nicknames [ResourceLoader | dependencies=mediawiki.util] | colored-nicknames.js | colored-nicknames.css
* move-to-sandbox [ResourceLoader | dependencies=mediawiki.util, jquery.ui.dialog | rights=move] | move-to-sandbox.css | move-to-sandbox.js
== other ==
* replylinks | replylinks.js
* QuickDelete | QuickDelete.js
* AjaxQuickDelete | AjaxQuickDelete.js | AjaxQuickDelete.css
* CzyWiesz | CzyWiesz.js
* wikidebug | sftJSmsg.js | wikidebug.js | wikidebug.css
* contribsrange | contribsrange.js
* old-movepage [ResourceLoader | rights=move] | old-movepage.js
* main-page [ResourceLoader | top | default] | main-page.js | main-page.css
== admin ==
* delete [ResourceLoader | dependencies=mediawiki.util, ext.gadget.style-summary-buttons | rights=delete] | delete-local.js | delete.js
* revisiondelete [ResourceLoader | dependencies=mediawiki.util | rights=deleterevision] | revisiondelete.js | revisiondelete.css
* block [ResourceLoader | dependencies=ext.gadget.style-summary-buttons | rights=block] | block-local.js | block.js
* protect [ResourceLoader | dependencies=ext.gadget.style-summary-buttons | rights=protect] | protect-local.js | protect.js
* DelReqHandler | lib-MD5.js | Lupo-Utilities.js | DelReqHandler.js
dfb7f2d097826b902186122496fb194a3addd607
MediaWiki:Licenses
8
19
67
2014-01-15T23:19:57Z
Ffkapa
2
Nowa strona
wikitext
text/x-wiki
* UWAGA! W POLSKOJĘZYCZNEJ WIKIPEDII JEST OGRANICZONY WYBÓR SZABLONÓW LICENCJI. NA COMMONS JEST ICH WIĘCEJ. PRZEŚLIJ SWÓJ PLIK TAM!
* subst:bl|Nie wiem
* Twoja własna praca
** Idealne licencjonowanie
*** self|GFDL|cc-by-sa-3.0,2.5,2.0,1.0|Użycie za podaniem autorstwa i z zachowaniem licencji - podwójna licencja GFDL i Creative Commons CC-BY-SA 1.0-3.0
*** self|GFDL|cc-by-3.0|Użycie za podaniem autorstwa - podwójna licencja GFDL i Creative Commons CC-BY 3.0
*** PD-self|Public Domain (domena publiczna) - zrzeczenie się praw autorskich
** Pozostałe opcje
*** self|cc-by-sa-3.0|Użycie za podaniem autorstwa i z zachowaniem licencji (Creative Commons CC-BY-SA 3.0)
*** self|cc-by-3.0|Użycie za podaniem autorstwa (Creative Commons CC-BY 3.0)
* Grafiki z innych źródeł
** Creative Commons
*** cc-by-sa-3.0|Creative Commons CC-BY-SA 3.0 (podaj autora i źródło)
*** cc-by-sa-2.0|Creative Commons CC-BY-SA 2.0 (podaj autora i źródło)
*** cc-by-3.0|Creative Commons CC-BY 3.0 (podaj autora i źródło)
*** cc-by-2.0|Creative Commons CC-BY 2.0 (podaj autora i źródło)
** Licencje GNU
*** GFDL|GNU Free Documentation License (podaj autora i źródło)
*** GPL|GNU General Public License (zrzut ekranu pokazujący program będący Wolnym Oprogramowaniem)
** Public domain - nieobjęte prawami autorskimi
*** PD-old|Prawa autorskie wygasły (minęło 70 lat od śmierci autora; podaj autora i źródło)
*** PD-PRL|PRL (w Polsce przed 1994 bez zastrzeżenia prawa autorskiego; podaj źródło)
*** PD-symbol|Symbole, herby: herby i inne znaki/dokumenty urzędowe w Polsce (podaj źródło)
*** PD-trivial|Prace trywialne: nie będące przejawem działalności twórczej o indywidualnym charakterze
* Licencje z ograniczeniami
** Copyright by Wikimedia|Grafiki zawierające znaki zastrzeżone Fundacji Wikimedia
2c1e7ec2003fe08b29eb1d4ddc8a3861477f8a8d
MediaWiki:Sidebar
8
586
1058
1057
2014-12-28T00:15:35Z
Kazik
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage
** WikiPnikuczanie:Tworzenie konta użytkownika|Utwórz nowe konto użytkownika
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Specjalna:Prześlij|Prześlij plik
** Specjalna:Pliki|Lista plików
** randompage-url|Losuj artykuł
*Dla wikipedystów
** WikiPnikuczanie:Tworzenie konta użytkownika|Przewodnik nowego użytkownika
** recentchanges-url|recentchanges
** helppage|help
** WikiPnikuczanie:Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
0548f0ae5fc4e31d7505ecd1b8d165ce941b4716
1057
1056
2014-12-28T00:11:23Z
Kazik
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage
** WikiPnikuczanie:Tworzenie konta użytkownika|Utwórz nowe konto użytkownika
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Specjalna:Prześlij|Prześlij plik
** Specjalna:Pliki|Lista plików
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** recentchanges-url|recentchanges
** helppage|help
** WikiPnikuczanie:Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
918c055ffd3e2db8025a78d16e27548bd9a4cfc5
1056
441
2014-12-28T00:08:44Z
Kazik
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage
** WikiPnikuczanie:Tworzenie konta użytkownika|Utwórz nowe konto użytkownika
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Specjalna:Prześlij|Prześlij plik
** Specjalna:Pliki|Lista plików
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** recentchanges-url|recentchanges
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
f7b4dd03a362f02c65309ac9a776e94f4816acff
441
400
2014-02-11T23:03:58Z
Ffkapa
2
wikitext
text/x-wiki
* navigation
** mainpage|mainpage
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Specjalna:Prześlij|Prześlij plik
** Specjalna:Pliki|Lista plików
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
fe595f126ffcc9e12b7b3c1a036783037c8e0ec1
400
399
2014-02-10T22:12:18Z
Ffkapa
2
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Specjalna:Prześlij|Prześlij plik
** Specjalna:Pliki|Lista plików
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
eb4ebdac0fdc87ea0ecc6923ce1a3eaaeb367b50
399
398
2014-02-10T22:11:19Z
Ffkapa
2
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Specjalna:Prześlij|Prześlij plik
** Specjalna:Pliki|lista
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
9f237e91a5a231f20d87829a8d4e68e5e4dde370
398
397
2014-02-10T22:10:37Z
Ffkapa
2
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Specjalna:Prześlij|Prześlij plik
** Specjalna:Lista plików|lista
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
912054a7ef69292d274bf5c8c631bdd091dbca26
397
396
2014-02-10T22:07:45Z
Ffkapa
2
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Specjalna:Prześlij|Prześlij plik
** Specjalna:Pliki
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
13f6a18b1fa5e3c18b6c24f97adce5e0d30fbcc2
396
395
2014-02-10T22:06:29Z
Ffkapa
2
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Specjalna:Prześlij plik|Prześlij plik
** Specjalna:Pliki
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
d708b9db267e874694a70842f94a1e86cc37be0f
395
376
2014-02-10T21:50:01Z
Ffkapa
2
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Specjalna:Prześlij plik|Prześlij plik
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
f364193777b4bc92f90b5c3f7000e612fd24dbb4
376
375
2014-02-07T17:46:56Z
Ffkapa
2
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
5f1b6347e3d1e092d4d8f7f9919dcb24a2def189
375
374
2014-02-07T17:46:25Z
Ffkapa
2
wikitext
text/x-wiki
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
7efbeebfb8404dec779deff6124fc5d18a23c964
374
373
2014-02-07T17:45:45Z
Ffkapa
2
wikitext
text/x-wiki
* SEARCH
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* TOOLBOX
* LANGUAGES
7a26749daf084d203cd8026c88a0d4a86b433607
373
372
2014-02-07T17:45:18Z
Ffkapa
2
wikitext
text/x-wiki
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
7efbeebfb8404dec779deff6124fc5d18a23c964
372
371
2014-02-07T17:44:17Z
Ffkapa
2
wikitext
text/x-wiki
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUA
80d75c01eb3654f75c7b2e61003e2e19edd2865f
371
370
2014-02-07T17:42:07Z
Ffkapa
2
Anulowanie wersji 370 autora [[Special:Contributions/Ffkapa|Ffkapa]] ([[User talk:Ffkapa|dyskusja]])
wikitext
text/x-wiki
* SEARCH
* navigation
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** recentchanges-url|recentchanges
** randompage-url|randompage
* TOOLBOX
* LANGUAGES
* support
** mw-help-url|help
d62d445d68d1401ad7618cbdebff4799d10969ca
370
369
2014-02-07T17:41:37Z
Ffkapa
2
wikitext
text/x-wiki
* SEARCH
* navigation
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** recentchanges-url|recentchanges
** randompage-url|randompage
* TOOLBOX
** mw-help-url|help
* LANGUAGES
b3fab5d9fd2fd3aa3cf39e9ff5081ec777bbf6f4
369
368
2014-02-07T17:39:21Z
Ffkapa
2
wikitext
text/x-wiki
* SEARCH
* navigation
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** recentchanges-url|recentchanges
** randompage-url|randompage
* TOOLBOX
* LANGUAGES
* support
** mw-help-url|help
d62d445d68d1401ad7618cbdebff4799d10969ca
368
367
2014-02-07T17:36:36Z
Ffkapa
2
wikitext
text/x-wiki
* SEARCH
* navigation
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** recentchanges-url|recentchanges
** randompage-url|randompage
* TOOLBOX
* LANGUAGES
* navigation
** mw-mainpage-url|mainpage-description
** mw-download-url|mw-download
** mw-extensions-url|mw-extensions
** Special:MyLanguage/Communication|mw-communication
** blog-url|blog-text
* SEARCH
* support
** mw-help-url|help
** mw-faq-url|mw-faq
** mw-manual-url|mw-manual
** Project:Support desk|mw-supportdesk
* development
** mw-bugtracker-url|mw-bugtracker
** mw-repo-browse-url|mw-repo-browse
** mw-repo-codereview-url|mw-repo-codereview
** phpdoc-url|phpdoc
** statistics-url|svn statistics
51f30f5cf4fec2d02e2771a34f2297545c0ec638
367
366
2014-02-07T17:32:34Z
Ffkapa
2
Anulowanie wersji 364 autora [[Special:Contributions/Ffkapa|Ffkapa]] ([[User talk:Ffkapa|dyskusja]])
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** randompage-url|randompage
* SEARCH
* TOOLBOX
* LANGUAGES
* navigation
** mw-mainpage-url|mainpage-description
** mw-download-url|mw-download
** mw-extensions-url|mw-extensions
** Special:MyLanguage/Communication|mw-communication
** blog-url|blog-text
* SEARCH
* support
** mw-help-url|help
** mw-faq-url|mw-faq
** mw-manual-url|mw-manual
** Project:Support desk|mw-supportdesk
* development
** mw-bugtracker-url|mw-bugtracker
** mw-repo-browse-url|mw-repo-browse
** mw-repo-codereview-url|mw-repo-codereview
** phpdoc-url|phpdoc
** statistics-url|svn statistics
* MediaWiki.org
** mw-cat-browser-url|cat-browser
** mw-portal-url|portal
** recentchanges-url|recentchanges
** mw-discussion-url|mw-discussion
4b4f8ad29cbab11e0a2716679dbafa36d9d25e3d
366
365
2014-02-07T17:31:36Z
Ffkapa
2
Anulowanie wersji 365 autora [[Special:Contributions/Ffkapa|Ffkapa]] ([[User talk:Ffkapa|dyskusja]])
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** randompage-url|randompage
* SEARCH
* TOOLBOX
* LANGUAGES
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
f45642d51983171dbd76488e53902fd576d0d430
365
364
2014-02-07T17:27:45Z
Ffkapa
2
wikitext
text/x-wiki
* SEARCH
* navigation
** mainpage|mainpage-description
** Kategorie-url|Kategorie
** Featured articles-url|Featured articles
** bug_in_article-url|bug_in_article
** bad-image-url|bad-image
** FAQ-url|FAQ
* zmiany
** randompage-url|randompage
** contact-url|contact
** Disclaimerpage|Disclaimers-short
** sitesupport-url|sitesupport
* edytorzy
** recentchanges-url|recentchanges
** Guidelines-url|Guidelines
** helppage|help
** bar-url|bar
** Noticeboard-url|Noticeboard
* TOOLBOX
23d7e8e0a14b87ecf81e459a81c74ea21f07fb27
364
363
2014-02-07T17:24:31Z
Ffkapa
2
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** randompage-url|randompage
* SEARCH
* TOOLBOX
* LANGUAGES
** mainpage|mainpage-description
** Specjalna:Wszystkie_strony/A|Lista haseł
** Specjalna:Kategorie|Kategorie artykułów
** Najlepsze hasła|Najlepsze hasła
** randompage-url|Losuj artykuł
*Dla wikipedystów
**FAQ|Przewodnik nowego użytkownika
** currentevents-url|currentevents
** recentchanges-url|recentchanges
** Informacje prawne|Informacje prawne
** helppage|help
** Kontakt|Kontakt
* SEARCH
* TOOLBOX
* LANGUAGES
f45642d51983171dbd76488e53902fd576d0d430
363
2014-02-07T17:20:22Z
Ffkapa
2
Utworzono nową stronę " * navigation ** mainpage|mainpage-description ** recentchanges-url|recentchanges ** randompage-url|randompage * SEARCH * TOOLBOX * LANGUAGES * navigation ** mw-mainpa..."
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
** randompage-url|randompage
* SEARCH
* TOOLBOX
* LANGUAGES
* navigation
** mw-mainpage-url|mainpage-description
** mw-download-url|mw-download
** mw-extensions-url|mw-extensions
** Special:MyLanguage/Communication|mw-communication
** blog-url|blog-text
* SEARCH
* support
** mw-help-url|help
** mw-faq-url|mw-faq
** mw-manual-url|mw-manual
** Project:Support desk|mw-supportdesk
* development
** mw-bugtracker-url|mw-bugtracker
** mw-repo-browse-url|mw-repo-browse
** mw-repo-codereview-url|mw-repo-codereview
** phpdoc-url|phpdoc
** statistics-url|svn statistics
* MediaWiki.org
** mw-cat-browser-url|cat-browser
** mw-portal-url|portal
** recentchanges-url|recentchanges
** mw-discussion-url|mw-discussion
4b4f8ad29cbab11e0a2716679dbafa36d9d25e3d
MediaWiki:Sitenotice
8
28
1055
600
2014-12-27T23:48:25Z
Kazik
1
korekta
wikitext
text/x-wiki
<small><center>'''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' | ''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]''' | '''[[Pomoc:Spis treści|Pomoc]]''' | '''[[WikiPnikuczanie:Kontakt|Kontakt]]'''</center></small>
'''<center>[http://www.pnikut.net Pnikut.net]</center>'''
<small><center>''Aby utworzyć nowe konto użytkownika należy postępować zgodnie z zaleceniami na stronie [[WikiPnikuczanie:Tworzenie konta użytkownika|'''Tworzenie konta użytkownika''']].</center></small>
6fe0f65a58459b9103fa1faf971314c9d19844b1
600
523
2014-03-13T14:58:54Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>'''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' | ''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]''' | '''[[Pomoc:Spis treści|Pomoc]]''' | '''[[WikiPnikuczanie:Kontakt|Kontakt]]'''</center></small>
'''<center>[http://www.pnikut.net Pnikut.net]</center>'''
5ddca446acc09676dda49848a93eb6c4dbca4cc2
523
445
2014-02-22T23:08:49Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>'''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' | ''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]''' | '''[[Pomoc:Spis treści|Pomoc]]''' | '''[[Kontakt|Kontakt]]'''</center></small>
'''<center>[http://www.pnikut.net Pnikut.net]</center>'''
4d44ee87722c358773037a6a3b512c79e1fe5830
445
444
2014-02-11T23:16:50Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>'''[[Strona główna|Strona główna]]''' | '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]''' | '''[[Pomoc:Spis treści|Pomoc]]''' | '''[[Kontakt|Kontakt]]'''</center></small>
'''<center>[http://www.pnikut.net Pnikut.net]</center>'''
f5061c5dcf302460620d0a225c12b8f42a98c7b8
444
443
2014-02-11T23:15:19Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>'''[[mainpage|mainpage]]''' | '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]''' | '''[[Pomoc:Spis treści|Pomoc]]''' | '''[[Kontakt|Kontakt]]'''</center></small>
'''<center>[http://www.pnikut.net Pnikut.net]</center>'''
155172467c9c40df051ddc6e89352bd2c8883ee4
443
442
2014-02-11T23:07:26Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>'''[[mainpage|Strona główna]]''' | '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]''' | '''[[Pomoc:Spis treści|Pomoc]]''' | '''[[Kontakt|Kontakt]]'''</center></small>
'''<center>[http://www.pnikut.net Pnikut.net]</center>'''
f97f75598b80194d291fc4417228dbcd867819cb
442
423
2014-02-11T23:05:37Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>'''[[mainpage|Strona główna]]''' | '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]''' | '''[[helppage|help]]''' | '''[[Kontakt|Kontakt]]'''</center></small>
'''<center>[http://www.pnikut.net Pnikut.net]</center>'''
aab16974f441f1b1f7416dea05be6af33e646b5e
423
422
2014-02-10T23:20:02Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>'''[[mainpage|Strona główna]]''' | '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]''' | '''[[helppage|Pomoc]]''' | '''[[Kontakt|Kontakt]]'''</center></small>
'''<center>[http://www.pnikut.net Pnikut.net]</center>'''
b5ebab1fbe486a0dc2d1b266bda7a74fc89e78b6
422
421
2014-02-10T23:18:00Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>'''[[mainpage|Strona główna]]''' | '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]''' | '''[[helppage|Pomoc]]''' | '''[[Kontakt|Kontakt]]'''</center></small>
<center>[http://www.pnikut.net Pnikut.net]</center>
781322d60ecde61fa46cd069d19db468889546ec
421
420
2014-02-10T23:16:22Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>'''[[mainpage|Strona główna]]''' | '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]''' | '''[[helppage|help]]'''</center></small>
<center>[http://www.pnikut.net Pnikut.net]</center>
efef653bf08548f032931ae728ee93ad90458d7e
420
419
2014-02-10T23:14:33Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>'''[[mainpage|Strona główna]]''' | '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]'''</center></small>
<center>[http://www.pnikut.net Pnikut.net]</center>
a0abef277333ebb1dfcf2a7dde7faf2f212f103e
419
418
2014-02-10T23:13:31Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>'''[[mainpage|mainpage-description]]''' | '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]'''</center></small>
<center>[http://www.pnikut.net Pnikut.net]</center>
ddfe89372705a105d4f2a177bbdb7614cc3da70a
418
417
2014-02-10T23:12:08Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>'''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]'''</center></small>
<center>[http://www.pnikut.net Pnikut.net]</center>
df28a9ad7eb84ba5ca41ba1ff72a7adcc151fb62
417
416
2014-02-10T23:10:15Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>Korzystanie z '''Wiki.Pnikuczanie''' jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]'''. Chcesz przesłać zdjęcie, kliknij '''[[Specjalna:Prześlij|Prześlij plik]]''', jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij '''[[Specjalna:Pliki|Lista plików]]'''. <br>
Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić...</center>
'''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]'''</small>
<center>[http://www.pnikut.net Pnikut.net]</center>
0990dee72f4569c1676ee314a32cc69baa503fae
416
415
2014-02-10T23:09:23Z
Ffkapa
2
wikitext
text/x-wiki
<small><center>Korzystanie z '''Wiki.Pnikuczanie''' jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]'''. <br>Chcesz przesłać zdjęcie, kliknij '''[[Specjalna:Prześlij|Prześlij plik]]''', jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij '''[[Specjalna:Pliki|Lista plików]]'''. <br>
Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić...</center>
'''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]'''</small>
<center>[http://www.pnikut.net Pnikut.net]</center>
b945bf72a95e9d75cf54d5e04c52d4a73b3e96d2
415
414
2014-02-10T23:07:16Z
Ffkapa
2
wikitext
text/x-wiki
<center>Korzystanie z '''Wiki.Pnikuczanie''' jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]'''. <br>Chcesz przesłać zdjęcie, kliknij '''[[Specjalna:Prześlij|Prześlij plik]]''', jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij '''[[Specjalna:Pliki|Lista plików]]'''. <br>
Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić...</center>
'''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]'''
<center>[http://www.pnikut.net Pnikut.net]</center>
a5205c13cd084344a45d408da10eff581c388c73
414
413
2014-02-10T23:04:19Z
Ffkapa
2
wikitext
text/x-wiki
<center>Korzystanie z '''Wiki.Pnikuczanie''' jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]'''. <br>Chcesz przesłać zdjęcie, kliknij '''[[Specjalna:Prześlij|Prześlij plik]]''', jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij '''[[Specjalna:Pliki|Lista plików]]'''. <br>
Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić...</center>
'''[[Specjalna:Wszystkie_strony/A|Lista haseł]]''' |''' [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]'''
[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]
cce358e200e584edfc8e2b0be32045fc71ef89c0
413
412
2014-02-10T23:03:03Z
Ffkapa
2
wikitext
text/x-wiki
<center>Korzystanie z '''Wiki.Pnikuczanie''' jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na '''[[Specjalna:Wszystkie_strony/A|Lista haseł]]'''. <br>Chcesz przesłać zdjęcie, kliknij '''[[Specjalna:Prześlij|Prześlij plik]]''', jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij '''[[Specjalna:Pliki|Lista plików]]'''. <br>
Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić...</center>
'''* [[Specjalna:Pliki|Lista haseł]]''' |'''* [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' * [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]'''
[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]
2a68e5ed865f14ddf13a43c7bd120f4dcaeb2d2d
412
411
2014-02-10T23:02:01Z
Ffkapa
2
wikitext
text/x-wiki
<center>Korzystanie z '''Wiki.Pnikuczanie''' jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na '''[[Specjalna:Pliki|Lista haseł]]'''. <br>Chcesz przesłać zdjęcie, kliknij '''[[Specjalna:Prześlij|Prześlij plik]]''', jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij '''[[Specjalna:Pliki|Lista plików]]'''. <br>
Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić...</center>
'''* [[Specjalna:Pliki|Lista haseł]]''' |'''* [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' * [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]'''
[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]
b689bdd65cd3c80a04c6cbcffbcbfb471d4e5167
411
410
2014-02-10T23:01:24Z
Ffkapa
2
wikitext
text/x-wiki
<center>Korzystanie z '''Wiki.Pnikuczanie''' jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na '''[[Specjalna:Pliki|Lista haseł]]'''. <br>Chcesz przesłać zdjęcie, kliknij '''[[Specjalna:Prześlij|Prześlij plik]]''',<br> jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij '''[[Specjalna:Pliki|Lista plików]]'''. <br>
Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić...</center>
'''* [[Specjalna:Pliki|Lista haseł]]''' |'''* [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' * [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]'''
[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]
7b8d09e1c1dbcb1bf090c48000c0b5df80b7e133
410
409
2014-02-10T23:00:11Z
Ffkapa
2
wikitext
text/x-wiki
<center>Korzystanie z '''Wiki.Pnikuczanie''' jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na '''[[Specjalna:Pliki|Lista haseł]]'''. </br>Chcesz przesłać zdjęcie, kliknij '''[[Specjalna:Prześlij|Prześlij plik]]''',</br> jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij '''[[Specjalna:Pliki|Lista plików]]'''. </br>
Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić...</center>
'''* [[Specjalna:Pliki|Lista haseł]]''' |'''* [[Specjalna:Kategorie|Kategorie artykułów]]''' |''' * [[Specjalna:Prześlij|Prześlij plik]]''' | ''' [[Specjalna:Pliki|Lista plików]]'''
[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]
30402796e437f75deba95b1e51e87aff6152be8b
409
408
2014-02-10T22:57:42Z
Ffkapa
2
wikitext
text/x-wiki
<center>Korzystanie z '''Wiki.Pnikuczanie''' jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na '''[[Specjalna:Pliki|Lista haseł]]'''. </br>Chcesz przesłać zdjęcie, kliknij '''[[Specjalna:Prześlij|Prześlij plik]]''',</br> jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij '''[[Specjalna:Pliki|Lista plików]]'''. </br>
Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić...</center>
|* [[Specjalna:Pliki|Lista haseł]] | * [[Specjalna:Kategorie|Kategorie artykułów]] | * [[Specjalna:Prześlij|Prześlij plik]] | [[Specjalna:Pliki|Lista plików]] |
<center>[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]</center>
e1374b9c110bf41208c77ffcea753e99688794c7
408
407
2014-02-10T22:55:40Z
Ffkapa
2
wikitext
text/x-wiki
<center>Korzystanie z '''Wiki.Pnikuczanie''' jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na [[Specjalna:Pliki|Lista haseł]]. Chcesz przesłać zdjęcie, kliknij [[Specjalna:Prześlij|Prześlij plik]], jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij [[Specjalna:Pliki|Lista plików]].
Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić...</center>
|* [[Specjalna:Pliki|Lista haseł]] | * [[Specjalna:Kategorie|Kategorie artykułów]] | * [[Specjalna:Prześlij|Prześlij plik]] | [[Specjalna:Pliki|Lista plików]] |
<center>[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]</center>
1cc39a2fc5553a59e70782b43c2bec136b2042d3
407
406
2014-02-10T22:55:06Z
Ffkapa
2
wikitext
text/x-wiki
<center>: Korzystanie z '''Wiki.Pnikuczanie''' jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na [[Specjalna:Pliki|Lista haseł]]. Chcesz przesłać zdjęcie, kliknij [[Specjalna:Prześlij|Prześlij plik]], jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij [[Specjalna:Pliki|Lista plików]].
Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić...</center>
|* [[Specjalna:Pliki|Lista haseł]] | * [[Specjalna:Kategorie|Kategorie artykułów]] | * [[Specjalna:Prześlij|Prześlij plik]] | [[Specjalna:Pliki|Lista plików]] |
<center>[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]</center>
fe8fb58b6001a14b61e6d99b6f73e281eda30215
406
405
2014-02-10T22:52:10Z
Ffkapa
2
wikitext
text/x-wiki
Korzystanie z '''Wiki.Pnikuczanie''' jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na [[Specjalna:Pliki|Lista haseł]]. Chcesz przesłać zdjęcie, kliknij [[Specjalna:Prześlij|Prześlij plik]], jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij [[Specjalna:Pliki|Lista plików]].
Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić...
|* [[Specjalna:Pliki|Lista haseł]] | * [[Specjalna:Kategorie|Kategorie artykułów]] | * [[Specjalna:Prześlij|Prześlij plik]] | [[Specjalna:Pliki|Lista plików]] |
<center>[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]</center>
3c43523bbffbe72d830eee7b963ac68e7acc770e
405
404
2014-02-10T22:50:50Z
Ffkapa
2
wikitext
text/x-wiki
Korzystanie z Wiki.Pnikuczanie jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na [[Specjalna:Pliki|Lista haseł]]. Chcesz przesłać zdjęcie, kliknij [[Specjalna:Prześlij|Prześlij plik]], jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij [[Specjalna:Pliki|Lista plików]]. Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić
|* [[Specjalna:Pliki|Lista haseł]] | * [[Specjalna:Kategorie|Kategorie artykułów]] | * [[Specjalna:Prześlij|Prześlij plik]] | [[Specjalna:Pliki|Lista plików]] |
<center>[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]</center>
7e1736c64df242fe7f9d209da4a204698140854c
404
403
2014-02-10T22:49:47Z
Ffkapa
2
wikitext
text/x-wiki
Korzystanie z Wiki.Pnikuczanie jest bardzo proste. Jeśli szukasz hasła korzystaj z wyszukiwarki lub samodzielnie poszukaj go po kliknięciu na [[Specjalna:Pliki|Lista haseł]].Chcesz przesłać zdjęcie, kliknij [[Specjalna:Prześlij|Prześlij plik]], jeśli tylko chcesz obejrzeć zgromadzone zdjęcia, kliknij [[Specjalna:Pliki|Lista plików]]. Odważ się edytować, pisać i uzupełniać hasła. To od nas zależy ile wspomnień uda się ocalić
|* [[Specjalna:Pliki|Lista haseł]] | * [[Specjalna:Kategorie|Kategorie artykułów]] | * [[Specjalna:Prześlij|Prześlij plik]] | [[Specjalna:Pliki|Lista plików]] |
<center>[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]</center>
14eeef6aa22170d03b6c1e43abe82b0f59095553
403
402
2014-02-10T22:18:15Z
Ffkapa
2
wikitext
text/x-wiki
<center>[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]</center>
* [[Specjalna:Pliki|Lista plików]]
85a85b22c7d677093c0c332f170388982dd33c6a
402
401
2014-02-10T22:14:10Z
Ffkapa
2
wikitext
text/x-wiki
<center>[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]</center>
* [[Specjalna:Pliki|Lista plików]]
00a018685092fc7829b5d2ae8ab20317a82dd07f
401
84
2014-02-10T22:13:02Z
Ffkapa
2
wikitext
text/x-wiki
<center>[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]</center>
[[Specjalna:Pliki|Lista plików]]
6081326046193b96012b277544fdf0895d342157
84
2014-01-16T00:25:06Z
Ffkapa
2
Utworzono nową stronę "<center>[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]</center>"
wikitext
text/x-wiki
<center>[http://www.pnikut.net Pnikut.net - strona dawnych mieszkańców Pnikuta]</center>
a68b03b60cd9ef122043f001fc57154282a7f09a
Szablon:Adres publikacyjny
10
150
382
2014-02-08T21:29:46Z
Ffkapa
2
Szablon
wikitext
text/x-wiki
<includeonly>{{#ifeq:{{{2|}}}|BR|<strong class="error">Podaj rok wydania publikatora!</strong>
|{{#ifeq:{{{3|}}}|BN|<strong class="error">Podaj numer wydania publikatora!</strong>
|{{#ifeq:{{{4|{{{3|}}}}}}|BP|<strong class="error">Podaj numer pozycji publikatora!</strong>
|{{{1}}} z {{{2}}} r. {{#if:{{{4|}}}|Nr {{{3|}}}, }}poz. {{{4|{{{3|}}}}}}}}}}}}</includeonly><noinclude>{{Cytuj_Wiki_Szablon}}</noinclude>
9c1cecf1c3a6a1f20b5f53b79b830278885cdeed
Szablon:Broken ref
10
44
122
121
2014-01-16T15:33:54Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
<includeonly>{{#if:{{{prefix|}}}
|{{namespace detect showall
| 1 = {{{prefix|}}}
| 2 = {{{prefix|}}}
| 3 = {{{prefix|}}}
| 4 = {{#if:{{{nocat|}}}||<span class="brokenref">}}{{{prefix|}}}{{#if:{{{nocat|}}}||</span>}}
| main = 1
| template = 2
| category = 2
| help = 2
| file = 2
| user = 3
| other = 4
}}
|{{namespace detect showall
| 1 = {{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}}{{#if:{{{nocat|}}}||{{#if:{{{cat|}}}|[[Category:{{{cat|}}}|{{PAGENAME}}]]|[[Category:Pages with incorrect ref formatting|{{PAGENAME}}]]}}}}
| 2 = {{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}}{{#if:{{{nocat|}}}||{{#if:{{{cat|}}}|[[Category:{{{cat|}}}|ω{{PAGENAME}}]]|[[Category:Pages with incorrect ref formatting|ω{{PAGENAME}}]]}}}}
| 3 = {{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}}
| 4 = {{#if:{{{nocat|}}}||<span class="brokenref">}}{{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}}{{#if:{{{nocat|}}}||</span>}}
| main = 1
| template = 2
| category = 2
| help = 2
| file = 2
| user = 3
| other = 4
}}}}</includeonly><noinclude>{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
{{reflist}} <!-- dummy to steer automated tools away from this template -->
</noinclude>
aeaf0435b5ed3d8778ea855b01238f3d55882a37
121
2013-12-27T17:40:13Z
Gadget850
0
apply nocat to brokenref class for doc use
wikitext
text/x-wiki
<includeonly>{{#if:{{{prefix|}}}
|{{namespace detect showall
| 1 = {{{prefix|}}}
| 2 = {{{prefix|}}}
| 3 = {{{prefix|}}}
| 4 = {{#if:{{{nocat|}}}||<span class="brokenref">}}{{{prefix|}}}{{#if:{{{nocat|}}}||</span>}}
| main = 1
| template = 2
| category = 2
| help = 2
| file = 2
| user = 3
| other = 4
}}
|{{namespace detect showall
| 1 = {{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}}{{#if:{{{nocat|}}}||{{#if:{{{cat|}}}|[[Category:{{{cat|}}}|{{PAGENAME}}]]|[[Category:Pages with incorrect ref formatting|{{PAGENAME}}]]}}}}
| 2 = {{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}}{{#if:{{{nocat|}}}||{{#if:{{{cat|}}}|[[Category:{{{cat|}}}|ω{{PAGENAME}}]]|[[Category:Pages with incorrect ref formatting|ω{{PAGENAME}}]]}}}}
| 3 = {{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}}
| 4 = {{#if:{{{nocat|}}}||<span class="brokenref">}}{{broken ref/lang |msg={{{msg|}}} |lang={{{lang|}}} |help={{{help|}}}}}{{#if:{{{nocat|}}}||</span>}}
| main = 1
| template = 2
| category = 2
| help = 2
| file = 2
| user = 3
| other = 4
}}}}</includeonly><noinclude>{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
{{reflist}} <!-- dummy to steer automated tools away from this template -->
</noinclude>
aeaf0435b5ed3d8778ea855b01238f3d55882a37
Szablon:Broken ref/lang
10
45
124
123
2014-01-16T15:33:54Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
{{{msg|<span class="error">Error: no message set for {{tl|broken ref}}</span>}}} ({{#switch:{{{lang|}}}
| en = see the [[Help:Cite errors/{{{help|}}}|help page]]
| es = consulta la [[Help:Cite errors/{{{help|}}}|página de ayuda]]
| en-gb = see the [[Help:Cite errors/{{{help|}}}|help page]]
| fr = vous pouvez consulter [[Help:Cite errors/{{{help|}}}|la page d'aide]] pour plus d'informations
| pt-br = veja [[Help:Cite errors/{{{help|}}}|a página de ajuda]] para mais informações
| ru = подробнее см. [[Help:Cite errors/{{{help|}}}|справочную страницу]]
| de = siehe die [[Help:Cite errors/{{{help|}}}|Hilfeseite]] für weitere Informationen
| id = lihat [[Help:Cite errors/{{{help|}}}|halaman bantuan]] untuk informasi lebih lanjut
| ar = [[Help:Cite errors/{{{help|}}}|صفحة المساعدة]] للمزيد من المعلومات
| nl = meer informatie staat op de [[Help:Cite errors/{{{help|}}}|hulppagina]]
| zh-cn = 详情参见[[Help:Cite errors/{{{help|}}}|帮助页]].
| ro = vedeți [[Help:Cite errors/{{{help|}}}|pagina de ajutor]] pentru mai multe informații
| it = vedi la [[Help:Cite errors/{{{help|}}}|pagina di aiuto]] per maggiori informazioni
| tr = [[Help:Cite errors/{{{help|}}}|yardım sayfasına]] bakınız
| en-ca = see the [[Help:Cite errors/{{{help|}}}|help page]]
}}).<!-- Languages are in order by preference popularity -->
2761ca79913ffdd82b0cf65958f2e943c7009056
123
2013-04-30T19:43:54Z
Gadget850
0
Protected Template:Broken ref/lang: [[WP:High-risk templates|Highly visible template]] ([Edit=Block all non-admin users] (indefinite) [Move=Block all non-admin users] (indefinite))
wikitext
text/x-wiki
{{{msg|<span class="error">Error: no message set for {{tl|broken ref}}</span>}}} ({{#switch:{{{lang|}}}
| en = see the [[Help:Cite errors/{{{help|}}}|help page]]
| es = consulta la [[Help:Cite errors/{{{help|}}}|página de ayuda]]
| en-gb = see the [[Help:Cite errors/{{{help|}}}|help page]]
| fr = vous pouvez consulter [[Help:Cite errors/{{{help|}}}|la page d'aide]] pour plus d'informations
| pt-br = veja [[Help:Cite errors/{{{help|}}}|a página de ajuda]] para mais informações
| ru = подробнее см. [[Help:Cite errors/{{{help|}}}|справочную страницу]]
| de = siehe die [[Help:Cite errors/{{{help|}}}|Hilfeseite]] für weitere Informationen
| id = lihat [[Help:Cite errors/{{{help|}}}|halaman bantuan]] untuk informasi lebih lanjut
| ar = [[Help:Cite errors/{{{help|}}}|صفحة المساعدة]] للمزيد من المعلومات
| nl = meer informatie staat op de [[Help:Cite errors/{{{help|}}}|hulppagina]]
| zh-cn = 详情参见[[Help:Cite errors/{{{help|}}}|帮助页]].
| ro = vedeți [[Help:Cite errors/{{{help|}}}|pagina de ajutor]] pentru mai multe informații
| it = vedi la [[Help:Cite errors/{{{help|}}}|pagina di aiuto]] per maggiori informazioni
| tr = [[Help:Cite errors/{{{help|}}}|yardım sayfasına]] bakınız
| en-ca = see the [[Help:Cite errors/{{{help|}}}|help page]]
}}).<!-- Languages are in order by preference popularity -->
2761ca79913ffdd82b0cf65958f2e943c7009056
Szablon:Cc-by-3.0
10
22
70
2014-01-15T23:31:12Z
Ffkapa
2
Nowy szablon
wikitext
text/x-wiki
{{Szablon licencji Creative Commons
| grafika = [[Grafika:CC some rights reserved.svg|90px|Licencja Creative Commons]]<br />[[Grafika:Cc-by white.svg|24px|Ikona Creative Commons Attribution]]
| opis = ''Ten plik udostępniony jest na licencji [[Licencje Creative Commons|Creative Commons]] [http://creativecommons.org/licenses/by/3.0/ Attribution 3.0 Unported].''
<!-- /Creative Commons License -->
<!--
<rdf:RDF xmlns="http://web.resource.org/cc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="">
<license rdf:resource="http://creativecommons.org/licenses/by/3.0/" />
</Work>
<License rdf:about="http://creativecommons.org/licenses/by/3.0/">
<permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<permits rdf:resource="http://web.resource.org/cc/Distribution" />
<requires rdf:resource="http://web.resource.org/cc/Notice" />
<requires rdf:resource="http://web.resource.org/cc/Attribution" />
<permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
</License>
</rdf:RDF>
-->
}}
7bf0277b8a786fb527a5dc1d5d92bc04f7594e01
Szablon:Cc-by-nc-sa-3.0
10
258
671
2014-03-21T22:22:45Z
Ffkapa
2
Utworzono nową stronę "{{Szablon licencji Creative Commons | grafika = [[Plik:CC some rights reserved.svg|90px|Licencja Creative Commons]]<br />Plik:Cc-by white.svg|24px|Ikona Creative Commo..."
wikitext
text/x-wiki
{{Szablon licencji Creative Commons
| grafika = [[Plik:CC some rights reserved.svg|90px|Licencja Creative Commons]]<br />[[Plik:Cc-by white.svg|24px|Ikona Creative Commons Attribution]][[Plik:Cc-nc white.svg|24px|Ikona Creative Commons Non-commercial]][[Plik:Cc-nd white.svg|24px|Ikona Creative Commons Non Derivaive Works]]
| opis = ''Ten plik udostępniony jest na licencji Creative Commons [http://creativecommons.org/licenses/by-nc-nd/3.0/legalcode Attribution NonCommercial NoDerivs 3.0 Unported].''
}}
753ebd9b3b38ec88caa96a6bf0cb7af24ee0025f
Szablon:Cc-by-sa-3.0
10
143
360
358
2014-01-18T00:56:59Z
Ffkapa
2
wikitext
text/x-wiki
{{Szablon licencji Creative Commons
| grafika = [[Plik:CC some rights reserved.svg|90px|Licencja Creative Commons]]<br />[[Plik:Cc-by new white.svg|24px|Ikona Creative Commons Attribution]][[Plik:Cc-sa white.svg|24px|Ikona Creative Commons Share Alike]]
| opis = ''Ten plik udostępniony jest na licencji [[Licencje Creative Commons|Creative Commons]] [http://creativecommons.org/licenses/by-sa/3.0/deed.pl Attribution ShareAlike 3.0 Unported].''
<!-- /Creative Commons License -->
<!--
<rdf:RDF xmlns="http://web.resource.org/cc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="">
<license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
</Work>
<License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">
<permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<permits rdf:resource="http://web.resource.org/cc/Distribution" />
<requires rdf:resource="http://web.resource.org/cc/Notice" />
<requires rdf:resource="http://web.resource.org/cc/Attribution" />
<permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
</License>
</rdf:RDF>
-->
}}
<noinclude>{{Cytuj Wiki Szablon}}</noinclude>
d5ce29405a310cc1d8b8802f4257e63989a12831
358
2014-01-18T00:16:27Z
Ffkapa
2
Nowy szablon
wikitext
text/x-wiki
{{Szablon licencji Creative Commons
| grafika = [[Plik:CC some rights reserved.svg|90px|Licencja Creative Commons]]<br />[[Plik:Cc-by new white.svg|24px|Ikona Creative Commons Attribution]][[Plik:Cc-sa white.svg|24px|Ikona Creative Commons Share Alike]]
| opis = ''Ten plik udostępniony jest na licencji [[Licencje Creative Commons|Creative Commons]] [http://creativecommons.org/licenses/by-sa/3.0/deed.pl Attribution ShareAlike 3.0 Unported].''
<!-- /Creative Commons License -->
<!--
<rdf:RDF xmlns="http://web.resource.org/cc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="">
<license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
</Work>
<License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">
<permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<permits rdf:resource="http://web.resource.org/cc/Distribution" />
<requires rdf:resource="http://web.resource.org/cc/Notice" />
<requires rdf:resource="http://web.resource.org/cc/Attribution" />
<permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
</License>
</rdf:RDF>
-->
}}
<noinclude>{{Cytuj Wiki}}</noinclude>
e0754bfb6a7151cbf6d93ad2da88100f0c5b7bc4
Szablon:Commonscat
10
198
554
2014-03-11T00:51:53Z
Ffkapa
2
nowy szablon
wikitext
text/x-wiki
<div class="noprint do-not-make-smaller" style="clear: {{#ifeq:{{{position}}}|left|left|right}}; border: solid #aaa 1px; margin: {{#ifeq:{{{position}}}|left|0 1em 1em 0|0 0 1em 1em}}; font-size: 90%; background: #f9f9f9; width: {{{3|250px}}}; padding: 2px; text-align: center; float: {{#ifeq:{{{position}}}|left|left|right}};">
<div style="float: left; vertical-align:middle;">[[Plik:Commons in image icon.svg|50px|link=commons:Category:{{{1|{{PAGENAME}}}}}|Wikimedia Commons]]</div>
<div style="margin-left: 35px; line-height:normal; vertical-align:middle;" class="plainlinks"> W [[commons:|Wikimedia Commons]] znajdują się multimedia związane z tematem:<br />'''[{{fullurl:commons:Category:{{{1|{{PAGENAME}}}}}|uselang=pl}} {{{2|{{PAGENAME}}}}}]'''</div>
</div><noinclude>{{Cytuj_Wiki_Szablon}}</noinclude>
bdb10d428277e924d06d5ed643315388d801eb68
Szablon:Cytuj Wiki
10
17
604
63
2014-03-13T15:36:43Z
Ffkapa
2
red
wikitext
text/x-wiki
<small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title={{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small>
<noinclude>[[Kategoria:Szablony umieszczane na stronach plików]]</noinclude>
d623acfcbc171b324d8845b692915779a0c17c2a
63
61
2014-01-15T21:45:19Z
Ffkapa
2
wikitext
text/x-wiki
<small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title={{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small>
98c58f7d063e2cac9931ee613462ad0cebb06997
61
2014-01-15T21:39:30Z
Ffkapa
2
Nowy szablon cytowań
wikitext
text/x-wiki
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title={{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
81d4106032018bd1341dd253e4c8ef1e7cd8d0a8
Szablon:Cytuj Wiki Szablon
10
144
605
359
2014-03-13T15:39:28Z
Ffkapa
2
red
wikitext
text/x-wiki
<small>© Źródło: [https://pl.wikipedia.org/wiki/Szablon:{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title=Szablon:{{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small>
<noinclude>[[Kategoria:Szablony umieszczane na stronach plików]]</noinclude>
fc934b26a8f63258549acc81a2aa7564a4c2052a
359
2014-01-18T00:56:23Z
Ffkapa
2
Utworzono nową stronę "<small>© Źródło: [https://pl.wikipedia.org/wiki/Szablon:{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title=Szablon:{{PAGENAMEE}}&action=history Au..."
wikitext
text/x-wiki
<small>© Źródło: [https://pl.wikipedia.org/wiki/Szablon:{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title=Szablon:{{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small>
712df97a753fa22b7e4967820527e4c6c68cd95f
Szablon:Cytuj książkę
10
6
565
13
2014-03-11T15:01:28Z
Ffkapa
2
red
wikitext
text/x-wiki
<includeonly><span class="citation" {{#if:{{{odn|}}} | id="{{#if: {{{nazwisko r|}}}
| {{odn/id|{{{nazwisko r|}}}|{{{nazwisko2 r|}}}|{{{nazwisko3 r|}}}|{{{nazwisko4 r|}}}|{{#if:{{{rok|{{{data|}}}}}}|{{#time:Y|{{{rok|{{{data|}}}}}} }} }}|odn={{{odn|}}}}}
| {{odn/id|{{{nazwisko|}}}|{{{nazwisko2|}}}|{{{nazwisko3|}}}|{{{nazwisko4|}}}|{{#if:{{{rok|{{{data|}}}}}}|{{#time:Y|{{{rok|{{{data|}}}}}} }} }}|odn={{{odn|}}}}} }}" }}>{{
#if: {{{autor r|}}}{{{nazwisko r|}}}
| {{
#if: {{{autor r link|}}}
| [[{{{autor r link}}}|{{
#if: {{{nazwisko r|}}}
| {{#if: {{{imię r|}}} |{{{imię r}}} }}{{{nazwisko r}}}
| {{{autor r}}}
}}]]
| {{
#if: {{{nazwisko r|}}}
| {{#if: {{{imię r|}}} |{{{imię r}}} }}{{{nazwisko r}}}
| {{{autor r}}}
}}
}}{{
#if: {{{nazwisko2 r|}}}{{{autor2 r|}}}
|, {{#if: {{{autor r2 link|}}}
|[[{{{autor r2 link}}}|{{#if:{{{nazwisko2 r|}}}
|{{#if: {{{imię2 r|}}} |{{{imię2 r}}} }}{{{nazwisko2 r}}}
|{{{autor2 r}}}
}}]]
|{{#if:{{{nazwisko2 r|}}}
|{{#if: {{{imię2 r|}}} |{{{imię2 r}}} }}{{{nazwisko2 r}}}
|{{{autor2 r}}}
}}
}}
|}}{{
#if: {{{nazwisko3 r|}}}{{{autor3 r|}}}
|, {{#if: {{{autor r3 link|}}}
|[[{{{autor r3 link}}}|{{#if:{{{nazwisko3 r|}}}
|{{#if: {{{imię3 r|}}} |{{{imię3 r}}} }}{{{nazwisko3 r}}}
|{{{autor3 r}}}
}}]]
|{{#if:{{{nazwisko3 r|}}}
|{{#if: {{{imię3 r|}}} |{{{imię3 r}}} }}{{{nazwisko3 r}}}
|{{{autor3 r}}}
}}
}}
|}}: 
}}{{
#if: {{{rozdział|}}}
| {{
#if: {{{adres rozdziału|}}}
| [{{{adres rozdziału}}} {{{rozdział}}}]
| {{{rozdział}}}
}}. W: }}{{
#if: {{{autor|}}}{{{nazwisko|}}}
| {{
#if: {{{autor link|}}}
| [[{{{autor link}}}|{{
#if: {{{nazwisko|}}}
| {{#if: {{{imię|}}} |{{{imię}}} }}{{{nazwisko}}}
| {{{autor}}}
}}]]
| {{
#if: {{{nazwisko|}}}
| {{#if: {{{imię|}}} |{{{imię}}} }}{{{nazwisko}}}
| {{{autor}}}
}}
}}{{
#if: {{{nazwisko2|}}}{{{autor2|}}}
|, {{#if: {{{autor link2|}}}
|[[{{{autor link2}}}|{{#if:{{{nazwisko2|}}}
|{{#if: {{{imię2|}}} |{{{imię2}}} }}{{{nazwisko2}}}
|{{{autor2}}}
}}]]
|{{#if:{{{nazwisko2|}}}
|{{#if: {{{imię2|}}} |{{{imię2}}} }}{{{nazwisko2}}}
|{{{autor2}}}
}}
}}
|}}{{
#if: {{{nazwisko3|}}}{{{autor3|}}}
|, {{#if: {{{autor link3|}}}
|[[{{{autor link3}}}|{{#if:{{{nazwisko3|}}}
|{{#if: {{{imię3|}}} |{{{imię3}}} }}{{{nazwisko3}}}
|{{{autor3}}}
}}]]
|{{#if:{{{nazwisko3|}}}
|{{#if: {{{imię3|}}} |{{{imię3}}} }}{{{nazwisko3}}}
|{{{autor3}}}
}}
}}
|}}{{
#if: {{{nazwisko4|}}}{{{autor4|}}}
|, {{#if:{{{autor link4|}}}
|[[{{{autor link4}}}|{{#if:{{{nazwisko4|}}}
|{{#if: {{{imię4|}}} |{{{imię4}}} }}{{{nazwisko4}}}
|{{{autor4}}}
}}]]
|{{#if:{{{nazwisko4|}}}
|{{#if: {{{imię4|}}} |{{{imię4}}} }}{{{nazwisko4}}}
|{{{autor4}}}
}}
}}
|}}{{
#if: {{{nazwisko5|}}}{{{autor5|}}}
|, {{#if: {{{autor link5|}}}
|[[{{{autor link5}}}|{{#if:{{{nazwisko5|}}}
|{{#if: {{{imię5|}}} |{{{imię5}}} }}{{{nazwisko5}}}
|{{{autor5}}}
}}]]
|{{#if:{{{nazwisko5|}}}
|{{#if: {{{imię5|}}}|{{{imię5}}} }}{{{nazwisko5}}}
|{{{autor5}}}
}}
}}
|}}{{
#if: {{{nazwisko6|}}}{{{autor6|}}}
|, {{#if: {{{autor link6|}}}
|[[{{{autor link6}}}|{{#if:{{{nazwisko6|}}}
|{{#if: {{{imię6|}}} |{{{imię6}}} }}{{{nazwisko6}}}
|{{{autor6}}}
}}]]
|{{#if:{{{nazwisko6|}}}
|{{#if: {{{imię6|}}}|{{{imię6}}} }}{{{nazwisko6}}}
|{{{autor6}}}
}}
}}
|}}{{
#if: {{{nazwisko7|}}}{{{autor7|}}}
|, {{#if: {{{autor link7|}}}
|[[{{{autor link7|}}}|{{#if:{{{nazwisko7|}}}
|{{#if: {{{imię7|}}} |{{{imię7|}}} }}{{{nazwisko7|}}}
|{{{autor7|}}}
}}]]
|{{#if:{{{nazwisko7|}}}
|{{#if: {{{imię7|}}}|{{{imię7|}}} }}{{{nazwisko7|}}}
|{{{autor7|}}}
}}
}}
|}}{{
#if: {{{nazwisko8|}}}{{{autor8|}}}
|, {{#if: {{{autor link8|}}}
|[[{{{autor link8|}}}|{{#if:{{{nazwisko8|}}}
|{{#if: {{{imię8|}}} |{{{imię8|}}} }}{{{nazwisko8|}}}
|{{{autor8|}}}
}}]]
|{{#if:{{{nazwisko8|}}}
|{{#if: {{{imię8|}}}|{{{imię8|}}} }}{{{nazwisko8|}}}
|{{{autor8|}}}
}}
}}
|}}{{
#if: {{{nazwisko9|}}}{{{autor9|}}}
|, {{#if: {{{autor link9|}}}
|[[{{{autor link9|}}}|{{#if:{{{nazwisko9|}}}
|{{#if: {{{imię9|}}} |{{{imię9|}}} }}{{{nazwisko9|}}}
|{{{autor9|}}}
}}]]
|{{#if:{{{nazwisko9|}}}
|{{#if: {{{imię9|}}}|{{{imię9|}}} }}{{{nazwisko9|}}}
|{{{autor9|}}}
}}
}}
|}}{{
#if: {{{nazwisko10|}}}{{{autor10|}}}
|, {{#if: {{{autor link10|}}}
|[[{{{autor link10|}}}|{{#if:{{{nazwisko10|}}}
|{{#if: {{{imię10|}}} |{{{imię10|}}} }}{{{nazwisko10|}}}
|{{{autor10|}}}
}}]]
|{{#if:{{{nazwisko10|}}}
|{{#if: {{{imię10|}}}|{{{imię10|}}} }}{{{nazwisko10|}}}
|{{{autor10|}}}
}}
}}
|}}{{
#if: {{{nazwisko11|}}}{{{autor11|}}}
|, {{#if: {{{autor link11|}}}
|[[{{{autor link11|}}}|{{#if:{{{nazwisko11|}}}
|{{#if: {{{imię11|}}} |{{{imię11|}}} }}{{{nazwisko11|}}}
|{{{autor11|}}}
}}]]
|{{#if:{{{nazwisko11|}}}
|{{#if: {{{imię11|}}}|{{{imię11|}}} }}{{{nazwisko11|}}}
|{{{autor11|}}}
}}
}}
|}}{{
#if: {{{nazwisko12|}}}{{{autor12|}}}
|, {{#if: {{{autor link12|}}}
|[[{{{autor link12|}}}|{{#if:{{{nazwisko12|}}}
|{{#if: {{{imię12|}}} |{{{imię12|}}} }}{{{nazwisko12|}}}
|{{{autor12|}}}
}}]]
|{{#if:{{{nazwisko12|}}}
|{{#if: {{{imię12|}}}|{{{imię12|}}} }}{{{nazwisko12|}}}
|{{{autor12|}}}
}}
}}
|}}{{
#if: {{{nazwisko13|}}}{{{autor13|}}}
|, {{#if: {{{autor link13|}}}
|[[{{{autor link13|}}}|{{#if:{{{nazwisko13|}}}
|{{#if: {{{imię13|}}} |{{{imię13|}}} }}{{{nazwisko13|}}}
|{{{autor13|}}}
}}]]
|{{#if:{{{nazwisko13|}}}
|{{#if: {{{imię13|}}}|{{{imię13|}}} }}{{{nazwisko13|}}}
|{{{autor13|}}}
}}
}}
|}}{{
#if: {{{nazwisko14|}}}{{{autor14|}}}
|, {{#if: {{{autor link14|}}}
|[[{{{autor link14|}}}|{{#if:{{{nazwisko14|}}}
|{{#if: {{{imię14|}}} |{{{imię14|}}} }}{{{nazwisko14|}}}
|{{{autor14|}}}
}}]]
|{{#if:{{{nazwisko14|}}}
|{{#if: {{{imię14|}}}|{{{imię14|}}} }}{{{nazwisko14|}}}
|{{{autor14|}}}
}}
}}
|}}{{
#if: {{{nazwisko15|}}}{{{autor15|}}}
|, {{#if: {{{autor link15|}}}
|[[{{{autor link15|}}}|{{#if:{{{nazwisko15|}}}
|{{#if: {{{imię15|}}} |{{{imię15|}}} }}{{{nazwisko15|}}}
|{{{autor15|}}}
}}]]
|{{#if:{{{nazwisko15|}}}
|{{#if: {{{imię15|}}}|{{{imię15|}}} }}{{{nazwisko15|}}}
|{{{autor15|}}}
}}
}}
|}}: 
}}''{{#if: {{{url|}}}|[{{{url}}} {{{tytuł}}}]|{{{tytuł}}}}}''{{
#if: {{{inni|}}} |. {{{inni}}}
}}{{
#if: {{{wydanie|}}} |. Wyd. {{{wydanie}}}
}}{{
#if: {{{tom|}}}{{{tytuł tomu|}}} |. T. {{#if:{{{tom|}}}|{{{tom}}}{{#if: {{{tytuł tomu|}}}|: {{{tytuł tomu}}}|}}|{{{tytuł tomu}}}}}
}}{{
#if: {{{część|}}} |. Cz. {{{część}}}{{#if: {{{tytuł części|}}}|: {{{tytuł części}}}|}}
}}{{
#if: {{{wydawca|}}} |. {{#if: {{{miejsce|}}}|{{{miejsce|}}}: |}}{{{wydawca}}}|{{#if: {{{miejsce|}}}|. {{{miejsce|}}}}}
}}{{
#if: {{{data|}}}
| {{#if: {{{wydawca|}}}|, |{{#if: {{{miejsce|}}}|: |. }}}}{{{data}}}
| {{
#if: {{{rok|}}}
| {{
#if: {{{miesiąc|}}}
| {{#if: {{{wydawca|}}}|, |{{#if: {{{miejsce|}}}|: |. }} }}{{{miesiąc}}} {{{rok}}}
| {{#if: {{{wydawca|}}}|, |{{#if: {{{miejsce|}}}|: |. }} }}{{{rok}}}
}}
}}
}}{{
#if: {{{strony|}}} |{{#if: {{{wydawca|}}}{{{data|}}}{{{rok|}}}|,|.}} s. {{{strony}}}
}}{{
#if: {{{kolumny|}}} |{{#if: {{{wydawca|}}}{{{data|}}}{{{rok|}}}{{{strony|}}}|,|.}} kol. {{{kolumny}}}
}}{{
#if: {{{seria|}}} |{{#if: {{{wydawca|}}}{{{data|}}}{{{rok|}}}{{{strony|}}}{{{kolumny|}}}|, s|. S}}eria: {{{seria}}}
}}{{
#if: {{{doi|}}} | . DOI:[http://dx.doi.org/{{{doi|}}} {{{doietykieta|{{{doi}}}}}}]
}}{{
#if: {{{id|}}} | . {{{id}}}
}}{{
#if: {{{isbn|}}} | . ISBN {{{isbn}}}
}}{{
#if: {{{issn|}}} | . [[International Standard Serial Number|ISSN]] [http://worldcat.org/issn/{{{issn}}} {{{issn}}}]
}}{{
#if: {{{oclc|}}} | . [[Online Computer Library Center|OCLC]] [http://worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]
}}<!-- Gdy mamy URL, korzystamy z daty dostępu -->{{
#if: {{{url|}}} | {{#if: {{{data dostępu|}}} | . [dostęp {{{data dostępu}}}] }}
}}{{ #if: {{{cytat|}}} | . Cytat: {{{cytat}}}}}.<!--
This is a COinS tag (http://ocoins.info), which allows automated tools to parse the citation information:
--><span class="Z3988" title="ctx_ver=Z39.88-2004<!--
-->&rft_val_fmt={{urlencode:info:ofi/fmt:kev:mtx:book}}<!-- Field descriptions: http://www.openurl.info/registry/docs/mtx/info:ofi/fmt:kev:mtx:book
-->&rft.genre=book<!-- book: a publication that is complete in one part or a designated finite number of parts, often identified with an ISBN. (genre could also be bookitem, conference, proceeding, report, document, or unknown)
-->&rft.btitle={{urlencode:{{{tytuł}}}}}<!-- The title of the book. This can also be expressed as title, for compatibility with version 0.1. "moby dick or the white whale"
-->{{#if: {{{rozdział|}}} | &rft.atitle={{urlencode:{{{rozdział}}}}} }}<!-- Chapter title. Chapter title is included if it is a distinct title, e.g. "The Push Westward."
-->{{#if: {{{nazwisko r|{{{nazwisko|}}}}}} | &rft.aulast={{urlencode:{{{nazwisko r|{{{nazwisko}}}}}}}} }}<!-- First author's family name. This may be more than one word ... e.g. Smith, Fred James is recorded as "aulast=smith"
-->{{#if: {{{imię r|{{{imię|}}}}}} | &rft.aufirst={{urlencode:{{{imię r|{{{imię}}}}}}}} }}<!-- First author's given name or names or initials. This data element may contain multiple words and punctuation, e.g. "Fred F", "Fred James"
-->{{#if: {{{autor r|{{{autor|}}}}}} | &rft.au={{urlencode:{{{autor r|{{{autor}}}}}}}} }}<!-- This data element contains the full name of a single author, e.g. "Smith, Fred M", "Harry S. Truman".
-->{{#if: {{{data|}}} | &rft.date={{urlencode:{{{data}}}}}<!--
-->{{#if: {{{rok|}}} | &rft.date={{urlencode:{{{rok}}}}} }} }}<!-- Date of publication. Book dates are assumed to be a single year. (or ISO 8601)
-->{{#if: {{{wydanie|}}} | &rft.edition={{urlencode:{{{wydanie}}}}} }}<!-- Statement of the edition of the book. This will usually be a phrase, with or without numbers, but may be a single number, e.g. "First edition", "4th ed."
-->{{#if: {{{wydawca|}}} | &rft.pub={{urlencode:{{{wydawca}}}}} }}<!-- Publisher name. "Harper and Row"
-->{{#if: {{{miejsce|}}} | &rft.place={{urlencode:{{{miejsce}}}}} }}<!-- Place of publication. "New York"
-->{{#if: {{{strony|}}} | &rft.pages={{urlencode:{{{strony}}}}} }}<!-- Start and end pages for parts of a book, e.g. "124-147" ... This data element includes the OpenURL 0.1 definition of "pages".
-->{{#if: {{{seria|}}} | &rft.series={{urlencode:{{{seria}}}}} }}<!-- The title of a series in which the book or document was issued. There may also be an ISSN associated with the series.
-->{{#if: {{{isbn|}}} | &rft.isbn={{{isbn}}} }}<!-- International Standard Book Number (ISBN) ... i.e. "057117678X" but it may contain hyphens, e.g. "1-878067-73-7"
-->{{#if: {{{oclc|}}} | &rft_id=info:oclcnum/{{{oclc}}} }}<!--
-->{{#if: {{{doi|}}} | &rft_id=info:doi/{{urlencode:{{{doi}}}}} }}<!--
-->{{#if: {{{url|}}} | &rft_id={{urlencode:{{{url}}}}} }}<!--
-->"></span>{{#ifeq:{{{język|}}}||| {{lang|{{{język}}}|{{{język2|}}}|{{{język3|}}}|{{{język4|}}}|{{{język5|}}}|{{{język6|}}}|{{{język7|}}}|{{{język8|}}}|{{{język9|}}}|{{{język10|}}}}}}}</span></includeonly>
<noinclude>
{{Cytuj_Wiki_Szablon}}
[[Kategoria:Szablony techniczne]]
</noinclude>
6255df8a5d93e5a561d967207d16aa63487b2fd8
13
6
2014-01-15T00:26:22Z
Ffkapa
2
info o autorstwie
wikitext
text/x-wiki
<includeonly><span class="citation" {{#if:{{{odn|}}} | id="{{#if: {{{nazwisko r|}}}
| {{odn/id|{{{nazwisko r|}}}|{{{nazwisko2 r|}}}|{{{nazwisko3 r|}}}|{{{nazwisko4 r|}}}|{{#if:{{{rok|{{{data|}}}}}}|{{#time:Y|{{{rok|{{{data|}}}}}} }} }}|odn={{{odn|}}}}}
| {{odn/id|{{{nazwisko|}}}|{{{nazwisko2|}}}|{{{nazwisko3|}}}|{{{nazwisko4|}}}|{{#if:{{{rok|{{{data|}}}}}}|{{#time:Y|{{{rok|{{{data|}}}}}} }} }}|odn={{{odn|}}}}} }}" }}>{{
#if: {{{autor r|}}}{{{nazwisko r|}}}
| {{
#if: {{{autor r link|}}}
| [[{{{autor r link}}}|{{
#if: {{{nazwisko r|}}}
| {{#if: {{{imię r|}}} |{{{imię r}}} }}{{{nazwisko r}}}
| {{{autor r}}}
}}]]
| {{
#if: {{{nazwisko r|}}}
| {{#if: {{{imię r|}}} |{{{imię r}}} }}{{{nazwisko r}}}
| {{{autor r}}}
}}
}}{{
#if: {{{nazwisko2 r|}}}{{{autor2 r|}}}
|, {{#if: {{{autor r2 link|}}}
|[[{{{autor r2 link}}}|{{#if:{{{nazwisko2 r|}}}
|{{#if: {{{imię2 r|}}} |{{{imię2 r}}} }}{{{nazwisko2 r}}}
|{{{autor2 r}}}
}}]]
|{{#if:{{{nazwisko2 r|}}}
|{{#if: {{{imię2 r|}}} |{{{imię2 r}}} }}{{{nazwisko2 r}}}
|{{{autor2 r}}}
}}
}}
|}}{{
#if: {{{nazwisko3 r|}}}{{{autor3 r|}}}
|, {{#if: {{{autor r3 link|}}}
|[[{{{autor r3 link}}}|{{#if:{{{nazwisko3 r|}}}
|{{#if: {{{imię3 r|}}} |{{{imię3 r}}} }}{{{nazwisko3 r}}}
|{{{autor3 r}}}
}}]]
|{{#if:{{{nazwisko3 r|}}}
|{{#if: {{{imię3 r|}}} |{{{imię3 r}}} }}{{{nazwisko3 r}}}
|{{{autor3 r}}}
}}
}}
|}}: 
}}{{
#if: {{{rozdział|}}}
| {{
#if: {{{adres rozdziału|}}}
| [{{{adres rozdziału}}} {{{rozdział}}}]
| {{{rozdział}}}
}}. W: }}{{
#if: {{{autor|}}}{{{nazwisko|}}}
| {{
#if: {{{autor link|}}}
| [[{{{autor link}}}|{{
#if: {{{nazwisko|}}}
| {{#if: {{{imię|}}} |{{{imię}}} }}{{{nazwisko}}}
| {{{autor}}}
}}]]
| {{
#if: {{{nazwisko|}}}
| {{#if: {{{imię|}}} |{{{imię}}} }}{{{nazwisko}}}
| {{{autor}}}
}}
}}{{
#if: {{{nazwisko2|}}}{{{autor2|}}}
|, {{#if: {{{autor link2|}}}
|[[{{{autor link2}}}|{{#if:{{{nazwisko2|}}}
|{{#if: {{{imię2|}}} |{{{imię2}}} }}{{{nazwisko2}}}
|{{{autor2}}}
}}]]
|{{#if:{{{nazwisko2|}}}
|{{#if: {{{imię2|}}} |{{{imię2}}} }}{{{nazwisko2}}}
|{{{autor2}}}
}}
}}
|}}{{
#if: {{{nazwisko3|}}}{{{autor3|}}}
|, {{#if: {{{autor link3|}}}
|[[{{{autor link3}}}|{{#if:{{{nazwisko3|}}}
|{{#if: {{{imię3|}}} |{{{imię3}}} }}{{{nazwisko3}}}
|{{{autor3}}}
}}]]
|{{#if:{{{nazwisko3|}}}
|{{#if: {{{imię3|}}} |{{{imię3}}} }}{{{nazwisko3}}}
|{{{autor3}}}
}}
}}
|}}{{
#if: {{{nazwisko4|}}}{{{autor4|}}}
|, {{#if:{{{autor link4|}}}
|[[{{{autor link4}}}|{{#if:{{{nazwisko4|}}}
|{{#if: {{{imię4|}}} |{{{imię4}}} }}{{{nazwisko4}}}
|{{{autor4}}}
}}]]
|{{#if:{{{nazwisko4|}}}
|{{#if: {{{imię4|}}} |{{{imię4}}} }}{{{nazwisko4}}}
|{{{autor4}}}
}}
}}
|}}{{
#if: {{{nazwisko5|}}}{{{autor5|}}}
|, {{#if: {{{autor link5|}}}
|[[{{{autor link5}}}|{{#if:{{{nazwisko5|}}}
|{{#if: {{{imię5|}}} |{{{imię5}}} }}{{{nazwisko5}}}
|{{{autor5}}}
}}]]
|{{#if:{{{nazwisko5|}}}
|{{#if: {{{imię5|}}}|{{{imię5}}} }}{{{nazwisko5}}}
|{{{autor5}}}
}}
}}
|}}{{
#if: {{{nazwisko6|}}}{{{autor6|}}}
|, {{#if: {{{autor link6|}}}
|[[{{{autor link6}}}|{{#if:{{{nazwisko6|}}}
|{{#if: {{{imię6|}}} |{{{imię6}}} }}{{{nazwisko6}}}
|{{{autor6}}}
}}]]
|{{#if:{{{nazwisko6|}}}
|{{#if: {{{imię6|}}}|{{{imię6}}} }}{{{nazwisko6}}}
|{{{autor6}}}
}}
}}
|}}{{
#if: {{{nazwisko7|}}}{{{autor7|}}}
|, {{#if: {{{autor link7|}}}
|[[{{{autor link7|}}}|{{#if:{{{nazwisko7|}}}
|{{#if: {{{imię7|}}} |{{{imię7|}}} }}{{{nazwisko7|}}}
|{{{autor7|}}}
}}]]
|{{#if:{{{nazwisko7|}}}
|{{#if: {{{imię7|}}}|{{{imię7|}}} }}{{{nazwisko7|}}}
|{{{autor7|}}}
}}
}}
|}}{{
#if: {{{nazwisko8|}}}{{{autor8|}}}
|, {{#if: {{{autor link8|}}}
|[[{{{autor link8|}}}|{{#if:{{{nazwisko8|}}}
|{{#if: {{{imię8|}}} |{{{imię8|}}} }}{{{nazwisko8|}}}
|{{{autor8|}}}
}}]]
|{{#if:{{{nazwisko8|}}}
|{{#if: {{{imię8|}}}|{{{imię8|}}} }}{{{nazwisko8|}}}
|{{{autor8|}}}
}}
}}
|}}{{
#if: {{{nazwisko9|}}}{{{autor9|}}}
|, {{#if: {{{autor link9|}}}
|[[{{{autor link9|}}}|{{#if:{{{nazwisko9|}}}
|{{#if: {{{imię9|}}} |{{{imię9|}}} }}{{{nazwisko9|}}}
|{{{autor9|}}}
}}]]
|{{#if:{{{nazwisko9|}}}
|{{#if: {{{imię9|}}}|{{{imię9|}}} }}{{{nazwisko9|}}}
|{{{autor9|}}}
}}
}}
|}}{{
#if: {{{nazwisko10|}}}{{{autor10|}}}
|, {{#if: {{{autor link10|}}}
|[[{{{autor link10|}}}|{{#if:{{{nazwisko10|}}}
|{{#if: {{{imię10|}}} |{{{imię10|}}} }}{{{nazwisko10|}}}
|{{{autor10|}}}
}}]]
|{{#if:{{{nazwisko10|}}}
|{{#if: {{{imię10|}}}|{{{imię10|}}} }}{{{nazwisko10|}}}
|{{{autor10|}}}
}}
}}
|}}{{
#if: {{{nazwisko11|}}}{{{autor11|}}}
|, {{#if: {{{autor link11|}}}
|[[{{{autor link11|}}}|{{#if:{{{nazwisko11|}}}
|{{#if: {{{imię11|}}} |{{{imię11|}}} }}{{{nazwisko11|}}}
|{{{autor11|}}}
}}]]
|{{#if:{{{nazwisko11|}}}
|{{#if: {{{imię11|}}}|{{{imię11|}}} }}{{{nazwisko11|}}}
|{{{autor11|}}}
}}
}}
|}}{{
#if: {{{nazwisko12|}}}{{{autor12|}}}
|, {{#if: {{{autor link12|}}}
|[[{{{autor link12|}}}|{{#if:{{{nazwisko12|}}}
|{{#if: {{{imię12|}}} |{{{imię12|}}} }}{{{nazwisko12|}}}
|{{{autor12|}}}
}}]]
|{{#if:{{{nazwisko12|}}}
|{{#if: {{{imię12|}}}|{{{imię12|}}} }}{{{nazwisko12|}}}
|{{{autor12|}}}
}}
}}
|}}{{
#if: {{{nazwisko13|}}}{{{autor13|}}}
|, {{#if: {{{autor link13|}}}
|[[{{{autor link13|}}}|{{#if:{{{nazwisko13|}}}
|{{#if: {{{imię13|}}} |{{{imię13|}}} }}{{{nazwisko13|}}}
|{{{autor13|}}}
}}]]
|{{#if:{{{nazwisko13|}}}
|{{#if: {{{imię13|}}}|{{{imię13|}}} }}{{{nazwisko13|}}}
|{{{autor13|}}}
}}
}}
|}}{{
#if: {{{nazwisko14|}}}{{{autor14|}}}
|, {{#if: {{{autor link14|}}}
|[[{{{autor link14|}}}|{{#if:{{{nazwisko14|}}}
|{{#if: {{{imię14|}}} |{{{imię14|}}} }}{{{nazwisko14|}}}
|{{{autor14|}}}
}}]]
|{{#if:{{{nazwisko14|}}}
|{{#if: {{{imię14|}}}|{{{imię14|}}} }}{{{nazwisko14|}}}
|{{{autor14|}}}
}}
}}
|}}{{
#if: {{{nazwisko15|}}}{{{autor15|}}}
|, {{#if: {{{autor link15|}}}
|[[{{{autor link15|}}}|{{#if:{{{nazwisko15|}}}
|{{#if: {{{imię15|}}} |{{{imię15|}}} }}{{{nazwisko15|}}}
|{{{autor15|}}}
}}]]
|{{#if:{{{nazwisko15|}}}
|{{#if: {{{imię15|}}}|{{{imię15|}}} }}{{{nazwisko15|}}}
|{{{autor15|}}}
}}
}}
|}}: 
}}''{{#if: {{{url|}}}|[{{{url}}} {{{tytuł}}}]|{{{tytuł}}}}}''{{
#if: {{{inni|}}} |. {{{inni}}}
}}{{
#if: {{{wydanie|}}} |. Wyd. {{{wydanie}}}
}}{{
#if: {{{tom|}}}{{{tytuł tomu|}}} |. T. {{#if:{{{tom|}}}|{{{tom}}}{{#if: {{{tytuł tomu|}}}|: {{{tytuł tomu}}}|}}|{{{tytuł tomu}}}}}
}}{{
#if: {{{część|}}} |. Cz. {{{część}}}{{#if: {{{tytuł części|}}}|: {{{tytuł części}}}|}}
}}{{
#if: {{{wydawca|}}} |. {{#if: {{{miejsce|}}}|{{{miejsce|}}}: |}}{{{wydawca}}}|{{#if: {{{miejsce|}}}|. {{{miejsce|}}}}}
}}{{
#if: {{{data|}}}
| {{#if: {{{wydawca|}}}|, |{{#if: {{{miejsce|}}}|: |. }}}}{{{data}}}
| {{
#if: {{{rok|}}}
| {{
#if: {{{miesiąc|}}}
| {{#if: {{{wydawca|}}}|, |{{#if: {{{miejsce|}}}|: |. }} }}{{{miesiąc}}} {{{rok}}}
| {{#if: {{{wydawca|}}}|, |{{#if: {{{miejsce|}}}|: |. }} }}{{{rok}}}
}}
}}
}}{{
#if: {{{strony|}}} |{{#if: {{{wydawca|}}}{{{data|}}}{{{rok|}}}|,|.}} s. {{{strony}}}
}}{{
#if: {{{kolumny|}}} |{{#if: {{{wydawca|}}}{{{data|}}}{{{rok|}}}{{{strony|}}}|,|.}} kol. {{{kolumny}}}
}}{{
#if: {{{seria|}}} |{{#if: {{{wydawca|}}}{{{data|}}}{{{rok|}}}{{{strony|}}}{{{kolumny|}}}|, s|. S}}eria: {{{seria}}}
}}{{
#if: {{{doi|}}} | . DOI:[http://dx.doi.org/{{{doi|}}} {{{doietykieta|{{{doi}}}}}}]
}}{{
#if: {{{id|}}} | . {{{id}}}
}}{{
#if: {{{isbn|}}} | . ISBN {{{isbn}}}
}}{{
#if: {{{issn|}}} | . [[International Standard Serial Number|ISSN]] [http://worldcat.org/issn/{{{issn}}} {{{issn}}}]
}}{{
#if: {{{oclc|}}} | . [[Online Computer Library Center|OCLC]] [http://worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]
}}<!-- Gdy mamy URL, korzystamy z daty dostępu -->{{
#if: {{{url|}}} | {{#if: {{{data dostępu|}}} | . [dostęp {{{data dostępu}}}] }}
}}{{ #if: {{{cytat|}}} | . Cytat: {{{cytat}}}}}.<!--
This is a COinS tag (http://ocoins.info), which allows automated tools to parse the citation information:
--><span class="Z3988" title="ctx_ver=Z39.88-2004<!--
-->&rft_val_fmt={{urlencode:info:ofi/fmt:kev:mtx:book}}<!-- Field descriptions: http://www.openurl.info/registry/docs/mtx/info:ofi/fmt:kev:mtx:book
-->&rft.genre=book<!-- book: a publication that is complete in one part or a designated finite number of parts, often identified with an ISBN. (genre could also be bookitem, conference, proceeding, report, document, or unknown)
-->&rft.btitle={{urlencode:{{{tytuł}}}}}<!-- The title of the book. This can also be expressed as title, for compatibility with version 0.1. "moby dick or the white whale"
-->{{#if: {{{rozdział|}}} | &rft.atitle={{urlencode:{{{rozdział}}}}} }}<!-- Chapter title. Chapter title is included if it is a distinct title, e.g. "The Push Westward."
-->{{#if: {{{nazwisko r|{{{nazwisko|}}}}}} | &rft.aulast={{urlencode:{{{nazwisko r|{{{nazwisko}}}}}}}} }}<!-- First author's family name. This may be more than one word ... e.g. Smith, Fred James is recorded as "aulast=smith"
-->{{#if: {{{imię r|{{{imię|}}}}}} | &rft.aufirst={{urlencode:{{{imię r|{{{imię}}}}}}}} }}<!-- First author's given name or names or initials. This data element may contain multiple words and punctuation, e.g. "Fred F", "Fred James"
-->{{#if: {{{autor r|{{{autor|}}}}}} | &rft.au={{urlencode:{{{autor r|{{{autor}}}}}}}} }}<!-- This data element contains the full name of a single author, e.g. "Smith, Fred M", "Harry S. Truman".
-->{{#if: {{{data|}}} | &rft.date={{urlencode:{{{data}}}}}<!--
-->{{#if: {{{rok|}}} | &rft.date={{urlencode:{{{rok}}}}} }} }}<!-- Date of publication. Book dates are assumed to be a single year. (or ISO 8601)
-->{{#if: {{{wydanie|}}} | &rft.edition={{urlencode:{{{wydanie}}}}} }}<!-- Statement of the edition of the book. This will usually be a phrase, with or without numbers, but may be a single number, e.g. "First edition", "4th ed."
-->{{#if: {{{wydawca|}}} | &rft.pub={{urlencode:{{{wydawca}}}}} }}<!-- Publisher name. "Harper and Row"
-->{{#if: {{{miejsce|}}} | &rft.place={{urlencode:{{{miejsce}}}}} }}<!-- Place of publication. "New York"
-->{{#if: {{{strony|}}} | &rft.pages={{urlencode:{{{strony}}}}} }}<!-- Start and end pages for parts of a book, e.g. "124-147" ... This data element includes the OpenURL 0.1 definition of "pages".
-->{{#if: {{{seria|}}} | &rft.series={{urlencode:{{{seria}}}}} }}<!-- The title of a series in which the book or document was issued. There may also be an ISSN associated with the series.
-->{{#if: {{{isbn|}}} | &rft.isbn={{{isbn}}} }}<!-- International Standard Book Number (ISBN) ... i.e. "057117678X" but it may contain hyphens, e.g. "1-878067-73-7"
-->{{#if: {{{oclc|}}} | &rft_id=info:oclcnum/{{{oclc}}} }}<!--
-->{{#if: {{{doi|}}} | &rft_id=info:doi/{{urlencode:{{{doi}}}}} }}<!--
-->{{#if: {{{url|}}} | &rft_id={{urlencode:{{{url}}}}} }}<!--
-->"></span>{{#ifeq:{{{język|}}}||| {{lang|{{{język}}}|{{{język2|}}}|{{{język3|}}}|{{{język4|}}}|{{{język5|}}}|{{{język6|}}}|{{{język7|}}}|{{{język8|}}}|{{{język9|}}}|{{{język10|}}}}}}}</span></includeonly>
<noinclude>
*Szablon został skopiowany ze strony [https://pl.wikipedia.org/wiki/Szablon:Cytuj_książkę Szablon:Cytuj_książkę] Encyklopedii: Wikipedia.pl.
[[Kategoria:Szablony techniczne]]
</noinclude>
dfcb982c8696c1211d1b73eabcb002bdc0e1b93a
6
2014-01-14T12:12:04Z
Ffkapa
2
Szablon utworzony na podstawie szablonu: Cytuj_książkę z Wikipedii.pl dnia 14.01.2014
wikitext
text/x-wiki
<includeonly><span class="citation" {{#if:{{{odn|}}} | id="{{#if: {{{nazwisko r|}}}
| {{odn/id|{{{nazwisko r|}}}|{{{nazwisko2 r|}}}|{{{nazwisko3 r|}}}|{{{nazwisko4 r|}}}|{{#if:{{{rok|{{{data|}}}}}}|{{#time:Y|{{{rok|{{{data|}}}}}} }} }}|odn={{{odn|}}}}}
| {{odn/id|{{{nazwisko|}}}|{{{nazwisko2|}}}|{{{nazwisko3|}}}|{{{nazwisko4|}}}|{{#if:{{{rok|{{{data|}}}}}}|{{#time:Y|{{{rok|{{{data|}}}}}} }} }}|odn={{{odn|}}}}} }}" }}>{{
#if: {{{autor r|}}}{{{nazwisko r|}}}
| {{
#if: {{{autor r link|}}}
| [[{{{autor r link}}}|{{
#if: {{{nazwisko r|}}}
| {{#if: {{{imię r|}}} |{{{imię r}}} }}{{{nazwisko r}}}
| {{{autor r}}}
}}]]
| {{
#if: {{{nazwisko r|}}}
| {{#if: {{{imię r|}}} |{{{imię r}}} }}{{{nazwisko r}}}
| {{{autor r}}}
}}
}}{{
#if: {{{nazwisko2 r|}}}{{{autor2 r|}}}
|, {{#if: {{{autor r2 link|}}}
|[[{{{autor r2 link}}}|{{#if:{{{nazwisko2 r|}}}
|{{#if: {{{imię2 r|}}} |{{{imię2 r}}} }}{{{nazwisko2 r}}}
|{{{autor2 r}}}
}}]]
|{{#if:{{{nazwisko2 r|}}}
|{{#if: {{{imię2 r|}}} |{{{imię2 r}}} }}{{{nazwisko2 r}}}
|{{{autor2 r}}}
}}
}}
|}}{{
#if: {{{nazwisko3 r|}}}{{{autor3 r|}}}
|, {{#if: {{{autor r3 link|}}}
|[[{{{autor r3 link}}}|{{#if:{{{nazwisko3 r|}}}
|{{#if: {{{imię3 r|}}} |{{{imię3 r}}} }}{{{nazwisko3 r}}}
|{{{autor3 r}}}
}}]]
|{{#if:{{{nazwisko3 r|}}}
|{{#if: {{{imię3 r|}}} |{{{imię3 r}}} }}{{{nazwisko3 r}}}
|{{{autor3 r}}}
}}
}}
|}}: 
}}{{
#if: {{{rozdział|}}}
| {{
#if: {{{adres rozdziału|}}}
| [{{{adres rozdziału}}} {{{rozdział}}}]
| {{{rozdział}}}
}}. W: }}{{
#if: {{{autor|}}}{{{nazwisko|}}}
| {{
#if: {{{autor link|}}}
| [[{{{autor link}}}|{{
#if: {{{nazwisko|}}}
| {{#if: {{{imię|}}} |{{{imię}}} }}{{{nazwisko}}}
| {{{autor}}}
}}]]
| {{
#if: {{{nazwisko|}}}
| {{#if: {{{imię|}}} |{{{imię}}} }}{{{nazwisko}}}
| {{{autor}}}
}}
}}{{
#if: {{{nazwisko2|}}}{{{autor2|}}}
|, {{#if: {{{autor link2|}}}
|[[{{{autor link2}}}|{{#if:{{{nazwisko2|}}}
|{{#if: {{{imię2|}}} |{{{imię2}}} }}{{{nazwisko2}}}
|{{{autor2}}}
}}]]
|{{#if:{{{nazwisko2|}}}
|{{#if: {{{imię2|}}} |{{{imię2}}} }}{{{nazwisko2}}}
|{{{autor2}}}
}}
}}
|}}{{
#if: {{{nazwisko3|}}}{{{autor3|}}}
|, {{#if: {{{autor link3|}}}
|[[{{{autor link3}}}|{{#if:{{{nazwisko3|}}}
|{{#if: {{{imię3|}}} |{{{imię3}}} }}{{{nazwisko3}}}
|{{{autor3}}}
}}]]
|{{#if:{{{nazwisko3|}}}
|{{#if: {{{imię3|}}} |{{{imię3}}} }}{{{nazwisko3}}}
|{{{autor3}}}
}}
}}
|}}{{
#if: {{{nazwisko4|}}}{{{autor4|}}}
|, {{#if:{{{autor link4|}}}
|[[{{{autor link4}}}|{{#if:{{{nazwisko4|}}}
|{{#if: {{{imię4|}}} |{{{imię4}}} }}{{{nazwisko4}}}
|{{{autor4}}}
}}]]
|{{#if:{{{nazwisko4|}}}
|{{#if: {{{imię4|}}} |{{{imię4}}} }}{{{nazwisko4}}}
|{{{autor4}}}
}}
}}
|}}{{
#if: {{{nazwisko5|}}}{{{autor5|}}}
|, {{#if: {{{autor link5|}}}
|[[{{{autor link5}}}|{{#if:{{{nazwisko5|}}}
|{{#if: {{{imię5|}}} |{{{imię5}}} }}{{{nazwisko5}}}
|{{{autor5}}}
}}]]
|{{#if:{{{nazwisko5|}}}
|{{#if: {{{imię5|}}}|{{{imię5}}} }}{{{nazwisko5}}}
|{{{autor5}}}
}}
}}
|}}{{
#if: {{{nazwisko6|}}}{{{autor6|}}}
|, {{#if: {{{autor link6|}}}
|[[{{{autor link6}}}|{{#if:{{{nazwisko6|}}}
|{{#if: {{{imię6|}}} |{{{imię6}}} }}{{{nazwisko6}}}
|{{{autor6}}}
}}]]
|{{#if:{{{nazwisko6|}}}
|{{#if: {{{imię6|}}}|{{{imię6}}} }}{{{nazwisko6}}}
|{{{autor6}}}
}}
}}
|}}{{
#if: {{{nazwisko7|}}}{{{autor7|}}}
|, {{#if: {{{autor link7|}}}
|[[{{{autor link7|}}}|{{#if:{{{nazwisko7|}}}
|{{#if: {{{imię7|}}} |{{{imię7|}}} }}{{{nazwisko7|}}}
|{{{autor7|}}}
}}]]
|{{#if:{{{nazwisko7|}}}
|{{#if: {{{imię7|}}}|{{{imię7|}}} }}{{{nazwisko7|}}}
|{{{autor7|}}}
}}
}}
|}}{{
#if: {{{nazwisko8|}}}{{{autor8|}}}
|, {{#if: {{{autor link8|}}}
|[[{{{autor link8|}}}|{{#if:{{{nazwisko8|}}}
|{{#if: {{{imię8|}}} |{{{imię8|}}} }}{{{nazwisko8|}}}
|{{{autor8|}}}
}}]]
|{{#if:{{{nazwisko8|}}}
|{{#if: {{{imię8|}}}|{{{imię8|}}} }}{{{nazwisko8|}}}
|{{{autor8|}}}
}}
}}
|}}{{
#if: {{{nazwisko9|}}}{{{autor9|}}}
|, {{#if: {{{autor link9|}}}
|[[{{{autor link9|}}}|{{#if:{{{nazwisko9|}}}
|{{#if: {{{imię9|}}} |{{{imię9|}}} }}{{{nazwisko9|}}}
|{{{autor9|}}}
}}]]
|{{#if:{{{nazwisko9|}}}
|{{#if: {{{imię9|}}}|{{{imię9|}}} }}{{{nazwisko9|}}}
|{{{autor9|}}}
}}
}}
|}}{{
#if: {{{nazwisko10|}}}{{{autor10|}}}
|, {{#if: {{{autor link10|}}}
|[[{{{autor link10|}}}|{{#if:{{{nazwisko10|}}}
|{{#if: {{{imię10|}}} |{{{imię10|}}} }}{{{nazwisko10|}}}
|{{{autor10|}}}
}}]]
|{{#if:{{{nazwisko10|}}}
|{{#if: {{{imię10|}}}|{{{imię10|}}} }}{{{nazwisko10|}}}
|{{{autor10|}}}
}}
}}
|}}{{
#if: {{{nazwisko11|}}}{{{autor11|}}}
|, {{#if: {{{autor link11|}}}
|[[{{{autor link11|}}}|{{#if:{{{nazwisko11|}}}
|{{#if: {{{imię11|}}} |{{{imię11|}}} }}{{{nazwisko11|}}}
|{{{autor11|}}}
}}]]
|{{#if:{{{nazwisko11|}}}
|{{#if: {{{imię11|}}}|{{{imię11|}}} }}{{{nazwisko11|}}}
|{{{autor11|}}}
}}
}}
|}}{{
#if: {{{nazwisko12|}}}{{{autor12|}}}
|, {{#if: {{{autor link12|}}}
|[[{{{autor link12|}}}|{{#if:{{{nazwisko12|}}}
|{{#if: {{{imię12|}}} |{{{imię12|}}} }}{{{nazwisko12|}}}
|{{{autor12|}}}
}}]]
|{{#if:{{{nazwisko12|}}}
|{{#if: {{{imię12|}}}|{{{imię12|}}} }}{{{nazwisko12|}}}
|{{{autor12|}}}
}}
}}
|}}{{
#if: {{{nazwisko13|}}}{{{autor13|}}}
|, {{#if: {{{autor link13|}}}
|[[{{{autor link13|}}}|{{#if:{{{nazwisko13|}}}
|{{#if: {{{imię13|}}} |{{{imię13|}}} }}{{{nazwisko13|}}}
|{{{autor13|}}}
}}]]
|{{#if:{{{nazwisko13|}}}
|{{#if: {{{imię13|}}}|{{{imię13|}}} }}{{{nazwisko13|}}}
|{{{autor13|}}}
}}
}}
|}}{{
#if: {{{nazwisko14|}}}{{{autor14|}}}
|, {{#if: {{{autor link14|}}}
|[[{{{autor link14|}}}|{{#if:{{{nazwisko14|}}}
|{{#if: {{{imię14|}}} |{{{imię14|}}} }}{{{nazwisko14|}}}
|{{{autor14|}}}
}}]]
|{{#if:{{{nazwisko14|}}}
|{{#if: {{{imię14|}}}|{{{imię14|}}} }}{{{nazwisko14|}}}
|{{{autor14|}}}
}}
}}
|}}{{
#if: {{{nazwisko15|}}}{{{autor15|}}}
|, {{#if: {{{autor link15|}}}
|[[{{{autor link15|}}}|{{#if:{{{nazwisko15|}}}
|{{#if: {{{imię15|}}} |{{{imię15|}}} }}{{{nazwisko15|}}}
|{{{autor15|}}}
}}]]
|{{#if:{{{nazwisko15|}}}
|{{#if: {{{imię15|}}}|{{{imię15|}}} }}{{{nazwisko15|}}}
|{{{autor15|}}}
}}
}}
|}}: 
}}''{{#if: {{{url|}}}|[{{{url}}} {{{tytuł}}}]|{{{tytuł}}}}}''{{
#if: {{{inni|}}} |. {{{inni}}}
}}{{
#if: {{{wydanie|}}} |. Wyd. {{{wydanie}}}
}}{{
#if: {{{tom|}}}{{{tytuł tomu|}}} |. T. {{#if:{{{tom|}}}|{{{tom}}}{{#if: {{{tytuł tomu|}}}|: {{{tytuł tomu}}}|}}|{{{tytuł tomu}}}}}
}}{{
#if: {{{część|}}} |. Cz. {{{część}}}{{#if: {{{tytuł części|}}}|: {{{tytuł części}}}|}}
}}{{
#if: {{{wydawca|}}} |. {{#if: {{{miejsce|}}}|{{{miejsce|}}}: |}}{{{wydawca}}}|{{#if: {{{miejsce|}}}|. {{{miejsce|}}}}}
}}{{
#if: {{{data|}}}
| {{#if: {{{wydawca|}}}|, |{{#if: {{{miejsce|}}}|: |. }}}}{{{data}}}
| {{
#if: {{{rok|}}}
| {{
#if: {{{miesiąc|}}}
| {{#if: {{{wydawca|}}}|, |{{#if: {{{miejsce|}}}|: |. }} }}{{{miesiąc}}} {{{rok}}}
| {{#if: {{{wydawca|}}}|, |{{#if: {{{miejsce|}}}|: |. }} }}{{{rok}}}
}}
}}
}}{{
#if: {{{strony|}}} |{{#if: {{{wydawca|}}}{{{data|}}}{{{rok|}}}|,|.}} s. {{{strony}}}
}}{{
#if: {{{kolumny|}}} |{{#if: {{{wydawca|}}}{{{data|}}}{{{rok|}}}{{{strony|}}}|,|.}} kol. {{{kolumny}}}
}}{{
#if: {{{seria|}}} |{{#if: {{{wydawca|}}}{{{data|}}}{{{rok|}}}{{{strony|}}}{{{kolumny|}}}|, s|. S}}eria: {{{seria}}}
}}{{
#if: {{{doi|}}} | . DOI:[http://dx.doi.org/{{{doi|}}} {{{doietykieta|{{{doi}}}}}}]
}}{{
#if: {{{id|}}} | . {{{id}}}
}}{{
#if: {{{isbn|}}} | . ISBN {{{isbn}}}
}}{{
#if: {{{issn|}}} | . [[International Standard Serial Number|ISSN]] [http://worldcat.org/issn/{{{issn}}} {{{issn}}}]
}}{{
#if: {{{oclc|}}} | . [[Online Computer Library Center|OCLC]] [http://worldcat.org/oclc/{{urlencode:{{{oclc}}}}} {{{oclc}}}]
}}<!-- Gdy mamy URL, korzystamy z daty dostępu -->{{
#if: {{{url|}}} | {{#if: {{{data dostępu|}}} | . [dostęp {{{data dostępu}}}] }}
}}{{ #if: {{{cytat|}}} | . Cytat: {{{cytat}}}}}.<!--
This is a COinS tag (http://ocoins.info), which allows automated tools to parse the citation information:
--><span class="Z3988" title="ctx_ver=Z39.88-2004<!--
-->&rft_val_fmt={{urlencode:info:ofi/fmt:kev:mtx:book}}<!-- Field descriptions: http://www.openurl.info/registry/docs/mtx/info:ofi/fmt:kev:mtx:book
-->&rft.genre=book<!-- book: a publication that is complete in one part or a designated finite number of parts, often identified with an ISBN. (genre could also be bookitem, conference, proceeding, report, document, or unknown)
-->&rft.btitle={{urlencode:{{{tytuł}}}}}<!-- The title of the book. This can also be expressed as title, for compatibility with version 0.1. "moby dick or the white whale"
-->{{#if: {{{rozdział|}}} | &rft.atitle={{urlencode:{{{rozdział}}}}} }}<!-- Chapter title. Chapter title is included if it is a distinct title, e.g. "The Push Westward."
-->{{#if: {{{nazwisko r|{{{nazwisko|}}}}}} | &rft.aulast={{urlencode:{{{nazwisko r|{{{nazwisko}}}}}}}} }}<!-- First author's family name. This may be more than one word ... e.g. Smith, Fred James is recorded as "aulast=smith"
-->{{#if: {{{imię r|{{{imię|}}}}}} | &rft.aufirst={{urlencode:{{{imię r|{{{imię}}}}}}}} }}<!-- First author's given name or names or initials. This data element may contain multiple words and punctuation, e.g. "Fred F", "Fred James"
-->{{#if: {{{autor r|{{{autor|}}}}}} | &rft.au={{urlencode:{{{autor r|{{{autor}}}}}}}} }}<!-- This data element contains the full name of a single author, e.g. "Smith, Fred M", "Harry S. Truman".
-->{{#if: {{{data|}}} | &rft.date={{urlencode:{{{data}}}}}<!--
-->{{#if: {{{rok|}}} | &rft.date={{urlencode:{{{rok}}}}} }} }}<!-- Date of publication. Book dates are assumed to be a single year. (or ISO 8601)
-->{{#if: {{{wydanie|}}} | &rft.edition={{urlencode:{{{wydanie}}}}} }}<!-- Statement of the edition of the book. This will usually be a phrase, with or without numbers, but may be a single number, e.g. "First edition", "4th ed."
-->{{#if: {{{wydawca|}}} | &rft.pub={{urlencode:{{{wydawca}}}}} }}<!-- Publisher name. "Harper and Row"
-->{{#if: {{{miejsce|}}} | &rft.place={{urlencode:{{{miejsce}}}}} }}<!-- Place of publication. "New York"
-->{{#if: {{{strony|}}} | &rft.pages={{urlencode:{{{strony}}}}} }}<!-- Start and end pages for parts of a book, e.g. "124-147" ... This data element includes the OpenURL 0.1 definition of "pages".
-->{{#if: {{{seria|}}} | &rft.series={{urlencode:{{{seria}}}}} }}<!-- The title of a series in which the book or document was issued. There may also be an ISSN associated with the series.
-->{{#if: {{{isbn|}}} | &rft.isbn={{{isbn}}} }}<!-- International Standard Book Number (ISBN) ... i.e. "057117678X" but it may contain hyphens, e.g. "1-878067-73-7"
-->{{#if: {{{oclc|}}} | &rft_id=info:oclcnum/{{{oclc}}} }}<!--
-->{{#if: {{{doi|}}} | &rft_id=info:doi/{{urlencode:{{{doi}}}}} }}<!--
-->{{#if: {{{url|}}} | &rft_id={{urlencode:{{{url}}}}} }}<!--
-->"></span>{{#ifeq:{{{język|}}}||| {{lang|{{{język}}}|{{{język2|}}}|{{{język3|}}}|{{{język4|}}}|{{{język5|}}}|{{{język6|}}}|{{{język7|}}}|{{{język8|}}}|{{{język9|}}}|{{{język10|}}}}}}}</span></includeonly>
290ff61cef3a147745b2922f1b56c043f5203e09
Szablon:Cytuj stronę
10
178
511
2014-02-16T08:48:54Z
Ffkapa
2
Utworzono nową stronę "<includeonly><span class="citation" {{#if:{{{odn|}}} | id="{{odn/id|{{{nazwisko|}}}|{{{nazwisko2|}}}|{{{nazwisko3|}}}|{{{nazwisko4|}}}|{{#if:{{{rok|{{{data|}}}}}}|{{#tim..."
wikitext
text/x-wiki
<includeonly><span class="citation" {{#if:{{{odn|}}} | id="{{odn/id|{{{nazwisko|}}}|{{{nazwisko2|}}}|{{{nazwisko3|}}}|{{{nazwisko4|}}}|{{#if:{{{rok|{{{data|}}}}}}|{{#time:Y|{{{rok|{{{data|}}}}}} }} }}|odn={{{odn|}}}}}" }}>{{#if: {{{url|}}}
|{{#if:{{{tytuł|}}}
|{{
#if: {{{autor|}}}{{{nazwisko|}}}
| {{
#if: {{{autor link|}}}
| [[{{{autor link}}}|{{
#if: {{{nazwisko|}}}
| {{#if: {{{imię|}}} |{{{imię}}} }}{{{nazwisko}}}
| {{{autor}}}
}}]]
| {{
#if: {{{nazwisko|}}}
| {{#if: {{{imię|}}} |{{{imię}}} }}{{{nazwisko}}}
| {{{autor}}}
}}
}}{{
#if: {{{nazwisko2|}}}{{{autor2|}}}
|, {{#if: {{{autor link2|}}}
|[[{{{autor link2}}}|{{#if:{{{nazwisko2|}}}
|{{#if: {{{imię2|}}} |{{{imię2}}} }}{{{nazwisko2}}}
|{{{autor2}}}
}}]]
|{{#if:{{{nazwisko2|}}}
|{{#if: {{{imię2|}}} |{{{imię2}}} }}{{{nazwisko2}}}
|{{{autor2}}}
}}
}}
|}}{{
#if: {{{nazwisko3|}}}{{{autor3|}}}
|, {{#if: {{{autor link3|}}}
|[[{{{autor link3}}}|{{#if:{{{nazwisko3|}}}
|{{#if: {{{imię3|}}} |{{{imię3}}} }}{{{nazwisko3}}}
|{{{autor3}}}
}}]]
|{{#if:{{{nazwisko3|}}}
|{{#if: {{{imię3|}}} |{{{imię3}}} }}{{{nazwisko3}}}
|{{{autor3}}}
}}
}}
|}}{{
#if: {{{nazwisko4|}}}{{{autor4|}}}
|, {{#if:{{{autor link4|}}}
|[[{{{autor link4}}}|{{#if:{{{nazwisko4|}}}
|{{#if: {{{imię4|}}} |{{{imię4}}} }}{{{nazwisko4}}}
|{{{autor4}}}
}}]]
|{{#if:{{{nazwisko4|}}}
|{{#if: {{{imię4|}}} |{{{imię4}}} }}{{{nazwisko4}}}
|{{{autor4}}}
}}
}}
|}}{{
#if: {{{nazwisko5|}}}{{{autor5|}}}
|, {{#if: {{{autor link5|}}}
|[[{{{autor link5}}}|{{#if:{{{nazwisko5|}}}
|{{#if: {{{imię5|}}} |{{{imię5}}} }}{{{nazwisko5}}}
|{{{autor5}}}
}}]]
|{{#if:{{{nazwisko5|}}}
|{{#if: {{{imię5|}}}|{{{imię5}}} }}{{{nazwisko5}}}
|{{{autor5}}}
}}
}}
|}}: 
}}[{{#if:{{{archiwum|}}}|{{{archiwum}}}|{{{url}}}}} {{{tytuł}}}]{{#ifeq:{{{język|}}}||| {{lang|{{{język}}}|{{{język2|}}}|{{{język3|}}}|{{{język4|}}}|{{{język5|}}}|{{{język6|}}}|{{{język7|}}}|{{{język8|}}}|{{{język9|}}}|{{{język10|}}}}}}}.{{#if:{{{praca|}}}
| W: ''{{{praca}}}'' [on-line].|}}{{#if:{{{zaprezentowany|}}}| {{{zaprezentowany}}},}}{{#if:{{{opublikowany|}}}
| {{{opublikowany}}}{{#if:{{{data|}}}{{{rok|}}}|,|.}}|}}{{#if:{{{data|}}}{{{rok|}}}
| {{#if:{{{data|}}}|{{{data}}}|{{{miesiąc|}}} {{{rok}}}}}{{#if:{{{oznaczenie|}}}|,|.}}
|}}{{#if:{{{oznaczenie|}}}
| {{{oznaczenie}}}|}}{{#if:{{{data dostępu|}}}
| [dostęp {{{data dostępu}}}].
}}{{#if:{{{archiwum|}}}
| [zarchiwizowane z [{{{url}}} adresu]{{#if:{{{zarchiwizowano|}}}| {{{zarchiwizowano}}}}}].
|}}{{#if:{{{strony|}}}
| s. {{{strony}}}.
|}}{{#if:{{{id|}}}| {{{id}}}.|}}{{#if: {{{cytat|}}}| Cytat: {{{cytat}}}|}}
|'''Błąd''' w składni szablonu {{[[Szablon:Cytuj stronę|Cytuj stronę]]}}. Brak podanego tytułu cytowanej strony (parametr <tt>tytuł={{!}}</tt>).{{#ifeq:{{NAMESPACE}}||[[Kategoria:Brak tytułu w szablonie cytuj stronę]]|}}
}}
|'''Błąd''' w składni szablonu {{[[Szablon:Cytuj stronę|Cytuj stronę]]}}. Brak podanego adresu cytowanej strony (parametr <tt>url={{!}}</tt>).{{#ifeq:{{NAMESPACE}}||[[Kategoria:Brak url w szablonie cytuj stronę]]|}}
}}</span></includeonly><noinclude>
{{Cytuj_Wiki_Szablon}}
</noinclude>
cd91803b9ce36a13fb1db90aa02aa5562c5e7927
Szablon:Dziennik Ustaw
10
146
378
377
2014-02-08T21:08:38Z
Ffkapa
2
wikitext
text/x-wiki
<includeonly>{{Szablon:Publikator|Dz. U.|DU|{{{rok|{{{1|}}}}}}|{{{numer|{{{pozycja|{{{2|}}}}}}}}}|{{{3|{{{pozycja|}}}}}}|{{{4|}}}}}
</includeonly><noinclude>{{Cytuj_Wiki_Szablon}}</noinclude>
1c597e9207464c45baa6a1a3d497e946ee7c0e9f
377
2014-02-08T21:02:06Z
Ffkapa
2
Utworzono nową stronę "<includeonly>{{Szablon:Publikator|Dz. U.|DU|{{{rok|{{{1|}}}}}}|{{{numer|{{{pozycja|{{{2|}}}}}}}}}|{{{3|{{{pozycja|}}}}}}|{{{4|}}}}}"
wikitext
text/x-wiki
<includeonly>{{Szablon:Publikator|Dz. U.|DU|{{{rok|{{{1|}}}}}}|{{{numer|{{{pozycja|{{{2|}}}}}}}}}|{{{3|{{{pozycja|}}}}}}|{{{4|}}}}}
8d6708cd537abe475135f909c5a83dfa607fe885
Szablon:Info Wiki Szablon
10
204
575
572
2014-03-12T15:53:43Z
Ffkapa
2
red
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''[[Szablon:{{PAGENAMEE}}]] powstał w oparciu o szablon [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/Szablon:{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title=Szablon:{{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Szablony powstałe na podstawie Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
bbd88792579f847e918418c5987b8a18e3ac8774
572
570
2014-03-12T15:44:13Z
Ffkapa
2
red
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Szablon [[Szablon:{{PAGENAMEE}}|{{PAGENAMEE}}]] powstał w oparciu o szablon [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/Szablon:{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title=Szablon:{{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Szablony powstałe na podstawie Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
836d0088deca08d0e1e2090922d45449c9f6f84a
570
569
2014-03-11T15:17:34Z
Ffkapa
2
red
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Szablon [[{{PAGENAMEE}}]] powstał w oparciu o szablon [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/Szablon:{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title=Szablon:{{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Szablony powstałe na podstawie Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
69d1ee736b27948e8cf0b033262674585fcc705b
569
566
2014-03-11T15:15:36Z
Ffkapa
2
red
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Szablon [[{{PAGENAMEE}}]] powstał w oparciu o szablon [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title={{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Szablony powstałe na podstawie Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
d06c836e2ef112bae69abab7e5a9ac4c26df256a
566
2014-03-11T15:05:36Z
Ffkapa
2
Nowy szablon
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Szablon [[{{PAGENAME}}]] powstał w oparciu o szablon [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title={{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Szablony powstałe na podstawie Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
5be617ae4faa11121b64a925e5d0c5868a77314c
Szablon:Info Wikipedia
10
12
568
83
2014-03-11T15:12:54Z
Ffkapa
2
red
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAMEE}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title={{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
5f07a20bb6ad6c22246b5f3148ce730b61f815f1
83
60
2014-01-16T00:10:16Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title={{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
9742b06c7b654fa1f602c6f491064e0b612739bd
60
59
2014-01-15T21:24:05Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title={{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAMEE}}]
236c9f70a4b2fb1e464152ef6b8cdf4b2986218b
59
58
2014-01-15T21:14:25Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAMEE}} Wikipedia], [https://pl.wikipedia.org/w/index.php?title={{PAGENAMEE}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
9f28e99331fada40a13cf8f6dda1e3db748eaf5e
58
57
2014-01-15T21:12:01Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAMEE}} Wikipedia:{{PAGENAMEE}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
989977e1851b627d994bf816b56cb6a02a2f1e76
57
56
2014-01-15T21:07:42Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{FULLPAGENAMEE}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
05cdbcbf7e128efb684e674c34912f1bc289adef
56
55
2014-01-15T21:04:40Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{NAMESPACE}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
2097d4261cd4290c03bfe03d73311fee3b05ac2c
55
54
2014-01-15T21:00:51Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
5671e675b995c6b1c27fc1efcf396ce163b9af63
54
53
2014-01-15T20:59:16Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki:{{FULLPAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
b1ce1026e851b63a4efeeded95f18293e8a7eec8
53
52
2014-01-15T20:55:05Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{FULLPAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
b61122611a581b5bf594475dd83cc9ad7b37a2bc
52
51
2014-01-15T20:49:24Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/Jan Jan Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
8affcb0e1855e3446497b63f9f4654d7920016b4
51
50
2014-01-15T20:48:35Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/Jan_Jan Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
f5cbe8fe02905b828ae6405499634f30c8bcbc5e
50
49
2014-01-15T20:47:54Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/Jan Jan Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
8affcb0e1855e3446497b63f9f4654d7920016b4
49
48
2014-01-15T20:38:10Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
0bba6296ec7f03ebb942b19b43f0a665e89322f0
48
47
2014-01-15T20:36:30Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia/{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
aa68e5a3fa84ca95e0de35486f5487a20ea89416
47
46
2014-01-15T16:44:16Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
0bba6296ec7f03ebb942b19b43f0a665e89322f0
46
45
2014-01-15T16:42:54Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:pl.Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
8683e17ce62a4135fb86e746621cbefc0d2ea4ed
45
44
2014-01-15T16:41:45Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia.pl:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
690aea092d94a5ccb4c7a6668766a55468909ae7
44
43
2014-01-15T16:40:35Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
0bba6296ec7f03ebb942b19b43f0a665e89322f0
43
42
2014-01-15T16:39:21Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
45256c410a7d231e20af0335a9aaf6407fbcfde4
42
41
2014-01-15T16:38:18Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[w:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
053636c547051d595a1e7d9d780c91b880eb3aa8
41
40
2014-01-15T16:36:22Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:pl|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
3dff3efd1aafdd61d484d17b94442bb11933226b
40
39
2014-01-15T16:35:43Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:pl:Wikipedia|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
4c520ba8e9bcebbdb6fc68bef55102c2808dc067
39
38
2014-01-15T16:32:55Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[pl:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
ba8b84d7416cee4e99874aa9f89e6962689c4a3f
38
37
2014-01-15T16:32:18Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:pl:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
9b4d2452e003950c63e4a2a9dd6b9841e1560926
37
36
2014-01-15T16:31:41Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia:{{PAGENAME}}|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
0bba6296ec7f03ebb942b19b43f0a665e89322f0
36
35
2014-01-15T16:30:46Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[:Wikipedia|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
53c6769376f2ae4d2ea513741c9224bdf296a205
35
34
2014-01-15T16:17:41Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[Wikipedia/{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
e6cf74a4edccdcf687c32498f4e4e2205a7668ed
34
33
2014-01-15T16:16:28Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[Wikipedia|{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
ade42ebbf63c37db0b9ede153cf4dbd4c01b8d8a
33
32
2014-01-15T16:14:47Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[w:{{PAGENAME}}]], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
f2abcd9aeed1a0e04dc9a5eb3c99243773f6b89d
32
31
2014-01-15T16:01:39Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
<center><small>© Źródło: [[pl:Wikipedia]]:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
009452aed3d7ed6b8d169cfc839271fe624d14fd
31
30
2014-01-15T15:43:27Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
[https://pl.wikipedia.org/wiki/{{PAGENAME}}]
411d4d4f7b2b554d07af0e8180250b745a5308cc
30
27
2014-01-15T15:29:49Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
{{PAGENAME}}
08060e59e56927b10f48c6ac6040a54bb71d38a7
27
26
2014-01-15T15:18:30Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </small></center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
d663b6686a168a19e683500f78f4ed7fecf3f0c9
26
25
2014-01-15T15:17:26Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
<center><small>© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed] </center></small>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
a9232dc95207806da44d197a68f684d1fbae4a0c
25
24
2014-01-15T15:15:44Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], [http://creativecommons.org/licenses/by-sa/3.0/ licencja: CC-BY-SA 3.0 Deed]
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
9bf684ea5ae0ec725e9e9b6cc192f270ae5c0ed8
24
23
2014-01-15T15:14:09Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
© Źródło: [https://pl.wikipedia.org/wiki/{{PAGENAME}} Wikipedia:{{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], licencja: [http://creativecommons.org/licenses/by-sa/3.0/ CC-BY-SA 3.0 Deed]
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
c8abd50cb0c8aa7be80ddccff7daf22ff0ebda8a
23
22
2014-01-15T15:11:54Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
© Źródło: [https://pl.wikipedia.org/{{PAGENAME}} {{PAGENAME}}], [https://pl.wikipedia.org/w/index.php?title={{PAGENAME}}&action=history Autorzy], licencja: [http://creativecommons.org/licenses/by-sa/3.0/ CC-BY-SA 3.0 Deed]
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
1bce10576501d2219343ee3528f79b7e560d30fc
22
21
2014-01-15T15:06:43Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
© Źródło: [https://pl.wikipedia.org/{{PAGENAME}} {{PAGENAME}}], [https://pl.wikipedia.org/wiki/index.php?title={{PAGENAME}}&action=history Autorzy], licencja: [http://creativecommons.org/licenses/by-sa/3.0/ CC-BY-SA 3.0 Deed]
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
991fe9aa4440f7b38fdcc933661963f4ec8a3e94
21
20
2014-01-15T15:05:54Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
© Źródło: [https://pl.wikipedia.org//{{PAGENAME}} {{PAGENAME}}], [https://pl.wikipedia.org/wiki/index.php?title={{PAGENAME}}&action=history Autorzy], licencja: [http://creativecommons.org/licenses/by-sa/3.0/ CC-BY-SA 3.0 Deed]
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
2af7902a1223c753c335c64240e832b669543330
20
19
2014-01-15T13:54:11Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
© Źródło: [[pl:Wikipedia/{{PAGENAME}}]], [https://pl.wikipedia.org/{{PAGENAME}}=history Autorzy], licencja: [CC-BY-SA 3.0 Deed] (link do: http://creativecommons.org/licenses/by-sa/3.0/)
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
d5bbc591cac0691f86a25926a058524190215d40
19
16
2014-01-15T13:37:32Z
Ffkapa
2
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
© Źródło: [https://pl.wikipedia.org/{{PAGENAME}} {{PAGENAME}}], [https://pl.wikipedia.org/{{PAGENAME}}=history Autorzy], licencja: [CC-BY-SA 3.0 Deed] (link do: http://creativecommons.org/licenses/by-sa/3.0/)
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
534bd5118c508c70dcd3192125abfac9b9d52a76
16
2014-01-15T01:12:45Z
Ffkapa
2
szablon
wikitext
text/x-wiki
{{tmbox
| grafika = [[File:Quill (PSF).svg |none|100px]]
| tekst = <center>'''Artykuł [[{{PAGENAME}}]] powstał w oparciu o informacje ze stron [https://pl.wikipedia.org/ Polskiej Wikipedii] </center>
}}
<includeonly>{{#ifeq:{{NAMESPACE}}|Dyskusja|[[Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl]]}}</includeonly>
<noinclude>
*Szablon wstawiany do dyskusji haseł powstałych na podstawie zasobów Wikipedii.pl.
[[Kategoria:Szablony informacyjne]]
</noinclude>
4bf86638a0d12331382558b8152129db36b9f6cc
Szablon:Internetowy System Aktów Prawnych
10
149
381
2014-02-08T21:23:24Z
Ffkapa
2
Szablon
wikitext
text/x-wiki
<includeonly>{{#iferror:{{{5|}}}|{{{5}}}|<span class="plainlinks">[http://isap.sejm.gov.pl/DetailsServlet?id=W{{{1}}}{{padleft:{{{2|}}}|4}}{{padleft:{{{3|}}}|3}}{{padleft:{{{4|}}}|4}} {{{5|}}}]</span>}}</includeonly><noinclude>
{{Cytuj_Wiki_Szablon}}
[[Kategoria:Szablony dzienników urzędowych]]
</noinclude>
9eaa9ebb51c700b0807d29b2785d15d22dc1fec3
Szablon:Lang
10
197
553
2014-03-11T00:49:54Z
Ffkapa
2
nowy szablon
wikitext
text/x-wiki
<includeonly>{{#invoke:lang|język}}</includeonly><noinclude>{{Cytuj_Wiki_Szablon}}</noinclude>
2c9ab72de59f2819df19c90749d1f5fe2d4ab3c2
Szablon:Namespace detect showall
10
46
394
393
2014-02-10T17:01:22Z
Ffkapa
2
wikitext
text/x-wiki
{{#switch: <!-- Use the parameter -->
{{#switch: <!-- Find out which parameter to use -->
{{lc: <!--Lower case the result-->
<!--If no or empty "demospace" parameter then detect namespace-->
{{#if:{{{demospace|}}}
| {{{demospace}}}
| {{#if:{{{page|}}}
| <!--Detect the namespace in the "page" parameter-->
{{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }}
| talk
| {{SUBJECTSPACE:{{{page}}} }}
}}
| <!--No "demospace" or "page" parameters, so detect actual namespace-->
{{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
| talk
| {{SUBJECTSPACE}}
}}
}}
}}
}}
<!-- Only one of the lines below will be executed -->
<!-- Respecting empty parameters on purpose -->
| showall = showall <!-- "demospace=showall" -->
| main <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""-->
| = {{{main| {{{other|}}} }}}
| talk = {{{talk| {{{other|}}} }}}
| user = {{{user| {{{other|}}} }}}
| wikipedia = {{{wikipedia| {{{other|}}} }}}
| file
| image = {{{file| {{{image| {{{other|}}} }}} }}}
| mediawiki = {{{mediawiki| {{{other|}}} }}}
| template = {{{template| {{{other|}}} }}}
| help = {{{help| {{{other|}}} }}}
| category = {{{category| {{{other|}}} }}}
| portal = {{{portal| {{{other|}}} }}}
| book = {{{book| {{{other|}}} }}}
| other
| #default = {{{other|}}} <!--"demospace=other" or a new namespace-->
}}
| 1 = {{{1|}}}
| 2 = {{{2|}}}
| 3 = {{{3|}}}
| 4 = {{{4|}}}
| 5 = {{{5|}}}
| 6 = {{{6|}}}
| showall = {{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}
}}<noinclude>
{{Cytuj_Wiki_Szablon}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
4fb3e31adb8bc01b59f8725e922917089e218fec
393
126
2014-02-10T17:01:06Z
Ffkapa
2
wikitext
text/x-wiki
{{#switch: <!-- Use the parameter -->
{{#switch: <!-- Find out which parameter to use -->
{{lc: <!--Lower case the result-->
<!--If no or empty "demospace" parameter then detect namespace-->
{{#if:{{{demospace|}}}
| {{{demospace}}}
| {{#if:{{{page|}}}
| <!--Detect the namespace in the "page" parameter-->
{{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }}
| talk
| {{SUBJECTSPACE:{{{page}}} }}
}}
| <!--No "demospace" or "page" parameters, so detect actual namespace-->
{{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
| talk
| {{SUBJECTSPACE}}
}}
}}
}}
}}
<!-- Only one of the lines below will be executed -->
<!-- Respecting empty parameters on purpose -->
| showall = showall <!-- "demospace=showall" -->
| main <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""-->
| = {{{main| {{{other|}}} }}}
| talk = {{{talk| {{{other|}}} }}}
| user = {{{user| {{{other|}}} }}}
| wikipedia = {{{wikipedia| {{{other|}}} }}}
| file
| image = {{{file| {{{image| {{{other|}}} }}} }}}
| mediawiki = {{{mediawiki| {{{other|}}} }}}
| template = {{{template| {{{other|}}} }}}
| help = {{{help| {{{other|}}} }}}
| category = {{{category| {{{other|}}} }}}
| portal = {{{portal| {{{other|}}} }}}
| book = {{{book| {{{other|}}} }}}
| other
| #default = {{{other|}}} <!--"demospace=other" or a new namespace-->
}}
| 1 = {{{1|}}}
| 2 = {{{2|}}}
| 3 = {{{3|}}}
| 4 = {{{4|}}}
| 5 = {{{5|}}}
| 6 = {{{6|}}}
| showall = {{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}
}}<noinclude>
{{Cytuj_Wiki_Szablon}}
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
91c236cf03b4c19c0e4db698415cc9cb15874e25
126
125
2014-01-16T15:33:54Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
{{#switch: <!-- Use the parameter -->
{{#switch: <!-- Find out which parameter to use -->
{{lc: <!--Lower case the result-->
<!--If no or empty "demospace" parameter then detect namespace-->
{{#if:{{{demospace|}}}
| {{{demospace}}}
| {{#if:{{{page|}}}
| <!--Detect the namespace in the "page" parameter-->
{{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }}
| talk
| {{SUBJECTSPACE:{{{page}}} }}
}}
| <!--No "demospace" or "page" parameters, so detect actual namespace-->
{{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
| talk
| {{SUBJECTSPACE}}
}}
}}
}}
}}
<!-- Only one of the lines below will be executed -->
<!-- Respecting empty parameters on purpose -->
| showall = showall <!-- "demospace=showall" -->
| main <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""-->
| = {{{main| {{{other|}}} }}}
| talk = {{{talk| {{{other|}}} }}}
| user = {{{user| {{{other|}}} }}}
| wikipedia = {{{wikipedia| {{{other|}}} }}}
| file
| image = {{{file| {{{image| {{{other|}}} }}} }}}
| mediawiki = {{{mediawiki| {{{other|}}} }}}
| template = {{{template| {{{other|}}} }}}
| help = {{{help| {{{other|}}} }}}
| category = {{{category| {{{other|}}} }}}
| portal = {{{portal| {{{other|}}} }}}
| book = {{{book| {{{other|}}} }}}
| other
| #default = {{{other|}}} <!--"demospace=other" or a new namespace-->
}}
| 1 = {{{1|}}}
| 2 = {{{2|}}}
| 3 = {{{3|}}}
| 4 = {{{4|}}}
| 5 = {{{5|}}}
| 6 = {{{6|}}}
| showall = {{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}
}}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
8315b090c96c2bd21906f0de15368c2d6077abe9
125
2010-10-04T18:40:06Z
WOSlinker
0
remove {{pp-template}} since included in {{documentation}}
wikitext
text/x-wiki
{{#switch: <!-- Use the parameter -->
{{#switch: <!-- Find out which parameter to use -->
{{lc: <!--Lower case the result-->
<!--If no or empty "demospace" parameter then detect namespace-->
{{#if:{{{demospace|}}}
| {{{demospace}}}
| {{#if:{{{page|}}}
| <!--Detect the namespace in the "page" parameter-->
{{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }}
| talk
| {{SUBJECTSPACE:{{{page}}} }}
}}
| <!--No "demospace" or "page" parameters, so detect actual namespace-->
{{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
| talk
| {{SUBJECTSPACE}}
}}
}}
}}
}}
<!-- Only one of the lines below will be executed -->
<!-- Respecting empty parameters on purpose -->
| showall = showall <!-- "demospace=showall" -->
| main <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""-->
| = {{{main| {{{other|}}} }}}
| talk = {{{talk| {{{other|}}} }}}
| user = {{{user| {{{other|}}} }}}
| wikipedia = {{{wikipedia| {{{other|}}} }}}
| file
| image = {{{file| {{{image| {{{other|}}} }}} }}}
| mediawiki = {{{mediawiki| {{{other|}}} }}}
| template = {{{template| {{{other|}}} }}}
| help = {{{help| {{{other|}}} }}}
| category = {{{category| {{{other|}}} }}}
| portal = {{{portal| {{{other|}}} }}}
| book = {{{book| {{{other|}}} }}}
| other
| #default = {{{other|}}} <!--"demospace=other" or a new namespace-->
}}
| 1 = {{{1|}}}
| 2 = {{{2|}}}
| 3 = {{{3|}}}
| 4 = {{{4|}}}
| 5 = {{{5|}}}
| 6 = {{{6|}}}
| showall = {{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}
}}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
8315b090c96c2bd21906f0de15368c2d6077abe9
Szablon:Navbox
10
152
388
2014-02-08T21:52:06Z
Ffkapa
2
Nowy szablon
wikitext
text/x-wiki
<includeonly><!--
Nie edytuj bez uprzedniej dyskusji - to jest BARDZO skomplikowany szablon!
-->{{#switch:{{{ramka|{{{1|}}}}}}|podgrupa=</div>|brak=|#default=<table class="navbox do-not-make-smaller" cellspacing="0" style="{{{styl|}}};{{{styl ogólny|}}}"><tr><td style="padding:2px;">}}<!--
--><table cellspacing="0" class="nowraplinks {{#if:{{{tytuł|}}}|{{#switch:{{{zwijanie|}}}|zwykłe|wyłączone=|#default=collapsible {{#if:{{{zwijanie|}}}|{{#ifeq:{{{zwijanie|}}}|zwinięte|collapsed|{{#ifeq:{{{zwijanie|}}}|auto|autocollapse|{{{zwijanie|}}}}}}}|autocollapse}}}}}} {{#switch:{{{ramka|{{{1|}}}}}}|podgrupa|brak=navbox-subgroup" style="width:100%;{{{styl ogólny|}}};{{{styl|}}}|#default=" style="width:100%;background:transparent;color:inherit}};{{{styl wewnętrzny|}}}"><!--
---Tytuł i belka nawigacyjna---
-->{{#if:{{{tytuł|}}}|<tr>{{#if:{{{opis tytułu|}}}|<!--
--><td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu grupy|}}}">{{{opis grupy|}}}</td><!--
--><th style="border-left:2px solid #fdfdfd;width:100%;|<th style="}}{{{styl bazowy|}}};{{{styl tytułu|}}}" <!--
-->colspan={{#expr:2{{#if:{{{grafika lewa|}}}|+1}}{{#if:{{{grafika|}}}|+1}}{{#if:{{{opis tytułu|}}}|-1}}}} <!--
-->class="navbox-title"><!--
-->{{#if:{{#switch:{{{belka|}}}|zwykła|brak=1}}<!--
-->{{#if:{{{nazwa|}}}||{{#switch:{{{ramka|{{{1|}}}}}}|podgrupa|brak=1}}}}|<!--
-->{{#ifeq:{{{belka|}}}|brak|{{#ifeq:{{{zwijanie|}}}|zwykłe|<div style="float:right;width:6em;"> </div>}}|<!--
-->{{#ifeq:{{{zwijanie|}}}|zwykłe||<div style="float:left; width:6em;text-align:left;"> </div>}}}}|<!--
--><div style="float:left; width:6em;text-align:left;"><!--
-->{{Tnavbar|{{{nazwa}}}|fontcolor=#002bb8|fontstyle={{{styl bazowy|}}};{{{styl tytułu|}}};border:none;|mini=1|space={{{przestrzeń|}}}}}<!--
--></div>{{#ifeq:{{{zwijanie|}}}|zwykłe|<div style="float:right;width:6em;"> </div>}}}}<!--
--><span class="noprint" style="font-size:{{#switch:{{{ramka|{{{1|}}}}}}|podgrupa|brak=100|#default=110}}%;"><!--
-->{{{tytuł|}}}</span></th></tr>}}<!--
---Góra---
-->{{#if:{{{góra|}}}|<!--
-->{{#if:{{{tytuł|}}}|<tr style="height:2px;"><td></td></tr>}}<!--
--><tr><td class="navbox-abovebelow" style="{{{styl bazowy|}}};{{{styl góry|}}}" <!--
-->colspan="{{#expr:2{{#if:{{{grafika lewa|}}}|+1}}{{#if:{{{grafika|}}}|+1}}}}">{{{góra|}}}</td></tr>}}<!--
---Właściwa część---
---Pierwszy opis/spis i grafiki---
-->{{#if:{{{spis1|}}}|{{#if:{{{tytuł|}}}{{{góra|}}}|<tr style="height:2px;"><td></td></tr>}}<tr><!--
-->{{#if:{{{grafika lewa|}}}|<!--
--><td style="width:0%;padding:0px 2px 0px 0px;{{{styl grafiki lewej|}}}" <!--
-->rowspan={{#expr:1{{#if:{{{spis2|}}}|+2}}{{#if:{{{spis3|}}}|+2}}{{#if:{{{spis4|}}}|+2}}<!--
-->{{#if:{{{spis5|}}}|+2}}{{#if:{{{spis6|}}}|+2}}{{#if:{{{spis7|}}}|+2}}<!--
-->{{#if:{{{spis8|}}}|+2}}{{#if:{{{spis9|}}}|+2}}{{#if:{{{spis10|}}}|+2}}<!--
-->{{#if:{{{spis11|}}}|+2}}{{#if:{{{spis12|}}}|+2}}{{#if:{{{spis13|}}}|+2}}<!--
-->{{#if:{{{spis14|}}}|+2}}{{#if:{{{spis15|}}}|+2}}{{#if:{{{spis16|}}}|+2}}<!--
-->{{#if:{{{spis17|}}}|+2}}{{#if:{{{spis18|}}}|+2}}{{#if:{{{spis19|}}}|+2}}<!--
-->{{#if:{{{spis20|}}}|+2}}{{#if:{{{spis21|}}}|+2}}}}><!--
-->{{{grafika lewa|}}}</td>}}<!--
-->{{#if:{{{opis1|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu1|}}}"><!--
-->{{{opis1|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl nieparzystych|}}};{{{styl spisu1|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|even|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|odd}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu1|{{{padding spisu|0em 0.25em}}}}}}">}}<!--
-->{{{spis1|}}}{{#if:{{{spis1|}}}|</div></td><!--
-->{{#if:{{{grafika|}}}|<!--
--><td style="width:0%;padding:0px 0px 0px 2px;{{{styl grafiki|}}}" <!--
-->rowspan={{#expr:1{{#if:{{{spis2|}}}|+2}}{{#if:{{{spis3|}}}|+2}}{{#if:{{{spis4|}}}|+2}}<!--
-->{{#if:{{{spis5|}}}|+2}}{{#if:{{{spis6|}}}|+2}}{{#if:{{{spis7|}}}|+2}}<!--
-->{{#if:{{{spis8|}}}|+2}}{{#if:{{{spis9|}}}|+2}}{{#if:{{{spis10|}}}|+2}}<!--
-->{{#if:{{{spis11|}}}|+2}}{{#if:{{{spis12|}}}|+2}}{{#if:{{{spis13|}}}|+2}}<!--
-->{{#if:{{{spis14|}}}|+2}}{{#if:{{{spis15|}}}|+2}}{{#if:{{{spis16|}}}|+2}}<!--
-->{{#if:{{{spis17|}}}|+2}}{{#if:{{{spis18|}}}|+2}}{{#if:{{{spis19|}}}|+2}}<!--
-->{{#if:{{{spis20|}}}|+2}}{{#if:{{{spis21|}}}|+2}}}}><!--
-->{{{grafika|}}}</td>}}<!--
--></tr>}}<!--
---Pozostałe opisy i spisy---
-->{{#if:{{{spis2|}}}|<!--
-->{{#if:{{{tytuł|}}}{{{góra|}}}{{{spis1|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!--
-->{{#if:{{{opis2|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu2|}}}"><!--
-->{{{opis2|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl parzystych|}}};{{{styl spisu2|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|odd|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|even}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis2|}}}<!--
-->{{#if:{{{spis2|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis3|}}}|<!--
-->{{#if:{{{tytuł|{{{title|}}}}}}{{{góra|{{{above|}}}}}}{{{spis1|}}}{{{spis2|}}}|<!--
--><tr style="height:2px"><td></td></tr>}}<tr><!--
-->{{#if:{{{opis3|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu3|}}}"><!--
-->{{{opis3|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl nieparzystych|}}};{{{styl spisu3|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|even|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|odd}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis3|}}}<!--
-->{{#if:{{{spis3|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis4|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis4|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu4|}}}"><!--
-->{{{opis4|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl parzystych|}}};{{{styl spisu4|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|odd|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|even}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis4|}}}<!--
-->{{#if:{{{spis4|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis5|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis5|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu5|}}}"><!--
-->{{{opis5|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl nieparzystych|}}};{{{styl spisu5|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|even|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|odd}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis5|}}}<!--
-->{{#if:{{{spis5|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis6|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis6|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu6|}}}"><!--
-->{{{opis6|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl parzystych|}}};{{{styl spisu6|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|odd|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|even}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis6|}}}<!--
-->{{#if:{{{spis6|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis7|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis7|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu7|}}}"><!--
-->{{{opis7|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl nieparzystych|}}};{{{styl spisu7|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|even|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|odd}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis7|}}}<!--
-->{{#if:{{{spis7|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis8|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis8|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu8|}}}"><!--
-->{{{opis8|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl parzystych|}}};{{{styl spisu8|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|odd|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|even}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis8|}}}<!--
-->{{#if:{{{spis8|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis9|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis9|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu9|}}}"><!--
-->{{{opis9|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl nieparzystych|}}};{{{styl spisu9|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|even|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|odd}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis9|}}}<!--
-->{{#if:{{{spis9|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis10|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis10|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu10|}}}"><!--
-->{{{opis10|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl parzystych|}}};{{{styl spisu10|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|odd|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|even}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis10|}}}<!--
-->{{#if:{{{spis10|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis11|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis11|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu11|}}}"><!--
-->{{{opis11|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl nieparzystych|}}};{{{styl spisu11|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|even|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|odd}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis11|}}}<!--
-->{{#if:{{{spis11|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis12|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis12|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu12|}}}"><!--
-->{{{opis12|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl parzystych|}}};{{{styl spisu12|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|odd|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|even}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis12|}}}<!--
-->{{#if:{{{spis12|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis13|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis13|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu13|}}}"><!--
-->{{{opis13|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl nieparzystych|}}};{{{styl spisu13|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|even|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|odd}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis13|}}}<!--
-->{{#if:{{{spis13|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis14|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis14|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu14|}}}"><!--
-->{{{opis14|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl parzystych|}}};{{{styl spisu14|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|odd|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|even}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis14|}}}<!--
-->{{#if:{{{spis14|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis15|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis15|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu15|}}}"><!--
-->{{{opis15|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl nieparzystych|}}};{{{styl spisu15|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|even|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|odd}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis15|}}}<!--
-->{{#if:{{{spis15|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis16|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis16|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu16|}}}"><!--
-->{{{opis16|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl parzystych|}}};{{{styl spisu16|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|odd|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|even}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis16|}}}<!--
-->{{#if:{{{spis16|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis17|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis17|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu17|}}}"><!--
-->{{{opis17|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl nieparzystych|}}};{{{styl spisu17|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|even|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|odd}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis17|}}}<!--
-->{{#if:{{{spis17|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis18|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis18|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu18|}}}"><!--
-->{{{opis18|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl parzystych|}}};{{{styl spisu18|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|odd|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|even}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis18|}}}<!--
-->{{#if:{{{spis18|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis19|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis19|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu19|}}}"><!--
-->{{{opis19|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl nieparzystych|}}};{{{styl spisu19|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|even|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|odd}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis19|}}}<!--
-->{{#if:{{{spis19|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis20|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis20|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu20|}}}"><!--
-->{{{opis20|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl parzystych|}}};{{{styl spisu20|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|odd|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|even}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis20|}}}<!--
-->{{#if:{{{spis20|}}}|</div></td></tr>}}<!--
-->{{#if:{{{spis21|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{opis21|}}}|<td class="navbox-group" style="{{{styl bazowy|}}};{{{styl opisu|}}};{{{styl opisu21|}}}"><!--
-->{{{opis21|}}}</td><td style="text-align:left;border-left:2px solid #fdfdfd;|<td colspan=2 style="}}<!--
-->width:100%;padding:0px;{{{styl spisu|}}};{{{styl nieparzystych|}}};{{{styl spisu21|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{parzystość|}}}|zamień|even|<!--
-->{{#ifeq:{{{parzystość|}}}|parzyste|even|<!--
-->{{#ifeq:{{{parzystość|}}}|nieparzyste|odd|{{{parzystość|odd}}}}}}}}}"><!--
--><div style="padding:{{{padding spisu|0em 0.25em}}}">}}{{{spis21|}}}<!--
-->{{#if:{{{spis21|}}}|</div></td></tr>}}<!--
---Dół---
-->{{#if:{{{dół|}}}|<!--
-->{{#if:{{{tytuł|}}}{{{góra|}}}{{{spis1|}}}{{{spis2|}}}{{{spis3|}}}<!--
-->|<tr style="height:2px;"><td></td></tr>}}<!--
--><tr><td class="navbox-abovebelow" style="{{{styl bazowy|}}};{{{styl dołu|}}}" <!--
-->colspan="{{#expr:2{{#if:{{{grafika lewa|}}}|+1}}{{#if:{{{grafika|}}}|+1}}}}"><!--
-->{{{dół|}}}</td></tr>}}<!--
--></table>{{#switch:{{{ramka|{{{1|}}}}}}|podgrupa=<div>|brak=|#default=</td></tr></table>}}<!--
-->{{#ifeq:{{NAMESPACE}}|Szablon|
{{#if:{{{ramka|{{{1|}}}}}}||
{{#ifeq:{{{kategoria|}}}|nie||[[Kategoria:Szablony nawigacyjne {{#if:{{{kategoria|}}}|- {{{kategoria}}}}}|{{PAGENAME}}]]}}{{#if:{{{kategoria2|}}}|[[Kategoria:Szablony nawigacyjne - {{{kategoria2}}}|{{PAGENAME}}]]}}{{#if:{{{kategoria3|}}}|[[Kategoria:Szablony nawigacyjne - {{{kategoria3}}}|{{PAGENAME}}]]}}{{#if:{{{kategoria4|}}}|[[Kategoria:Szablony nawigacyjne - {{{kategoria4}}}|{{PAGENAME}}]]}} }}}}<!--
--></includeonly><noinclude>{{Cytuj_Wiki_Szablon}}</noinclude>
9d442976aa14f10a3330a3c1f81df3936ada9475
Szablon:Plain link
10
43
120
119
2014-01-16T15:33:54Z
Ffkapa
2
1 wersja
wikitext
text/x-wiki
<span class="plainlinks">[{{{1|{{{URL|{{{url}}}}}}}}} {{{2|{{{NAME|{{{name|}}}}}}}}}]</span><noinclude>
{{documentation}}
</noinclude>
85ed52f392699b4283f3001375d0aa5174963ddf
119
2010-08-06T21:47:43Z
MSGJ
0
url not optional
wikitext
text/x-wiki
<span class="plainlinks">[{{{1|{{{URL|{{{url}}}}}}}}} {{{2|{{{NAME|{{{name|}}}}}}}}}]</span><noinclude>
{{documentation}}
</noinclude>
85ed52f392699b4283f3001375d0aa5174963ddf
Szablon:Przypisy
10
7
12
7
2014-01-15T00:24:23Z
Ffkapa
2
info o autorstwie
wikitext
text/x-wiki
<includeonly>{{#if: {{{stopień|}}}|{{{stopień}}}|==}} Przypisy {{#if: {{{stopień|}}}|{{{stopień}}}|==}}
<div class="do-not-make-smaller refsection references-column-count {{#switch:{{{1|1}}}
|1=references-1column
|2=references-2column
|3=references-3column}}">
{{#tag:references|{{{przypisy|}}}|group={{{grupa|}}}}}
</div></includeonly>
<noinclude>
*Szablon został skopiowany ze strony [https://pl.wikipedia.org/wiki/Szablon:Przypisy Szablon:Przypisy] Encyklopedii: Wikipedia.pl.
[[Kategoria:Szablony techniczne]]
</noinclude>
cb80af4939761b073e83d42067d3991a44efa1be
7
2014-01-14T12:21:15Z
Ffkapa
2
Szablon utworzony na podstawie szablonu: Przypisy z Wikipedii.pl dnia 14.01.2014
wikitext
text/x-wiki
<includeonly>{{#if: {{{stopień|}}}|{{{stopień}}}|==}} Przypisy {{#if: {{{stopień|}}}|{{{stopień}}}|==}}
<div class="do-not-make-smaller refsection references-column-count {{#switch:{{{1|1}}}
|1=references-1column
|2=references-2column
|3=references-3column}}">
{{#tag:references|{{{przypisy|}}}|group={{{grupa|}}}}}
</div></includeonly>
42cd673be99d83d41e42935ac33513fe84ceb612
Szablon:Przypisy-lista
10
177
510
509
2014-02-16T08:46:36Z
Ffkapa
2
wikitext
text/x-wiki
<includeonly><div class="do-not-make-smaller refsection refsection-{{{grupa|}}} references-column-count {{#switch:{{{l. kolumn|1}}}
|1=references-1column
|2=references-2column
|3=references-3column}}">
{{#tag:references|{{{1|}}}|group={{{grupa|}}}}}
</div></includeonly><noinclude>
{{Cytuj_Wiki_Szablon}}</noinclude>
b305540fcd3bc5d59bfea6b36b970f02e9d074e6
509
2014-02-16T08:45:20Z
Ffkapa
2
nowy szablon
wikitext
text/x-wiki
b
e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98
Szablon:Publikator
10
148
380
2014-02-08T21:17:19Z
Ffkapa
2
Nowy szablon
wikitext
text/x-wiki
<includeonly>{{#ifeq:{{{3|}}}|bez linku
|{{
#if:{{{nr|{{{6|}}}}}}|
{{Adres publikacyjny|{{{1}}}|{{{rok|{{{4|BR}}}}}}|{{{nr|{{{5|BN}}}}}}|{{{poz|{{{6|BP}}}}}}}}| {{Adres publikacyjny|{{{1}}}|{{{rok|{{{4|BR}}}}}}|{{{poz|{{{5|BP}}}}}}}}}}
|{{
#ifeq:{{{5|}}}|bez linku
|{{Adres publikacyjny|{{{1}}}|{{{rok|{{{3|BR}}}}}}|{{{poz|{{{4|BP}}}}}}}}|{{
#ifeq:{{{6|}}}|bez linku
|{{Adres publikacyjny|{{{1}}}|{{{rok|{{{3|BR}}}}}}|{{{nr|{{{4|BN}}}}}}|{{{poz|{{{5|BP}}}}}}}}|{{
#if:{{{nr|{{{5|}}}}}}
|{{Internetowy System Aktów Prawnych
|{{{2}}}|{{{rok|{{{3|BR}}}}}}|{{{nr|{{{4|BN}}}}}}|{{{poz|{{{5|BP}}}}}}|{{Adres publikacyjny
|{{{1}}}|{{{rok|{{{3|BR}}}}}}|{{{nr|{{{4|BN}}}}}}|{{{poz|{{{5|BP}}}}}}}}}}|{{
Internetowy System Aktów Prawnych
|{{{2}}}|{{{rok|{{{3|BP}}}}}}|0|{{{poz|{{{4|BR}}}}}}|{{Adres publikacyjny
|{{{1}}}|{{{rok|{{{3|BR}}}}}}|{{{poz|{{{4|BP}}}}}}}}}}}}}}}}}}</includeonly>
<noinclude>{{Cytuj_Wiki_Szablon}}</noinclude>
640f440664981f6492c2ebf8be536a0e179b1566
Szablon:R
10
8
11
10
2014-01-15T00:22:29Z
Ffkapa
2
wikitext
text/x-wiki
<includeonly><!--
-->{{#tag:ref||name={{{1}}}|group={{{grupa1|}}}}}{{#if:{{{rp1|}}}|{{rp|{{{rp1}}}}}}}{{#if:{{{2|}}}|<!--
-->{{#tag:ref||name={{{2}}}|group={{{grupa2|}}}}}{{#if:{{{rp2|}}}|{{rp|{{{rp2}}}}}}}{{#if:{{{3|}}}|<!--
-->{{#tag:ref||name={{{3}}}|group={{{grupa3|}}}}}{{#if:{{{rp3|}}}|{{rp|{{{rp3}}}}}}}{{#if:{{{4|}}}|<!--
-->{{#tag:ref||name={{{4}}}|group={{{grupa4|}}}}}{{#if:{{{rp4|}}}|{{rp|{{{rp4}}}}}}}{{#if:{{{5|}}}|<!--
-->{{#tag:ref||name={{{5}}}|group={{{grupa5|}}}}}{{#if:{{{rp5|}}}|{{rp|{{{rp5}}}}}}}{{#if:{{{6|}}}|<!--
-->{{#tag:ref||name={{{6}}}|group={{{grupa6|}}}}}{{#if:{{{rp6|}}}|{{rp|{{{rp6}}}}}}}{{#if:{{{7|}}}|<!--
-->{{#tag:ref||name={{{7}}}|group={{{grupa7|}}}}}{{#if:{{{rp7|}}}|{{rp|{{{rp7}}}}}}}{{#if:{{{8|}}}|<!--
-->{{#tag:ref||name={{{8}}}|group={{{grupa8|}}}}}{{#if:{{{rp8|}}}|{{rp|{{{rp8}}}}}}}{{#if:{{{9|}}}|<!--
-->{{#tag:ref||name={{{9}}}|group={{{grupa9|}}}}}{{#if:{{{rp9|}}}|{{rp|{{{rp9}}}}}}}{{#if:{{{10|}}}|<!--
-->{{#tag:ref||name={{{10}}}|group={{{grupa10|}}}}}{{#if:{{{rp10|}}}|{{rp|{{{rp10}}}}}}}{{#if:{{{11|}}}|<sup class="error" style="font-size:0.9em; line-height:0;">Szablon obsługuje maksymalnie 10 przypisów ([[Szablon:R|zmień go]]!).</sup>}}}}}}}}}}}}}}}}}}}}</includeonly>
<noinclude>
*Szablon został skopiowany ze strony [https://pl.wikipedia.org/wiki/Szablon:R Szablon:R] encyklopedii: Wikipedia.pl.
[[Kategoria:Szablony techniczne]]
</noinclude>
96a8a15feac18374a581a68f39c102310c2afde1
10
8
2014-01-15T00:21:41Z
Ffkapa
2
Informacje o autorstwie
wikitext
text/x-wiki
<includeonly><!--
-->{{#tag:ref||name={{{1}}}|group={{{grupa1|}}}}}{{#if:{{{rp1|}}}|{{rp|{{{rp1}}}}}}}{{#if:{{{2|}}}|<!--
-->{{#tag:ref||name={{{2}}}|group={{{grupa2|}}}}}{{#if:{{{rp2|}}}|{{rp|{{{rp2}}}}}}}{{#if:{{{3|}}}|<!--
-->{{#tag:ref||name={{{3}}}|group={{{grupa3|}}}}}{{#if:{{{rp3|}}}|{{rp|{{{rp3}}}}}}}{{#if:{{{4|}}}|<!--
-->{{#tag:ref||name={{{4}}}|group={{{grupa4|}}}}}{{#if:{{{rp4|}}}|{{rp|{{{rp4}}}}}}}{{#if:{{{5|}}}|<!--
-->{{#tag:ref||name={{{5}}}|group={{{grupa5|}}}}}{{#if:{{{rp5|}}}|{{rp|{{{rp5}}}}}}}{{#if:{{{6|}}}|<!--
-->{{#tag:ref||name={{{6}}}|group={{{grupa6|}}}}}{{#if:{{{rp6|}}}|{{rp|{{{rp6}}}}}}}{{#if:{{{7|}}}|<!--
-->{{#tag:ref||name={{{7}}}|group={{{grupa7|}}}}}{{#if:{{{rp7|}}}|{{rp|{{{rp7}}}}}}}{{#if:{{{8|}}}|<!--
-->{{#tag:ref||name={{{8}}}|group={{{grupa8|}}}}}{{#if:{{{rp8|}}}|{{rp|{{{rp8}}}}}}}{{#if:{{{9|}}}|<!--
-->{{#tag:ref||name={{{9}}}|group={{{grupa9|}}}}}{{#if:{{{rp9|}}}|{{rp|{{{rp9}}}}}}}{{#if:{{{10|}}}|<!--
-->{{#tag:ref||name={{{10}}}|group={{{grupa10|}}}}}{{#if:{{{rp10|}}}|{{rp|{{{rp10}}}}}}}{{#if:{{{11|}}}|<sup class="error" style="font-size:0.9em; line-height:0;">Szablon obsługuje maksymalnie 10 przypisów ([[Szablon:R|zmień go]]!).</sup>}}}}}}}}}}}}}}}}}}}}</includeonly>
<noinclude>
*Szablon został skopiowany ze strony [https://pl.wikipedia.org/wiki/Szablon:R Szablon:R] Wikipedii.pl.
[[Kategoria:Szablony techniczne]]
</noinclude>
6fba7c28ea2ff6ee276370262559380169a338b0
8
2014-01-14T12:25:37Z
Ffkapa
2
Szablon utworzony na podstawie szablonu: "R" z Wikipedii.pl dnia 14.01.2014
wikitext
text/x-wiki
<includeonly><!--
-->{{#tag:ref||name={{{1}}}|group={{{grupa1|}}}}}{{#if:{{{rp1|}}}|{{rp|{{{rp1}}}}}}}{{#if:{{{2|}}}|<!--
-->{{#tag:ref||name={{{2}}}|group={{{grupa2|}}}}}{{#if:{{{rp2|}}}|{{rp|{{{rp2}}}}}}}{{#if:{{{3|}}}|<!--
-->{{#tag:ref||name={{{3}}}|group={{{grupa3|}}}}}{{#if:{{{rp3|}}}|{{rp|{{{rp3}}}}}}}{{#if:{{{4|}}}|<!--
-->{{#tag:ref||name={{{4}}}|group={{{grupa4|}}}}}{{#if:{{{rp4|}}}|{{rp|{{{rp4}}}}}}}{{#if:{{{5|}}}|<!--
-->{{#tag:ref||name={{{5}}}|group={{{grupa5|}}}}}{{#if:{{{rp5|}}}|{{rp|{{{rp5}}}}}}}{{#if:{{{6|}}}|<!--
-->{{#tag:ref||name={{{6}}}|group={{{grupa6|}}}}}{{#if:{{{rp6|}}}|{{rp|{{{rp6}}}}}}}{{#if:{{{7|}}}|<!--
-->{{#tag:ref||name={{{7}}}|group={{{grupa7|}}}}}{{#if:{{{rp7|}}}|{{rp|{{{rp7}}}}}}}{{#if:{{{8|}}}|<!--
-->{{#tag:ref||name={{{8}}}|group={{{grupa8|}}}}}{{#if:{{{rp8|}}}|{{rp|{{{rp8}}}}}}}{{#if:{{{9|}}}|<!--
-->{{#tag:ref||name={{{9}}}|group={{{grupa9|}}}}}{{#if:{{{rp9|}}}|{{rp|{{{rp9}}}}}}}{{#if:{{{10|}}}|<!--
-->{{#tag:ref||name={{{10}}}|group={{{grupa10|}}}}}{{#if:{{{rp10|}}}|{{rp|{{{rp10}}}}}}}{{#if:{{{11|}}}|<sup class="error" style="font-size:0.9em; line-height:0;">Szablon obsługuje maksymalnie 10 przypisów ([[Szablon:R|zmień go]]!).</sup>}}}}}}}}}}}}}}}}}}}}</includeonly>
df55bffd5247e05036bb2615a6a1f2184b3fad6d
Szablon:Self
10
20
603
68
2014-03-13T15:33:06Z
Ffkapa
2
red
wikitext
text/x-wiki
{| style="margin:0.5em auto; background-color: #f0f0f0; border: 2px solid #aaaaaa; padding: 2px"
| style="text-align:center" | '''''Ja, twórca tego pliku,''' niniejszym udostępniam go na poniższ{{#if: {{{2|}}}|ych licencjach:|ej licencji:}}''
|---
| style="text-align:center" |{{{{{1}}}}}{{#if:{{{2|}}}|{{{{{2}}}}}{{#if:{{{3|}}}|{{{{{3|}}}}}}}<br/>Możesz wybrać, którą licencję chcesz zastosować.}}
|}
<noinclude>
[[Kategoria:Szablony licencji|self]]
[[Kategoria:Szablony umieszczane na stronach plików]]
</noinclude>
a9296bc47bb93cefb95c0c4ec76310236ee65463
68
2014-01-15T23:28:14Z
Ffkapa
2
Nowy szablon
wikitext
text/x-wiki
{| style="margin:0.5em auto; background-color: #f0f0f0; border: 2px solid #aaaaaa; padding: 2px"
| style="text-align:center" | '''''Ja, twórca tego pliku,''' niniejszym udostępniam go na poniższ{{#if: {{{2|}}}|ych licencjach:|ej licencji:}}''
|---
| style="text-align:center" |{{{{{1}}}}}{{#if:{{{2|}}}|{{{{{2}}}}}{{#if:{{{3|}}}|{{{{{3|}}}}}}}<br/>Możesz wybrać, którą licencję chcesz zastosować.}}
|}
<noinclude>
[[Kategoria:Szablony licencji|self]]
[[Kategoria:Szablony umieszczane na stronach plików]]
</noin
0b34609a29b658ce32fb524bb4376bf8afb9638a
Szablon:Spis treści
10
175
507
506
2014-02-16T08:38:47Z
Ffkapa
2
wikitext
text/x-wiki
<includeonly><div style="clear:right; margin: 0 0 1em 1em; float: {{{1|right}}}; padding: .5em 0 .8em 1.4em; background: none; width: {{{2|}}}">__TOC__</div></includeonly><noinclude>
{{Cytuj_Wiki_Szablon}}
</noinclude>
c9e4d76e303f8f02324be17e8f97579469f4ff07
506
2014-02-16T08:37:53Z
Ffkapa
2
nowy szablon
wikitext
text/x-wiki
<includeonly><div style="clear:right; margin: 0 0 1em 1em; float: {{{1|right}}}; padding: .5em 0 .8em 1.4em; background: none; width: {{{2|}}}">__TOC__</div></includeonly><noinclude>
</noinclude>
02e62074afc18ee66be9d43de37519418329b82a
Szablon:Szablon licencji Creative Commons
10
23
72
71
2014-01-15T23:37:15Z
Ffkapa
2
wikitext
text/x-wiki
{| cellspacing="8" cellpadding="0" style="width:80%; clear:both; text-align:center; margin:0.5em auto; background-color:#f9f9f9; border:2px solid #e0e0e0"
| style="width:90px;" | {{{grafika}}}
| {{{opis}}}
|}<includeonly>
{{#switch: {{NAMESPACE}}
| Plik = [[Kategoria:{{{kategoria|Lokalnie załadowane pliki}}}|{{PAGENAME}}]]
| Szablon = [[Kategoria:{{{grupa|Szablony licencji Creative Commons}}}|{{PAGENAME}}]]
}}
</includeonly>
6018652f6807b518b30035e16a73113ac6e60821
71
2014-01-15T23:36:52Z
Ffkapa
2
Nowy szablon
wikitext
text/x-wiki
{| cellspacing="8" cellpadding="0" style="width:80%; clear:both; text-align:center; margin:0.5em auto; background-color:#f9f9f9; border:2px solid #e0e0e0"
| style="width:90px;" | {{{grafika}}}
| {{{opis}}}
|}<includeonly>
{{#switch: {{NAMESPACE}}
| Plik = [[Kategoria:{{{kategoria|Lokalnie załadowane pliki}}}|{{PAGENAME}}]]
| Szablon = [[Kategoria:{{{grupa|Szablony licencji Creative Commons}}}|{{PAGENAME}}]]
}}
</includeonly><noinclude>{{Dokumentacja}}</noinclude>
6f761216478978e23dcfca704fc1c85c3e2680ae
Szablon:Tmbox
10
10
14
2014-01-15T00:40:29Z
Ffkapa
2
Nowy szablon info
wikitext
text/x-wiki
<table class="plainlinks" style="margin: 4px 10%; border-collapse: collapse; background: #f8eaba;
{{#switch:{{{typ|}}}
| poważny = border: 1px solid #b22222;
| zawartość = border: 1px solid #f28500;
| styl = border: 1px solid #f4c430;
| integruj = border: 1px solid #9932cc;
| ochrona = border: 1px solid #bba;
| dobry = border: 1px solid #008800;
| medal = border: 1px solid #e5d4a1;
| wiadomość
| #default = border: 1px solid #4682b4;
}} {{{styl|}}}">
<tr>
{{#ifeq:{{{grafika|}}}|brak
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td style="border: none; padding: 1px;"></td>
| <td style="border: none; padding: 2px 0px 2px 0.9em; text-align: center;">
{{#if:{{{grafika|}}}
| {{{grafika}}}
| {{#switch:{{{typ|}}}
| poważny = {{ikona|czostrzeżenie|35}}
| zawartość = {{ikona|pomuwaga|35}}
| styl = {{ikona|miotłasw|35}}
| integruj = {{ikona|integracja|35}}
| ochrona = {{ikona|zabezpiecz1|35}}
| dobry = {{ikona|da|35}}
| medal = {{ikona|anm|35}}
| wiadomość <!-- wiadomość = default -->
| #default = {{ikona|info|35}}
}}
}}</td>
}}<td style="border: none; padding: 0.25em 0.9em; width: 100%; {{{textstyle|}}}"> {{{1|{{{tekst}}}}}} </td>
{{#if:{{{grafika prawo|}}}
| <td style="border: none; padding: 2px 0.9em 2px 0px; text-align: center;"> {{{grafika prawo}}} </td>
}}</tr></table>
<noinclude>
*Szablon został skopiowany ze strony [https://pl.wikipedia.org/w/index.php?title=Szablon:Tmbox Szablon:Tmbox] Encyklopedii: Wikipedia.pl.
[[Kategoria:Szablony techniczne]]
</noinclude>
489693cdba25551846b53fdaab7bbe28280f3ced
Szablon:Tnavbar
10
154
390
2014-02-08T21:54:14Z
Ffkapa
2
Utworzono nową stronę "<includeonly><!-- -->{{#if:{{{nodiv|}}} |<!--then: --> <span class="noprint plainlinks" style="white-space:nowrap; font-weight:normal; font-size:xx-small; {{{style..."
wikitext
text/x-wiki
<includeonly><!--
-->{{#if:{{{nodiv|}}} |<!--then:
--> <span class="noprint plainlinks" style="white-space:nowrap; font-weight:normal; font-size:xx-small; {{{style|}}}"> |<!--else:
--><div class="noprint plainlinks" style="background-color:transparent; padding:0; font-weight:normal; font-size:xx-small; {{#if:{{{fontcolor|}}}|color:{{{fontcolor}}};}}{{#if:{{{fontstyle|}}}|{{{fontstyle}}}}} white-space:nowrap; {{{style|}}}"><!--
-->}}<!--
-->{{#ifeq:{{{mini|}}}{{{miniv|}}}{{{plain|}}}{{{viewplain|}}}|<!--equals:-->1 |<!--then:(nothing)--> |<!--else:
-->Ten szablon: <!--
-->}}<!--
-->{{#if:{{{mini|}}} |<!--then:
-->[[{{#switch:1{{{space|}}}|1=Szablon:|{{{space}}}:}}{{{1}}}|<span title="Pokaż ten szablon" {{#if:{{{fontcolor|}}}|style="color:{{{fontcolor}}};{{#if:{{{fontstyle|}}}|{{{fontstyle}}}}}"}}>p</span>]] <span style="font-size:80%;">•</span> [[{{#switch:{{{space|}}}|Wikiprojekt=Dyskusja Wikiprojektu:|Dyskusja szablonu:}}{{{1}}}|<span {{#ifexist: {{#switch:{{{space|}}}|Wikiprojekt=Dyskusja Wikiprojektu:|Dyskusja szablonu:}}{{{1}}}|<!--do nothing-->{{#if:{{{fontcolor|}}}|style="color:{{{fontcolor}}};"}}|style="{{#if:{{{fontcolor|}}}|color:{{{fontcolor}}};}}{{#if:{{{fontstyle|}}}|{{{fontstyle}}}}}"}} title="Dyskusja na temat tego szablonu">d</span>]] <span style="font-size:80%;">•</span> [{{fullurl:{{#switch:1{{{space|}}}|1=Szablon:|{{{space}}}:}}{{{1}}}|action=edit}} <span style="{{#if:{{{fontcolor|}}}|color:{{{fontcolor}}};}}{{#if:{{{fontstyle|}}}|{{{fontstyle}}}}}" title="Możesz edytować ten szablon. Użyj przycisku podglądu przed zapisaniem zmian.">e</span>]<!--
-->}}<!--
-->{{#ifeq:{{{miniv|}}}{{{viewplain|}}} |<!--equals:-->1 |<!--then:
-->[[{{#switch:1{{{space|}}}|1=Szablon:|{{{space}}}:}}{{{1}}}|<span title="Pokaż ten szablon" {{#if:{{{fontcolor|}}}|style="color:{{{fontcolor}}};"}}>p{{#if:{{{viewplain|}}}|okaż}}</span>]]<!--
-->|<!--else:(nothing)--> |}}<!--
-->{{#ifeq:{{{mini|}}}{{{miniv|}}}{{{viewplain|}}} |<!--equals:-->1 |<!--then:(nothing)--> |<!--else:
-->[[{{#switch:1{{{space|}}}|1=Szablon:|{{{space}}}:}}{{{1}}}|<span title="Pokaż ten szablon" {{#if:{{{fontcolor|}}}|style="color:{{{fontcolor}}};"}}>pokaż</span>]] <span style="font-size:80%;">•</span> [[{{#switch:{{{space|}}}|Wikiprojekt=Dyskusja Wikiprojektu:|Dyskusja szablonu:}}{{{1}}}|<span {{#ifexist: {{#switch:{{{space|}}}|Wikiprojekt=Dyskusja Wikiprojektu:|Dyskusja szablonu:}}{{{1}}}|<!--do nothing-->{{#if:{{{fontcolor|}}}|style="color:{{{fontcolor}}};"}}|style="{{#if:{{{fontcolor|}}}|color:{{{fontcolor}}};}}{{#if:{{{fontstyle|}}}|{{{fontstyle}}}}}"}} title="Dyskusja na temat tego szablonu">dyskusja</span>]] <span style="font-size:80%;">•</span> [{{fullurl:{{#switch:1{{{space|}}}|1=Szablon:|{{{space}}}:}}{{{1}}}|action=edit}} <span style="{{#if:{{{fontcolor|}}}|color:{{{fontcolor}}};}}{{#if:{{{fontstyle|}}}|{{{fontstyle}}}}}" title="Możesz edytować ten szablon. Użyj przycisku podglądu przed zapisaniem zmian.">edytuj</span>]<!--
-->}}<!--
-->{{#if:{{{nodiv|}}} |<!--then:
--></span> |<!--else:
--></div><!--
-->}}</includeonly><noinclude>
{{Cytuj_Wiki_Szablon}}
<!-- Kategorie i interwiki dodawaj do podstrony /opis, nie tutaj! -->
</noinclude>
e7f00368a40c91b413e54674b64be563877a4639
Dyskusja szablonu:Cytuj książkę
11
13
567
17
2014-03-11T15:06:50Z
Ffkapa
2
red
wikitext
text/x-wiki
{{Info_Wiki_Szablon}}
dc6251bf6dc2edaf4c0ab93aca2733beb5d600f2
17
2014-01-15T01:15:17Z
Ffkapa
2
info o autorstwie
wikitext
text/x-wiki
{{Info_Wikipedia}}
b9f643b6c8824ca4b87a647730d71df926355122
Dyskusja szablonu:Cytuj stronę
11
207
574
2014-03-12T15:49:47Z
Ffkapa
2
red
wikitext
text/x-wiki
{{Info_Wiki_Szablon}}
dc6251bf6dc2edaf4c0ab93aca2733beb5d600f2
Dyskusja szablonu:Dziennik Ustaw
11
206
573
2014-03-12T15:47:53Z
Ffkapa
2
red
wikitext
text/x-wiki
{{Info_Wiki_Szablon}}
dc6251bf6dc2edaf4c0ab93aca2733beb5d600f2
Dyskusja szablonu:Internetowy System Aktów Prawnych
11
205
571
2014-03-12T15:38:53Z
Ffkapa
2
red
wikitext
text/x-wiki
{{Info_Wiki_Szablon}}
dc6251bf6dc2edaf4c0ab93aca2733beb5d600f2
Dyskusja szablonu:Namespace detect showall
11
209
578
577
2014-03-12T15:59:26Z
Ffkapa
2
UWAGA! Usunięcie treści (strona pozostała pusta)!
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
577
2014-03-12T15:56:51Z
Ffkapa
2
red
wikitext
text/x-wiki
{{Info_Wiki_Szablon}}
dc6251bf6dc2edaf4c0ab93aca2733beb5d600f2
Dyskusja szablonu:Navbox
11
208
576
2014-03-12T15:55:14Z
Ffkapa
2
red
wikitext
text/x-wiki
{{Info_Wiki_Szablon}}
dc6251bf6dc2edaf4c0ab93aca2733beb5d600f2
Pomoc:Spis treści
12
156
529
528
2014-03-01T22:55:39Z
Użytkownik usunięty
9
wikitext
text/x-wiki
{| cellspacing="0" cellpadding="0" align="center" style="width:100%; border:2px #B8C7D9 solid;"
|-
| colspan="2" align="center" style="background:#f5faff; text-align:center; border-bottom:1px #B8C7D9 solid;" |
<div style="float:right"></div>
<h2 style="margin:.5em; margin-top:.1em; border-bottom:0; font-weight:bold;">[[Pomoc:Gdzie zadać pytanie|Strony pomocy Wiki.Pnikuczanie]]</h2>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Pomoc:Pierwsze kroki|Pierwszy kontakt]]'''</span></big><br />
<span class="helplink_helppage">'''[[FAQ|Poradnik dla początkujących]]'''</span>
<span class="helplink_helppage">[[Wstęp|Wstęp połączony z samouczkiem]]</span>
<span class="helplink_helppage">[[Pomoc:Logowanie|Logowanie]]</span>
<span class="helplink_helppage">[[Pomoc:Przeszukiwanie|Jak szukać?]]</span>
<span class="helplink_helppage">[[Pomoc:FAQ|Pytania nowicjuszy (FAQ)]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Wikipedia:Portal wikipedystów|Społeczność i komunikacja]]'''</span></big><br />
<span class="helplink_helppage">[[Pomoc:Strona dyskusji|Dyskusje]]</span>
<span class="helplink_helppage">[[Wikipedia:Kawiarenka pod Wesołym Encyklopedystą|Kawiarenka (forum)]]</span>
<span class="helplink_helppage">[[Wikipedia:Tablica ogłoszeń|Wikiogłoszenia]]</span>
<span class="helplink_helppage">[[Wikipedia:Listy dyskusyjne|Listy dyskusyjne]]</span>
<span class="helplink_helppage">[[Pomoc:Słowniczek|Terminologia]]</span>
<span class="helplink_helppage">[[wikt:Indeks:Angielski - Slang internetowy|Slang internetowy]]</span>
<span class="helplink_specpage">[[Wikipedia:Kanał IRC|kanał IRC]] (czat)</span>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Pomoc:Jak edytować Wiki.Pnikuczanie|Tworzenie i edytowanie haseł]]'''</span></big><br />
<span class="helplink_helppage">[[Pomoc:Edytowanie|Edytowanie]]</span>
<span class="helplink_helppage">[[Pomoc:Tworzenie nowych haseł|Tworzenie nowych haseł]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Kategoryzacja|Dodawanie kategorii]]
<span class="helplink_helppage">[[Pomoc:Formatowanie tekstu|Formatowanie]]</span>
<span class="helplink_helppage">[[Wikipedia:Tworzenie linków w WikiPnikuczanie|Linki]]
<span class="helplink_helppage">[[Pomoc:Tworzenie szablonów|Szablony]]
<span class="helplink_helppage">[[Pomoc:Wzory|Wzory]]</span>
<span class="helplink_helppage">[[Pomoc:Tabele|Tabele]]</span>
<span class="helplink_helppage">[[Pomoc:Ilustrowanie|Ilustrowanie artykułów]]</span>
<span class="helplink_helppage">[[commons:Commons:Pierwsze kroki|Przesyłanie plików]]</span>
<span class="helplink_helppage">[[Wikipedia:Bibliografia|Bibliografia]]</span>
<span class="helplink_helppage">[[Pomoc:Przypisy|Przypisy]]</span>
<span class="helplink_helppage">[[Pomoc:Wersje oznaczone|Oznaczanie artykułów]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Pomoc:Sprawy administracyjne|Sprawy administracyjne]]'''</span></big><br />
<span class="helplink_helppage">[[WikiPnikuczanie:Prośby do administratorów|Prośby do administratorów]]</span>
<span class="helplink_specpage">[[Pomoc:Ostatnie zmiany|Ostatnie zmiany]]</span>
<span class="helplink_helppage">[[Pomoc:Historia strony|Historia strony]]</span>
<span class="helplink_helppage">[[Pomoc:Zmiana nazwy strony|Zmiana nazwy (przeniesienie) strony]]</span>
<span class="helplink_helppage">[[Wikipedia:Wandalizm|Wandalizm]]</span>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Wiki.Pnikuczanie:Regulamin i zalecenia edycyjne|Zasady i zalecenia Wiki.Pnikuczanie]]'''</span></big><br />
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Zasady|Zasady]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Zalecenia edycyjne|Zalecenia]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Wikietykieta|Etykieta]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Styl – poradnik dla autorów|Styl]]</span>
<span class="helplink_helppage">[[Pomoc:Powszechne błędy językowe|Powszechne błędy językowe]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Prawa autorskie|Prawa autorskie]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Encyklopedyczność|Encyklopedyczność haseł]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Pomoc:Informacje techniczne|Sprawy techniczne]]'''</span></big><br />
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Narzędzia|Narzędzia Wiki.Pnikuczanie - skrypty itp.]]</span>
<span class="helplink_helppage">[[MediaWiki|Oprogramowanie MediaWiki]]</span>
<span class="helplink_helppage">[[Pomoc:Przestrzeń nazw|Przestrzeń nazw Wiki.Pnikuczanie]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Własna wiki|Własna wiki]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Baza danych|Baza danych]]</span>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Wiki.Pnikuczanie:Zasoby i informacje przydatne Wikipedystom|Przydatne zasoby]]'''</span></big><br />
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Szablony|Szablony]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Szablony/Infoboksy|Infoboksy]]</span>
<span class="helplink_helppage">[[Pomoc:Parametry|Parametry szablonów]]</span>
<span class="helplink_helppage">[[Pomoc:Dla tłumaczy|Pomoc dla tłumaczy]]</span>
<span class="helplink_orgpage">[[Portal:Portale|Portale]]</span>
<span class="helplink_orgpage">[[Portal:Kategorie Główne|Kategorie]]</span>
<span class="helplink_orgpage">[[Specjalna:Strony według prefiksu|Strony zaczynające się na...]]</span>
<span class="helplink_orgpage">[[Wiki.Pnikuczanie:Skarbnica Wiki.Pnikuczanie|Zasoby zewnętrzne]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Pomoc:Wszystkie pliki pomocy|Spis wszystkich stron pomocy]]'''</span></big><br />
<span class="helplink_catpage">[[:Kategoria:Pomoc|Pomoc]]</span>
<span class="helplink_catpage">[[:Kategoria:Meta-strony Wiki.Pnikuczanie|Strony meta]]</span>
<span class="helplink_subpage">[[Wiki.Pnikuczanie:Indeks zasad, zaleceń i pomocy dla redaktorów|Indeks meta-stron]]</span>
|-
| colspan="2" style="width:100%; padding:0.4em 0.8em; background:#f5faff; border-top:2px solid #cedff2;" align="center"|
'''Jeśli chcesz zadać pytanie, [[Pomoc:Gdzie zadać pytanie|zajrzyj tutaj]].'''
|-
|colspan="2" align="center" style="background:Floralwhite; text-align:left; border-bottom:2px #B8C7D9 solid; padding-bottom: 7px" |<div style="float:left; margin-left:7px; margin-right:3px; margin-top:7px; text-align:left;">
<!---{{Pomoc:Aktualności}}--->
|-
| colspan="2" style="width:100%; padding:0.4em 0.8em; background:#f5faff; border-top:2px solid #cedff2;" align="center" class="plainlinks" |
Wszelkie poprawki, sugestie i komentarze '''dotyczące systemu pomocy''' należy [{{fullurl:{{TALKPAGENAME}}|action=edit§ion=new}} zgłaszać tutaj].
|}
__NOTOC__
__NOEDITSECTION__
12586e47e88c2451c5e9c6d4e791f5fd49fd9449
528
521
2014-03-01T22:54:45Z
Użytkownik usunięty
9
wikitext
text/x-wiki
{| cellspacing="0" cellpadding="0" align="center" style="width:100%; border:2px #B8C7D9 solid;"
|-
| colspan="2" align="center" style="background:#f5faff; text-align:center; border-bottom:1px #B8C7D9 solid;" |
<div style="float:right"></div>
<h2 style="margin:.5em; margin-top:.1em; border-bottom:0; font-weight:bold;">[[Pomoc:Gdzie zadać pytanie|Strony pomocy Wiki.Pnikuczanie]]</h2>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Pomoc:Pierwsze kroki|Pierwszy kontakt]]'''</span></big><br />
<span class="helplink_helppage">'''[[FAQ|Poradnik dla początkujących]]'''</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Wstęp|Wstęp połączony z samouczkiem]]</span>
<span class="helplink_helppage">[[Pomoc:Logowanie|Logowanie]]</span>
<span class="helplink_helppage">[[Pomoc:Przeszukiwanie|Jak szukać?]]</span>
<span class="helplink_helppage">[[Pomoc:FAQ|Pytania nowicjuszy (FAQ)]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Wikipedia:Portal wikipedystów|Społeczność i komunikacja]]'''</span></big><br />
<span class="helplink_helppage">[[Pomoc:Strona dyskusji|Dyskusje]]</span>
<span class="helplink_helppage">[[Wikipedia:Kawiarenka pod Wesołym Encyklopedystą|Kawiarenka (forum)]]</span>
<span class="helplink_helppage">[[Wikipedia:Tablica ogłoszeń|Wikiogłoszenia]]</span>
<span class="helplink_helppage">[[Wikipedia:Listy dyskusyjne|Listy dyskusyjne]]</span>
<span class="helplink_helppage">[[Pomoc:Słowniczek|Terminologia]]</span>
<span class="helplink_helppage">[[wikt:Indeks:Angielski - Slang internetowy|Slang internetowy]]</span>
<span class="helplink_specpage">[[Wikipedia:Kanał IRC|kanał IRC]] (czat)</span>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Pomoc:Jak edytować Wiki.Pnikuczanie|Tworzenie i edytowanie haseł]]'''</span></big><br />
<span class="helplink_helppage">[[Pomoc:Edytowanie|Edytowanie]]</span>
<span class="helplink_helppage">[[Pomoc:Tworzenie nowych haseł|Tworzenie nowych haseł]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Kategoryzacja|Dodawanie kategorii]]
<span class="helplink_helppage">[[Pomoc:Formatowanie tekstu|Formatowanie]]</span>
<span class="helplink_helppage">[[Wikipedia:Tworzenie linków w WikiPnikuczanie|Linki]]
<span class="helplink_helppage">[[Pomoc:Tworzenie szablonów|Szablony]]
<span class="helplink_helppage">[[Pomoc:Wzory|Wzory]]</span>
<span class="helplink_helppage">[[Pomoc:Tabele|Tabele]]</span>
<span class="helplink_helppage">[[Pomoc:Ilustrowanie|Ilustrowanie artykułów]]</span>
<span class="helplink_helppage">[[commons:Commons:Pierwsze kroki|Przesyłanie plików]]</span>
<span class="helplink_helppage">[[Wikipedia:Bibliografia|Bibliografia]]</span>
<span class="helplink_helppage">[[Pomoc:Przypisy|Przypisy]]</span>
<span class="helplink_helppage">[[Pomoc:Wersje oznaczone|Oznaczanie artykułów]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Pomoc:Sprawy administracyjne|Sprawy administracyjne]]'''</span></big><br />
<span class="helplink_helppage">[[WikiPnikuczanie:Prośby do administratorów|Prośby do administratorów]]</span>
<span class="helplink_specpage">[[Pomoc:Ostatnie zmiany|Ostatnie zmiany]]</span>
<span class="helplink_helppage">[[Pomoc:Historia strony|Historia strony]]</span>
<span class="helplink_helppage">[[Pomoc:Zmiana nazwy strony|Zmiana nazwy (przeniesienie) strony]]</span>
<span class="helplink_helppage">[[Wikipedia:Wandalizm|Wandalizm]]</span>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Wiki.Pnikuczanie:Regulamin i zalecenia edycyjne|Zasady i zalecenia Wiki.Pnikuczanie]]'''</span></big><br />
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Zasady|Zasady]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Zalecenia edycyjne|Zalecenia]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Wikietykieta|Etykieta]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Styl – poradnik dla autorów|Styl]]</span>
<span class="helplink_helppage">[[Pomoc:Powszechne błędy językowe|Powszechne błędy językowe]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Prawa autorskie|Prawa autorskie]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Encyklopedyczność|Encyklopedyczność haseł]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Pomoc:Informacje techniczne|Sprawy techniczne]]'''</span></big><br />
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Narzędzia|Narzędzia Wiki.Pnikuczanie - skrypty itp.]]</span>
<span class="helplink_helppage">[[MediaWiki|Oprogramowanie MediaWiki]]</span>
<span class="helplink_helppage">[[Pomoc:Przestrzeń nazw|Przestrzeń nazw Wiki.Pnikuczanie]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Własna wiki|Własna wiki]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Baza danych|Baza danych]]</span>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Wiki.Pnikuczanie:Zasoby i informacje przydatne Wikipedystom|Przydatne zasoby]]'''</span></big><br />
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Szablony|Szablony]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Szablony/Infoboksy|Infoboksy]]</span>
<span class="helplink_helppage">[[Pomoc:Parametry|Parametry szablonów]]</span>
<span class="helplink_helppage">[[Pomoc:Dla tłumaczy|Pomoc dla tłumaczy]]</span>
<span class="helplink_orgpage">[[Portal:Portale|Portale]]</span>
<span class="helplink_orgpage">[[Portal:Kategorie Główne|Kategorie]]</span>
<span class="helplink_orgpage">[[Specjalna:Strony według prefiksu|Strony zaczynające się na...]]</span>
<span class="helplink_orgpage">[[Wiki.Pnikuczanie:Skarbnica Wiki.Pnikuczanie|Zasoby zewnętrzne]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Pomoc:Wszystkie pliki pomocy|Spis wszystkich stron pomocy]]'''</span></big><br />
<span class="helplink_catpage">[[:Kategoria:Pomoc|Pomoc]]</span>
<span class="helplink_catpage">[[:Kategoria:Meta-strony Wiki.Pnikuczanie|Strony meta]]</span>
<span class="helplink_subpage">[[Wiki.Pnikuczanie:Indeks zasad, zaleceń i pomocy dla redaktorów|Indeks meta-stron]]</span>
|-
| colspan="2" style="width:100%; padding:0.4em 0.8em; background:#f5faff; border-top:2px solid #cedff2;" align="center"|
'''Jeśli chcesz zadać pytanie, [[Pomoc:Gdzie zadać pytanie|zajrzyj tutaj]].'''
|-
|colspan="2" align="center" style="background:Floralwhite; text-align:left; border-bottom:2px #B8C7D9 solid; padding-bottom: 7px" |<div style="float:left; margin-left:7px; margin-right:3px; margin-top:7px; text-align:left;">
<!---{{Pomoc:Aktualności}}--->
|-
| colspan="2" style="width:100%; padding:0.4em 0.8em; background:#f5faff; border-top:2px solid #cedff2;" align="center" class="plainlinks" |
Wszelkie poprawki, sugestie i komentarze '''dotyczące systemu pomocy''' należy [{{fullurl:{{TALKPAGENAME}}|action=edit§ion=new}} zgłaszać tutaj].
|}
__NOTOC__
__NOEDITSECTION__
41bbee9f9bb66d662d9264d94a6cd62860410dc7
521
520
2014-02-17T23:57:58Z
Ffkapa
2
wikitext
text/x-wiki
{| cellspacing="0" cellpadding="0" align="center" style="width:100%; border:2px #B8C7D9 solid;"
|-
| colspan="2" align="center" style="background:#f5faff; text-align:center; border-bottom:1px #B8C7D9 solid;" |
<div style="float:right"></div>
<h2 style="margin:.5em; margin-top:.1em; border-bottom:0; font-weight:bold;">[[Pomoc:Gdzie zadać pytanie|Strony pomocy Wiki.Pnikuczanie]]</h2>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Pomoc:Pierwsze kroki|Pierwszy kontakt]]'''</span></big><br />
<span class="helplink_helppage">'''[[FAQ|Poradnik dla początkujących]]'''</span>
<span class="helplink_helppage">[[Wikipedia:Wstęp|Wstęp połączony z samouczkiem]]</span>
<span class="helplink_helppage">[[Pomoc:Logowanie|Logowanie]]</span>
<span class="helplink_helppage">[[Pomoc:Przeszukiwanie|Jak szukać?]]</span>
<span class="helplink_helppage">[[Pomoc:FAQ|Pytania nowicjuszy (FAQ)]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Wikipedia:Portal wikipedystów|Społeczność i komunikacja]]'''</span></big><br />
<span class="helplink_helppage">[[Pomoc:Strona dyskusji|Dyskusje]]</span>
<span class="helplink_helppage">[[Wikipedia:Kawiarenka pod Wesołym Encyklopedystą|Kawiarenka (forum)]]</span>
<span class="helplink_helppage">[[Wikipedia:Tablica ogłoszeń|Wikiogłoszenia]]</span>
<span class="helplink_helppage">[[Wikipedia:Listy dyskusyjne|Listy dyskusyjne]]</span>
<span class="helplink_helppage">[[Pomoc:Słowniczek|Terminologia]]</span>
<span class="helplink_helppage">[[wikt:Indeks:Angielski - Slang internetowy|Slang internetowy]]</span>
<span class="helplink_specpage">[[Wikipedia:Kanał IRC|kanał IRC]] (czat)</span>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Pomoc:Jak edytować Wiki.Pnikuczanie|Tworzenie i edytowanie haseł]]'''</span></big><br />
<span class="helplink_helppage">[[Pomoc:Edytowanie|Edytowanie]]</span>
<span class="helplink_helppage">[[Pomoc:Tworzenie nowych haseł|Tworzenie nowych haseł]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Kategoryzacja|Dodawanie kategorii]]
<span class="helplink_helppage">[[Pomoc:Formatowanie tekstu|Formatowanie]]</span>
<span class="helplink_helppage">[[Wikipedia:Tworzenie linków w WikiPnikuczanie|Linki]]
<span class="helplink_helppage">[[Pomoc:Tworzenie szablonów|Szablony]]
<span class="helplink_helppage">[[Pomoc:Wzory|Wzory]]</span>
<span class="helplink_helppage">[[Pomoc:Tabele|Tabele]]</span>
<span class="helplink_helppage">[[Pomoc:Ilustrowanie|Ilustrowanie artykułów]]</span>
<span class="helplink_helppage">[[commons:Commons:Pierwsze kroki|Przesyłanie plików]]</span>
<span class="helplink_helppage">[[Wikipedia:Bibliografia|Bibliografia]]</span>
<span class="helplink_helppage">[[Pomoc:Przypisy|Przypisy]]</span>
<span class="helplink_helppage">[[Pomoc:Wersje oznaczone|Oznaczanie artykułów]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Pomoc:Sprawy administracyjne|Sprawy administracyjne]]'''</span></big><br />
<span class="helplink_helppage">[[WikiPnikuczanie:Prośby do administratorów|Prośby do administratorów]]</span>
<span class="helplink_specpage">[[Pomoc:Ostatnie zmiany|Ostatnie zmiany]]</span>
<span class="helplink_helppage">[[Pomoc:Historia strony|Historia strony]]</span>
<span class="helplink_helppage">[[Pomoc:Zmiana nazwy strony|Zmiana nazwy (przeniesienie) strony]]</span>
<span class="helplink_helppage">[[Wikipedia:Wandalizm|Wandalizm]]</span>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Wiki.Pnikuczanie:Regulamin i zalecenia edycyjne|Zasady i zalecenia Wiki.Pnikuczanie]]'''</span></big><br />
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Zasady|Zasady]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Zalecenia edycyjne|Zalecenia]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Wikietykieta|Etykieta]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Styl – poradnik dla autorów|Styl]]</span>
<span class="helplink_helppage">[[Pomoc:Powszechne błędy językowe|Powszechne błędy językowe]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Prawa autorskie|Prawa autorskie]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Encyklopedyczność|Encyklopedyczność haseł]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Pomoc:Informacje techniczne|Sprawy techniczne]]'''</span></big><br />
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Narzędzia|Narzędzia Wiki.Pnikuczanie - skrypty itp.]]</span>
<span class="helplink_helppage">[[MediaWiki|Oprogramowanie MediaWiki]]</span>
<span class="helplink_helppage">[[Pomoc:Przestrzeń nazw|Przestrzeń nazw Wiki.Pnikuczanie]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Własna wiki|Własna wiki]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Baza danych|Baza danych]]</span>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Wiki.Pnikuczanie:Zasoby i informacje przydatne Wikipedystom|Przydatne zasoby]]'''</span></big><br />
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Szablony|Szablony]]</span>
<span class="helplink_helppage">[[Wiki.Pnikuczanie:Szablony/Infoboksy|Infoboksy]]</span>
<span class="helplink_helppage">[[Pomoc:Parametry|Parametry szablonów]]</span>
<span class="helplink_helppage">[[Pomoc:Dla tłumaczy|Pomoc dla tłumaczy]]</span>
<span class="helplink_orgpage">[[Portal:Portale|Portale]]</span>
<span class="helplink_orgpage">[[Portal:Kategorie Główne|Kategorie]]</span>
<span class="helplink_orgpage">[[Specjalna:Strony według prefiksu|Strony zaczynające się na...]]</span>
<span class="helplink_orgpage">[[Wiki.Pnikuczanie:Skarbnica Wiki.Pnikuczanie|Zasoby zewnętrzne]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Pomoc:Wszystkie pliki pomocy|Spis wszystkich stron pomocy]]'''</span></big><br />
<span class="helplink_catpage">[[:Kategoria:Pomoc|Pomoc]]</span>
<span class="helplink_catpage">[[:Kategoria:Meta-strony Wiki.Pnikuczanie|Strony meta]]</span>
<span class="helplink_subpage">[[Wiki.Pnikuczanie:Indeks zasad, zaleceń i pomocy dla redaktorów|Indeks meta-stron]]</span>
|-
| colspan="2" style="width:100%; padding:0.4em 0.8em; background:#f5faff; border-top:2px solid #cedff2;" align="center"|
'''Jeśli chcesz zadać pytanie, [[Pomoc:Gdzie zadać pytanie|zajrzyj tutaj]].'''
|-
|colspan="2" align="center" style="background:Floralwhite; text-align:left; border-bottom:2px #B8C7D9 solid; padding-bottom: 7px" |<div style="float:left; margin-left:7px; margin-right:3px; margin-top:7px; text-align:left;">
<!---{{Pomoc:Aktualności}}--->
|-
| colspan="2" style="width:100%; padding:0.4em 0.8em; background:#f5faff; border-top:2px solid #cedff2;" align="center" class="plainlinks" |
Wszelkie poprawki, sugestie i komentarze '''dotyczące systemu pomocy''' należy [{{fullurl:{{TALKPAGENAME}}|action=edit§ion=new}} zgłaszać tutaj].
|}
__NOTOC__
__NOEDITSECTION__
2c45dd40ff8ef410396d965e21af4c6a25b426a3
520
432
2014-02-17T23:09:31Z
Ffkapa
2
nowa, spis treści pomocy
wikitext
text/x-wiki
{| cellspacing="0" cellpadding="0" align="center" style="width:100%; border:2px #B8C7D9 solid;"
|-
| colspan="2" align="center" style="background:#f5faff; text-align:center; border-bottom:1px #B8C7D9 solid;" |
<div style="float:right"></div>
<h2 style="margin:.5em; margin-top:.1em; border-bottom:0; font-weight:bold;">[[Pomoc:Gdzie zadać pytanie|Strony pomocy Wiki.Ormianie]]</h2>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Pomoc:Pierwsze kroki|Pierwszy kontakt]]'''</span></big><br />
<span class="helplink_helppage">'''[[FAQ|Poradnik dla początkujących]]'''</span>
<span class="helplink_helppage">[[Wikipedia:Wstęp|Wstęp połączony z samouczkiem]]</span>
<span class="helplink_helppage">[[Pomoc:Logowanie|Logowanie]]</span>
<span class="helplink_helppage">[[Pomoc:Przeszukiwanie|Jak szukać?]]</span>
<span class="helplink_helppage">[[Pomoc:FAQ|Pytania nowicjuszy (FAQ)]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Wikipedia:Portal wikipedystów|Społeczność i komunikacja]]'''</span></big><br />
<span class="helplink_helppage">[[Pomoc:Strona dyskusji|Dyskusje]]</span>
<span class="helplink_helppage">[[Wikipedia:Kawiarenka pod Wesołym Encyklopedystą|Kawiarenka (forum)]]</span>
<span class="helplink_helppage">[[Wikipedia:Tablica ogłoszeń|Wikiogłoszenia]]</span>
<span class="helplink_helppage">[[Wikipedia:Listy dyskusyjne|Listy dyskusyjne]]</span>
<span class="helplink_helppage">[[Pomoc:Słowniczek|Terminologia]]</span>
<span class="helplink_helppage">[[wikt:Indeks:Angielski - Slang internetowy|Slang internetowy]]</span>
<span class="helplink_specpage">[[Wikipedia:Kanał IRC|kanał IRC]] (czat)</span>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[Pomoc:Jak edytować WikiOrmianie|Tworzenie i edytowanie haseł]]'''</span></big><br />
<span class="helplink_helppage">[[Pomoc:Edytowanie|Edytowanie]]</span>
<span class="helplink_helppage">[[Pomoc:Tworzenie nowych haseł|Tworzenie nowych haseł]]</span>
<span class="helplink_helppage">[[WikiOrmianie:Kategoryzacja|Dodawanie kategorii]]
<span class="helplink_helppage">[[Pomoc:Formatowanie tekstu|Formatowanie]]</span>
<span class="helplink_helppage">[[Wikipedia:Tworzenie linków w WikiOrmianie|Linki]]
<span class="helplink_helppage">[[Pomoc:Tworzenie szablonów|Szablony]]
<span class="helplink_helppage">[[Pomoc:Wzory|Wzory]]</span>
<span class="helplink_helppage">[[Pomoc:Tabele|Tabele]]</span>
<span class="helplink_helppage">[[Pomoc:Ilustrowanie|Ilustrowanie artykułów]]</span>
<span class="helplink_helppage">[[commons:Commons:Pierwsze kroki|Przesyłanie plików]]</span>
<span class="helplink_helppage">[[Wikipedia:Bibliografia|Bibliografia]]</span>
<span class="helplink_helppage">[[Pomoc:Przypisy|Przypisy]]</span>
<span class="helplink_helppage">[[Pomoc:Wersje oznaczone|Oznaczanie artykułów]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Pomoc:Sprawy administracyjne|Sprawy administracyjne]]'''</span></big><br />
<span class="helplink_helppage">[[WikiOrmianie:Prośby do administratorów|Prośby do administratorów]]</span>
<span class="helplink_specpage">[[Pomoc:Ostatnie zmiany|Ostatnie zmiany]]</span>
<span class="helplink_helppage">[[Pomoc:Historia strony|Historia strony]]</span>
<span class="helplink_helppage">[[Pomoc:Zmiana nazwy strony|Zmiana nazwy (przeniesienie) strony]]</span>
<span class="helplink_helppage">[[Wikipedia:Wandalizm|Wandalizm]]</span>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[WikiOrmianie:Regulamin i zalecenia edycyjne|Zasady i zalecenia WikiOrmianie]]'''</span></big><br />
<span class="helplink_helppage">[[WikiOrmianie:Zasady|Zasady]]</span>
<span class="helplink_helppage">[[WikiOrmianie:Zalecenia edycyjne|Zalecenia]]</span>
<span class="helplink_helppage">[[WikiOrmianie:Wikietykieta|Etykieta]]</span>
<span class="helplink_helppage">[[WikiOrmianie:Styl – poradnik dla autorów|Styl]]</span>
<span class="helplink_helppage">[[Pomoc:Powszechne błędy językowe|Powszechne błędy językowe]]</span>
<span class="helplink_helppage">[[WikiOrmianie:Prawa autorskie|Prawa autorskie]]</span>
<span class="helplink_helppage">[[WikiOrmianie:Encyklopedyczność|Encyklopedyczność haseł]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Pomoc:Informacje techniczne|Sprawy techniczne]]'''</span></big><br />
<span class="helplink_helppage">[[WikiOrmianie:Narzędzia|Narzędzia WikiOrmianie - skrypty itp.]]</span>
<span class="helplink_helppage">[[MediaWiki|Oprogramowanie MediaWiki]]</span>
<span class="helplink_helppage">[[Pomoc:Przestrzeń nazw|Przestrzeń nazw WikiOrmianie]]</span>
<span class="helplink_helppage">[[WikiOrmianie:Własna wiki|Własna wiki]]</span>
<span class="helplink_helppage">[[WikiOrmianie:Baza danych|Baza danych]]</span>
|-
<!-- LEFT COLUMN -->
| align="center" style="width:50%; background:white; padding:0.5em; text-align:left;" valign="top"|
<big><span class="helplink_subpage">'''[[WikiOrmianie:Zasoby i informacje przydatne Wikipedystom|Przydatne zasoby]]'''</span></big><br />
<span class="helplink_helppage">[[WikiOrmianie:Szablony|Szablony]]</span>
<span class="helplink_helppage">[[WikiOrmianie:Szablony/Infoboksy|Infoboksy]]</span>
<span class="helplink_helppage">[[Pomoc:Parametry|Parametry szablonów]]</span>
<span class="helplink_helppage">[[Pomoc:Dla tłumaczy|Pomoc dla tłumaczy]]</span>
<span class="helplink_orgpage">[[Portal:Portale|Portale]]</span>
<span class="helplink_orgpage">[[Portal:Kategorie Główne|Kategorie]]</span>
<span class="helplink_orgpage">[[Specjalna:Strony według prefiksu|Strony zaczynające się na...]]</span>
<span class="helplink_orgpage">[[WikiOrmianie:Skarbnica WikiOrmianie|Zasoby zewnętrzne]]</span>
<!-- RIGHT COLUMN -->
| align="center" style="width:50%; background:white; border-left:1px solid #cedff2; padding:0.5em; text-align:left;" valign="top" |
<big><span class="helplink_subpage">'''[[Pomoc:Wszystkie pliki pomocy|Spis wszystkich stron pomocy]]'''</span></big><br />
<span class="helplink_catpage">[[:Kategoria:Pomoc|Pomoc]]</span>
<span class="helplink_catpage">[[:Kategoria:Meta-strony WikiOrmianie|Strony meta]]</span>
<span class="helplink_subpage">[[WikiOrmianie:Indeks zasad, zaleceń i pomocy dla redaktorów|Indeks meta-stron]]</span>
|-
| colspan="2" style="width:100%; padding:0.4em 0.8em; background:#f5faff; border-top:2px solid #cedff2;" align="center"|
'''Jeśli chcesz zadać pytanie, [[Pomoc:Gdzie zadać pytanie|zajrzyj tutaj]].'''
|-
|colspan="2" align="center" style="background:Floralwhite; text-align:left; border-bottom:2px #B8C7D9 solid; padding-bottom: 7px" |<div style="float:left; margin-left:7px; margin-right:3px; margin-top:7px; text-align:left;">
<!---{{Pomoc:Aktualności}}--->
|-
| colspan="2" style="width:100%; padding:0.4em 0.8em; background:#f5faff; border-top:2px solid #cedff2;" align="center" class="plainlinks" |
Wszelkie poprawki, sugestie i komentarze '''dotyczące systemu pomocy''' należy [{{fullurl:{{TALKPAGENAME}}|action=edit§ion=new}} zgłaszać tutaj].
|}
__NOTOC__
__NOEDITSECTION__
05dd5d00eadc38ce91f44bf7b758e901973bd9d2
432
2014-02-11T22:44:43Z
Ffkapa
2
Utworzono nową stronę "aa"
wikitext
text/x-wiki
aa
e0c9035898dd52fc65c41454cec9c4d2611bfb37
Kategoria:Artykuły powstałe na podstawie informacji Wikipedii.pl
14
151
385
2014-02-08T21:40:39Z
Ffkapa
2
Nowa kat
wikitext
text/x-wiki
[[Kategoria:Artykuły przeniesione z innych projektów Wiki]]
80e0cabba25d5cdc6ae2720c648a90d7b834f1e2
Kategoria:Artykuły przeniesione z innych projektów Wiki
14
222
611
2014-03-13T15:59:34Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Kategorie]]
6a3c5e5ede886195af37680c46c34e068a9dc931
Kategoria:Barbarowie
14
623
1122
2019-11-26T22:52:06Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Ludzie związani z Pnikutem]]"
wikitext
text/x-wiki
[[Kategoria:Ludzie związani z Pnikutem]]
a766e9dd11250c3d16429b002dec4cd937290c36
Kategoria:Biografie
14
233
622
2014-03-13T20:49:35Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Ludzie]]
de5284640f8d9639eebe7f6965fb6a1a5757b791
Kategoria:Biografie według daty urodzin
14
234
624
623
2014-03-13T21:35:28Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Biografie]]
f72860bfb75491284140bcda418c922047ebf17e
623
2014-03-13T20:52:07Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Biografie]]
71c7ce058b088638301190098b7b7f1eb688dbd1
Kategoria:Biografie według daty śmierci
14
235
625
2014-03-13T21:37:27Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Biografie]]
f72860bfb75491284140bcda418c922047ebf17e
Kategoria:Biografie według miejsca urodzenia
14
241
640
2014-03-13T21:59:41Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Biografie]]"
wikitext
text/x-wiki
[[Kategoria:Biografie]]
f72860bfb75491284140bcda418c922047ebf17e
Kategoria:Biografie według miejscowości
14
240
631
2014-03-13T21:47:25Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Biografie]]
f72860bfb75491284140bcda418c922047ebf17e
Kategoria:Czuryłowie
14
618
1114
1113
2019-11-16T23:54:37Z
Ffkapa
2
wikitext
text/x-wiki
[[Kategoria:Ludzie związani z Pnikutem]]
a766e9dd11250c3d16429b002dec4cd937290c36
1113
2019-11-16T23:53:34Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Czuryłowie]]"
wikitext
text/x-wiki
[[Kategoria:Czuryłowie]]
90d5a3dc8a55abc59205ce8426ca7c53ed0b0c02
Kategoria:Grupy użytkowników
14
185
534
2014-03-02T11:48:20Z
Ffkapa
2
Nowa kategoria
wikitext
text/x-wiki
[[Kategoria:Kategorie]]
6a3c5e5ede886195af37680c46c34e068a9dc931
Kategoria:Głogowscy
14
606
1100
2019-11-16T21:35:07Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Ludzie związani z Pnikutem]]"
wikitext
text/x-wiki
[[Kategoria:Ludzie związani z Pnikutem]]
a766e9dd11250c3d16429b002dec4cd937290c36
Kategoria:Historia
14
226
615
2014-03-13T16:12:40Z
Ffkapa
2
Nowa kategoria
wikitext
text/x-wiki
[[Kategoria:Kategorie]]
6a3c5e5ede886195af37680c46c34e068a9dc931
Kategoria:Kategorie
14
181
564
563
2014-03-11T14:53:13Z
Użytkownik usunięty
9
red
wikitext
text/x-wiki
<inputbox>
type=search
width=40
namespaces=Kategoria**
searchbuttonlabel=Szukaj kategorii
bgcolor=#cee0f2
break=no
</inputbox>
<!-- to jest główna kategoria Wiki.Pnikuczanie, która nie podlega kategoryzacji -->
5001c2b47a4ca8703939e567bdf1ff13694bc721
563
561
2014-03-11T14:52:07Z
Ffkapa
2
red
wikitext
text/x-wiki
<inputbox>
type=search
width=40
namespaces=Kategoria**
searchbuttonlabel=Szukaj kategorii
bgcolor=#cee0f2
break=no
</inputbox>
<!-- to jest główna kategoria Wiki.Pnikuczanie, i nie podlega kategoryzacji -->
3dee6fa57587eda3ad379da95ca33365e7a8a950
561
530
2014-03-11T14:29:20Z
Ffkapa
2
red
wikitext
text/x-wiki
<inputbox>
type=search
width=40
namespaces=Kategoria**
searchbuttonlabel=Szukaj kategorii
bgcolor=#cee0f2
break=no
</inputbox>
<!-- to jest główna kategoria Wiki.Pnikuczanie, która nie podlega kategoryzacji -->
5001c2b47a4ca8703939e567bdf1ff13694bc721
530
2014-03-01T23:11:34Z
Użytkownik usunięty
9
Utworzono nową stronę "<inputbox> type=search width=40 namespaces=Kategoria** searchbuttonlabel=Szukaj kategorii bgcolor=#cee0f2 break=no </inputbox> <!-- to jest główna kategoria Wikipedii,..."
wikitext
text/x-wiki
<inputbox>
type=search
width=40
namespaces=Kategoria**
searchbuttonlabel=Szukaj kategorii
bgcolor=#cee0f2
break=no
</inputbox>
<!-- to jest główna kategoria Wikipedii, która nie podlega kategoryzacji -->
d8aa25f1cf38d049c65ded9d61610e880803a86f
Kategoria:Licencje
14
199
556
2014-03-11T00:58:12Z
Ffkapa
2
nowa kategoria
wikitext
text/x-wiki
[[Kategoria:Prawa]]
3f1a158f4d50dd6797c716c4708b6be5e484d112
Kategoria:Lokalnie załadowane pliki
14
220
609
2014-03-13T15:45:47Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Multimedia]]
221b1e537bd6ce24f72d502414c9b8065e83d8db
Kategoria:Ludzie
14
228
617
2014-03-13T16:14:52Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Kategorie]]
6a3c5e5ede886195af37680c46c34e068a9dc931
Kategoria:Ludzie związani z Pnikutem
14
244
643
2014-03-13T22:07:45Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Biografie według miejscowości]]"
wikitext
text/x-wiki
[[Kategoria:Biografie według miejscowości]]
5d1d6f7e6af9719e3a944092f6e803a64b2390a6
Kategoria:Ludzie związani z Zawierciem
14
229
630
618
2014-03-13T21:43:35Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Biografie według miejscowości]]
5d1d6f7e6af9719e3a944092f6e803a64b2390a6
618
2014-03-13T16:16:16Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Ludzie]]
de5284640f8d9639eebe7f6965fb6a1a5757b791
Kategoria:Mańdziak
14
616
1110
2019-11-16T23:21:15Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Ludzie związani z Pnikutem]]"
wikitext
text/x-wiki
[[Kategoria:Ludzie związani z Pnikutem]]
a766e9dd11250c3d16429b002dec4cd937290c36
Kategoria:Miasta Ukrainy
14
253
660
2014-03-13T22:41:46Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Miejscowości Ukrainy]]"
wikitext
text/x-wiki
[[Kategoria:Miejscowości Ukrainy]]
eef0be54775466a528e90fce500ec116be6af219
Kategoria:Miejsca
14
249
656
2014-03-13T22:38:40Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Kategorie]]"
wikitext
text/x-wiki
[[Kategoria:Kategorie]]
6a3c5e5ede886195af37680c46c34e068a9dc931
Kategoria:Miejscowości
14
251
658
2014-03-13T22:40:01Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Miejsca]]"
wikitext
text/x-wiki
[[Kategoria:Miejsca]]
348670f886f3cec0c704f3cb633585388b3813be
Kategoria:Miejscowości Ukrainy
14
250
657
2014-03-13T22:39:34Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Miejscowości]]"
wikitext
text/x-wiki
[[Kategoria:Miejscowości]]
3478fc83e34ad54f62cf73aa9819f8afcc30f93a
Kategoria:Mieszkańcy Pnikuta
14
243
642
2014-03-13T22:05:07Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Biografie według miejscowości]]"
wikitext
text/x-wiki
[[Kategoria:Biografie według miejscowości]]
5d1d6f7e6af9719e3a944092f6e803a64b2390a6
Kategoria:Miśniakowie
14
600
1086
2019-11-16T20:35:02Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Ludzie związani z Pnikutem]]"
wikitext
text/x-wiki
[[Kategoria:Ludzie związani z Pnikutem]]
a766e9dd11250c3d16429b002dec4cd937290c36
Kategoria:Multimedia
14
219
608
2014-03-13T15:45:03Z
Ffkapa
2
Nowa kategoria
wikitext
text/x-wiki
[[Kategoria:Prace Wiki.Pnikuczanie]]
c896293b82c8f6fd4c526b5b853fe9b9ec0f5316
Kategoria:Muszakowie
14
612
1106
2019-11-16T23:08:14Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Ludzie związani z Pnikutem]]"
wikitext
text/x-wiki
[[Kategoria:Ludzie związani z Pnikutem]]
a766e9dd11250c3d16429b002dec4cd937290c36
Kategoria:Ofiary wojen
14
227
616
2014-03-13T16:13:44Z
Ffkapa
2
Nowa kategoria
wikitext
text/x-wiki
[[Kategoria:Historia]]
[[Kategoria:Ludzie]]
f8c4446b02ae8add2d85b7ce562cc516ae7b0ac8
Kategoria:Pietruszczakowie
14
599
1083
2019-11-16T20:19:29Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Ludzie związani z Pnikutem]]"
wikitext
text/x-wiki
[[Kategoria:Ludzie związani z Pnikutem]]
a766e9dd11250c3d16429b002dec4cd937290c36
Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych
14
225
639
634
2014-03-13T21:57:28Z
Ffkapa
2
wikitext
text/x-wiki
[[Kategoria:Więźniowie niemieckich obozów koncentracyjnych]]
575f4f62edad73087107e096a3a760f9488ceb2e
634
614
2014-03-13T21:50:47Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Więźniowie KL Dachau]]
56d1fd5bdd4a0c50a9c214a62491caf3035e74b5
614
2014-03-13T16:10:47Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Więźniowie niemieckich obozów koncentracyjnych]]
575f4f62edad73087107e096a3a760f9488ceb2e
Kategoria:Prace Wiki.Pnikuczanie
14
217
602
2014-03-13T15:24:12Z
Ffkapa
2
Nowa kategoria
wikitext
text/x-wiki
[[Kategoria:Kategorie]]
6a3c5e5ede886195af37680c46c34e068a9dc931
Kategoria:Prawa
14
200
557
2014-03-11T01:00:09Z
Ffkapa
2
nowa kategoria
wikitext
text/x-wiki
[[Kategoria:Prawa osobowe]]
e3a93b604bc2103a9a51c494de68c24e8e3d7832
Kategoria:Prawa osobowe
14
201
558
2014-03-11T01:00:29Z
Ffkapa
2
nowa kategoria
wikitext
text/x-wiki
[[Kategoria:Kategorie]]
6a3c5e5ede886195af37680c46c34e068a9dc931
Kategoria:Rejon mościski
14
256
663
2014-03-13T22:49:41Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Rejony Ukrainy]]"
wikitext
text/x-wiki
[[Kategoria:Rejony Ukrainy]]
e6893c108b2e8f65382128c186e94783be9680e5
Kategoria:Rejony Ukrainy
14
255
662
2014-03-13T22:48:37Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Miejsca]]"
wikitext
text/x-wiki
[[Kategoria:Miejsca]]
348670f886f3cec0c704f3cb633585388b3813be
Kategoria:Rogałowie
14
608
1102
2019-11-16T22:50:29Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Ludzie związani z Pnikutem]]"
wikitext
text/x-wiki
[[Kategoria:Ludzie związani z Pnikutem]]
a766e9dd11250c3d16429b002dec4cd937290c36
Kategoria:Strona główna
14
221
610
2014-03-13T15:47:03Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Prace Wiki.Pnikuczanie]]
c896293b82c8f6fd4c526b5b853fe9b9ec0f5316
Kategoria:Szablony
14
216
601
2014-03-13T15:22:54Z
Ffkapa
2
Nowa Kategoria
wikitext
text/x-wiki
[[Kategoria:Prace Wiki.Pnikuczanie]]
c896293b82c8f6fd4c526b5b853fe9b9ec0f5316
Kategoria:Szablony dzienników urzędowych
14
231
620
2014-03-13T20:40:58Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Szablony techniczne]]
262e046a9ac630b634fca35244af4e34fed53372
Kategoria:Szablony informacyjne
14
11
15
2014-01-15T00:56:30Z
Ffkapa
2
Nowa kategoria
wikitext
text/x-wiki
[[Kategoria:Szablony]]
b4ee1a8dedbf59075f1bfc35c8bf683b3479403c
Kategoria:Szablony licencji
14
203
560
2014-03-11T01:03:29Z
Ffkapa
2
nowa kategoria
wikitext
text/x-wiki
[[Kategoria:Szablony]]
b4ee1a8dedbf59075f1bfc35c8bf683b3479403c
Kategoria:Szablony licencji Creative Commons
14
202
559
2014-03-11T01:02:49Z
Ffkapa
2
nowa kategoria
wikitext
text/x-wiki
[[Kategoria:Szablony licencji]]
d15a7085b23ea9289ed3a81dfea3a0a4a0fd2658
Kategoria:Szablony techniczne
14
9
9
2014-01-15T00:20:10Z
Ffkapa
2
Nowa kategoria
wikitext
text/x-wiki
[[Kategoria:Szablony]]
b4ee1a8dedbf59075f1bfc35c8bf683b3479403c
Kategoria:Szablony umieszczane na stronach plików
14
218
607
606
2014-03-13T15:41:47Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Szablony techniczne]]
[[Kategoria:Szablony informacyjne]]
884eb02577cbf58b7b5d03e5085cdcac501e57ae
606
2014-03-13T15:40:40Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Szablony techniczne]]
262e046a9ac630b634fca35244af4e34fed53372
Kategoria:Telatyńscy
14
610
1104
2019-11-16T22:55:47Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Ludzie związani z Pnikutem]]"
wikitext
text/x-wiki
[[Kategoria:Ludzie związani z Pnikutem]]
a766e9dd11250c3d16429b002dec4cd937290c36
Kategoria:Urodzeni na Kresach II Rzeczypospolitej
14
242
641
2014-03-13T22:00:49Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Biografie według miejsca urodzenia]]"
wikitext
text/x-wiki
[[Kategoria:Biografie według miejsca urodzenia]]
fc706c942a568a8479d35f8ee20a54d96513912f
Kategoria:Urodzeni w 1882
14
597
1081
2019-10-31T22:59:37Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Urodzeni w XIX wieku]]"
wikitext
text/x-wiki
[[Kategoria:Urodzeni w XIX wieku]]
cfa3bce6eb0c717892f798db45fa48ba9ec128be
Kategoria:Urodzeni w 1888
14
247
649
2014-03-13T22:17:10Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Urodzeni w XIX wieku]]"
wikitext
text/x-wiki
[[Kategoria:Urodzeni w XIX wieku]]
cfa3bce6eb0c717892f798db45fa48ba9ec128be
Kategoria:Urodzeni w 1906
14
593
1073
2019-10-31T22:29:41Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Urodzeni w XX wieku]]"
wikitext
text/x-wiki
[[Kategoria:Urodzeni w XX wieku]]
aafa7bcbcf868d27a64fa6852432c316c56bfa77
Kategoria:Urodzeni w 1919
14
236
626
2014-03-13T21:38:28Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Urodzeni w XX wieku]]
aafa7bcbcf868d27a64fa6852432c316c56bfa77
Kategoria:Urodzeni w 1931
14
613
1107
2019-11-16T23:10:40Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Urodzeni w XX wieku]]"
wikitext
text/x-wiki
[[Kategoria:Urodzeni w XX wieku]]
aafa7bcbcf868d27a64fa6852432c316c56bfa77
Kategoria:Urodzeni w Pnikucie
14
230
619
2014-03-13T16:17:21Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Urodzeni na Kresach II Rzeczypospolitej]]
42690619d3e88678400838a88ba2a2ac17e59b23
Kategoria:Urodzeni w XIX wieku
14
246
648
2014-03-13T22:14:29Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Biografie według daty urodzin]]"
wikitext
text/x-wiki
[[Kategoria:Biografie według daty urodzin]]
9229c59effe0125ae98adc4e777ff48dea9607bb
Kategoria:Urodzeni w XX wieku
14
237
627
2014-03-13T21:39:12Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Biografie według daty urodzin]]
9229c59effe0125ae98adc4e777ff48dea9607bb
Kategoria:Wiąckowie
14
604
1096
1095
2019-11-16T21:28:38Z
Ffkapa
2
removed [[Category:Ludzie powiązani z Pnikutem]]; added [[Category:Ludzie związani z Pnikutem]] using [[Help:Gadget-HotCat|HotCat]]
wikitext
text/x-wiki
[[Kategoria:Ludzie związani z Pnikutem]]
a766e9dd11250c3d16429b002dec4cd937290c36
1095
2019-11-16T21:24:46Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Ludzie powiązani z Pnikutem]]"
wikitext
text/x-wiki
[[Kategoria:Ludzie powiązani z Pnikutem]]
34a2f357e06951303a0ee484e244d80643a29afe
Kategoria:Więźniowie KL Dachau
14
232
638
635
2014-03-13T21:53:59Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Więźniowie niemieckich obozów koncentracyjnych]]
575f4f62edad73087107e096a3a760f9488ceb2e
635
632
2014-03-13T21:52:30Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Kategoria:Więźniowie niemieckich obozów koncentracyjnych]]
4938e3b5c951dc82c4e933963f18b4f2fb67ab91
632
621
2014-03-13T21:48:38Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
a181e3d46a7180e42684e5f4514ff0d18dfb28b8
621
2014-03-13T20:46:00Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Więźniowie niemieckich obozów koncentracyjnych]]
575f4f62edad73087107e096a3a760f9488ceb2e
Kategoria:Więźniowie KL Mauthausen-Gusen
14
223
637
636
2014-03-13T21:53:15Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Więźniowie niemieckich obozów koncentracyjnych]]
575f4f62edad73087107e096a3a760f9488ceb2e
636
633
2014-03-13T21:52:48Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Kategoria:Więźniowie niemieckich obozów koncentracyjnych]]
4938e3b5c951dc82c4e933963f18b4f2fb67ab91
633
612
2014-03-13T21:49:25Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Polskie ofiary niemieckich obozów koncentracyjnych]]
a181e3d46a7180e42684e5f4514ff0d18dfb28b8
612
2014-03-13T16:08:01Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Więźniowie niemieckich obozów koncentracyjnych]]
575f4f62edad73087107e096a3a760f9488ceb2e
Kategoria:Więźniowie niemieckich obozów koncentracyjnych
14
224
613
2014-03-13T16:09:40Z
Ffkapa
2
Nowa kategoria
wikitext
text/x-wiki
[[Kategoria:Ofiary wojen]]
54fa93ee3b25c50775881ecc68de7f259e431f9d
Kategoria:Wsie Ukrainy
14
252
659
2014-03-13T22:40:57Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Miejscowości Ukrainy]]"
wikitext
text/x-wiki
[[Kategoria:Miejscowości Ukrainy]]
eef0be54775466a528e90fce500ec116be6af219
Kategoria:Wsie obwodu lwowskiego
14
254
661
2014-03-13T22:43:14Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Wsie Ukrainy]]"
wikitext
text/x-wiki
[[Kategoria:Wsie Ukrainy]]
550195df0fbb86808d9f239648d2a59bf84bce6d
Kategoria:Zarańscy
14
602
1089
2019-11-16T21:00:12Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Ludzie związani z Pnikutem]]"
wikitext
text/x-wiki
[[Kategoria:Ludzie związani z Pnikutem]]
a766e9dd11250c3d16429b002dec4cd937290c36
Kategoria:Zmarli w 1940
14
248
651
2014-03-13T22:19:58Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Zmarli w XX wieku]]"
wikitext
text/x-wiki
[[Kategoria:Zmarli w XX wieku]]
bd2b0b474e3a572387a9f78124a60ed501a1d5fa
Kategoria:Zmarli w 1947
14
594
1074
2019-10-31T22:35:06Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Zmarli w XX wieku]]"
wikitext
text/x-wiki
[[Kategoria:Zmarli w XX wieku]]
bd2b0b474e3a572387a9f78124a60ed501a1d5fa
Kategoria:Zmarli w 1955
14
598
1082
2019-10-31T23:00:42Z
Ffkapa
2
Utworzono nową stronę "[[Kategoria:Zmarli w XX wieku]]"
wikitext
text/x-wiki
[[Kategoria:Zmarli w XX wieku]]
bd2b0b474e3a572387a9f78124a60ed501a1d5fa
Kategoria:Zmarli w 1990
14
238
628
2014-03-13T21:40:18Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria:Zmarli w XX wieku]]
bd2b0b474e3a572387a9f78124a60ed501a1d5fa
Kategoria:Zmarli w XX wieku
14
239
654
653
2014-03-13T22:22:42Z
Ffkapa
2
wikitext
text/x-wiki
[[Kategoria:Biografie według daty śmierci]]
ee6ac393b7aa4f6543676b29fb0fdd2af11943c0
653
652
2014-03-13T22:22:03Z
Ffkapa
2
wikitext
text/x-wiki
[[Kategoria:Zmarli w XX wieku]]
bd2b0b474e3a572387a9f78124a60ed501a1d5fa
652
629
2014-03-13T22:21:42Z
Ffkapa
2
wikitext
text/x-wiki
[[Kategoria: Kategoria:Zmarli w XX wieku]]
eb9fab97c30b4f86f54a2e1f295538710b83078b
629
2014-03-13T21:40:52Z
Ffkapa
2
red
wikitext
text/x-wiki
[[Kategoria: Biografie według daty śmierci]]
170b734043ee25d35615ccbcdd3488a0bc60ef8a
Portal:Historia
112
172
585
582
2014-03-13T00:38:01Z
Ffkapa
2
Ffkapa przeniósł stronę [[Historia]] do [[Portal:Historia]]
wikitext
text/x-wiki
Projekt będzie z założenia opisywał zdarzenia historycznie ważne dla Kresów II Rzeczypospolitej. Unikamy nieweryfikowalnych faktów które mogą zaboleć a nie koniecznie są prawdziwe. Pamiętajmy więc o źródłach!
71fe4c29d5cf04abc137de9dff5542bb38df60f4
582
496
2014-03-13T00:14:49Z
Ffkapa
2
Ffkapa przeniósł stronę [[Portal:Historia]] do [[Historia]]
wikitext
text/x-wiki
Projekt będzie z założenia opisywał zdarzenia historycznie ważne dla Kresów II Rzeczypospolitej. Unikamy nieweryfikowalnych faktów które mogą zaboleć a nie koniecznie są prawdziwe. Pamiętajmy więc o źródłach!
71fe4c29d5cf04abc137de9dff5542bb38df60f4
496
2014-02-16T08:01:13Z
Ffkapa
2
nowy portal
wikitext
text/x-wiki
Projekt będzie z założenia opisywał zdarzenia historycznie ważne dla Kresów II Rzeczypospolitej. Unikamy nieweryfikowalnych faktów które mogą zaboleć a nie koniecznie są prawdziwe. Pamiętajmy więc o źródłach!
71fe4c29d5cf04abc137de9dff5542bb38df60f4
Portal:Ludzie
112
173
588
580
2014-03-13T00:39:31Z
Ffkapa
2
Ffkapa przeniósł stronę [[Ludzie]] na [[Portal:Ludzie]], bez pozostawienia przekierowania pod starym tytułem
wikitext
text/x-wiki
Projekt będzie miejscem spotkań tych wszystkich, którzy zechcą opisywać dawnych mieszkańców Pnikuta, Kresów. Zmieszczą się wszyscy, śpieszmy się, odchodzą nam najbardziej wiarygodne źródła!
023f9e1b4dff90e38d9c469f67da461adc1a0d38
580
497
2014-03-13T00:14:26Z
Ffkapa
2
Ffkapa przeniósł stronę [[Portal:Ludzie]] do [[Ludzie]]
wikitext
text/x-wiki
Projekt będzie miejscem spotkań tych wszystkich, którzy zechcą opisywać dawnych mieszkańców Pnikuta, Kresów. Zmieszczą się wszyscy, śpieszmy się, odchodzą nam najbardziej wiarygodne źródła!
023f9e1b4dff90e38d9c469f67da461adc1a0d38
497
2014-02-16T08:04:01Z
Ffkapa
2
nowy portal
wikitext
text/x-wiki
Projekt będzie miejscem spotkań tych wszystkich, którzy zechcą opisywać dawnych mieszkańców Pnikuta, Kresów. Zmieszczą się wszyscy, śpieszmy się, odchodzą nam najbardziej wiarygodne źródła!
023f9e1b4dff90e38d9c469f67da461adc1a0d38
Portal:Miejsca
112
174
587
584
2014-03-13T00:38:55Z
Ffkapa
2
Ffkapa przeniósł stronę [[Miejsca]] na [[Portal:Miejsca]], bez pozostawienia przekierowania pod starym tytułem
wikitext
text/x-wiki
Projekt poświęcony miejscom szczególnym dla Kresowian. Opisujmy dawne Kresy, zamki, dwory, nasze domy, nasze wsie, nic nie może nam umknąć, bo wszystko jest ważne!
3deb1c8e54ca018967931dc22b2ecbb8dade5b10
584
498
2014-03-13T00:15:30Z
Ffkapa
2
Ffkapa przeniósł stronę [[Portal:Miejsca]] na [[Miejsca]], bez pozostawienia przekierowania pod starym tytułem
wikitext
text/x-wiki
Projekt poświęcony miejscom szczególnym dla Kresowian. Opisujmy dawne Kresy, zamki, dwory, nasze domy, nasze wsie, nic nie może nam umknąć, bo wszystko jest ważne!
3deb1c8e54ca018967931dc22b2ecbb8dade5b10
498
2014-02-16T08:06:13Z
Ffkapa
2
nowy portal
wikitext
text/x-wiki
Projekt poświęcony miejscom szczególnym dla Kresowian. Opisujmy dawne Kresy, zamki, dwory, nasze domy, nasze wsie, nic nie może nam umknąć, bo wszystko jest ważne!
3deb1c8e54ca018967931dc22b2ecbb8dade5b10
WikiPnikuczanie:Kontakt
116
157
593
540
2014-03-13T00:43:29Z
Ffkapa
2
Ffkapa przeniósł stronę [[Kontakt]] do [[WikiPnikuczanie:Kontakt]]
wikitext
text/x-wiki
Kontakt z autorem i administratorem [http://wiki.pnikut.net Wiki.Pnikuczanie], we wszelkich sprawach - również przekraczających "zwykłe" sprawy dotyczące encyklopedii, można uzyskać pisząc na adres: [mailto:poczta@pnikut.net poczta@pnikut.net]
579fd9e00a128a42ce9632c7e72e5403e23e5dd7
540
539
2014-03-02T13:47:07Z
Kazik
1
drobne
wikitext
text/x-wiki
Kontakt z autorem i administratorem [http://wiki.pnikut.net Wiki.Pnikuczanie], we wszelkich sprawach - również przekraczających "zwykłe" sprawy dotyczące encyklopedii, można uzyskać pisząc na adres: [mailto:poczta@pnikut.net poczta@pnikut.net]
579fd9e00a128a42ce9632c7e72e5403e23e5dd7
539
519
2014-03-02T13:44:56Z
Kazik
1
drobne
wikitext
text/x-wiki
Kontakt z autorem i administratorem [http://wiki.pnikut.net Wiki.Pnikuczanie], we wszelkich sprawach - również przekraczających "zwykłe" sprawy dotyczące encyklopedii, można uzyskać pisząc na adres: poczta@pnikut.net
662b7340f6cb147b73c1229b3be851b506c667bb
519
437
2014-02-17T22:55:19Z
Ffkapa
2
nowa
wikitext
text/x-wiki
Kontakt z autorem i administratorem Wiki.Pnikuczanie, we wszelkich sprawach - również przekraczających "zwykłe" sprawy dotyczące encyklopedii, można uzyskać pisząc na adres: poczta@pnikut.net
d4629d05dcccf7f545ad93fcb23c65b55fb6f762
437
2014-02-11T23:00:08Z
Ffkapa
2
Utworzono nową stronę "aa"
wikitext
text/x-wiki
aa
e0c9035898dd52fc65c41454cec9c4d2611bfb37
WikiPnikuczanie:Licencje Creative Commons
116
257
670
2014-03-21T22:04:14Z
Ffkapa
2
Ffkapa przeniósł stronę [[WikiPnikuczanie:Licencje Creative Commons]] do [[Licencje Creative Commons]]: cofnij
wikitext
text/x-wiki
#PATRZ [[Licencje Creative Commons]]
f8ab5fadc2e47a4ddf2f0fde1a260158916bfad9
WikiPnikuczanie:Tworzenie konta użytkownika
116
585
1054
2014-12-27T23:43:52Z
Kazik
1
nowa
wikitext
text/x-wiki
Aby utworzyć konto na [http://wiki.pnikut.net '''Wiki.Pnikuczanie'''] należy postępować według schematu:
# Wymyśl sobie login, przykładowo: Janek, Krzysztof, Pnikut2013, albo dowolne słowo (wulgaryzmy pomińmy...) które chcesz,
# Jeśli chcesz wymyśl sobie hasło, jednak nie musisz, system może przydzielić Ci je sam. Postaraj się by było trudne, małe i duże litery lub/i cyfry; na przykład: 1lne4211e5. Hasło nie może być zbyt krótkie, ale też nie przesadzaj z długością. No i koniecznie je sobie zanotuj. Jeśli zapomnisz jakoś sobie poradzimy, spokojnie!
# Wyślij to wszystko z krótką informacją od siebie na adres [mailto:poczta@pnikut.net '''poczta@pnikut.net'''] i zwrotnie otrzymasz ode mnie informację, że konto zostało utworzone.
To wszystko!
Musieliśmy zrezygnować ze zwykłego formularza znanego z Wikipedii. Ostatnio bardzo nasiliły się próby tworzenia kont na potrzeby reklam i pozycjonowania stron różnych ludzi z Pnikutem nie mających żadnego związku. To są dodatkowe koszty i przede wszystkim bałagan i dodatkowa praca by to usuwać.
Podsumowując wystarczy mail o takiej treści:
*Login: Franek (lub cokolwiek)
*Hasło: można ale nie trzeba podawać
*adres mail: nie musi być, wykorzystam adres nadawcy. No chyba, że ktoś chce inny.
*Wysyłka maila z tą treścią na adres [mailto:poczta@pnikut.net '''poczta@pnikut.net''']
I już możecie pisać artykuły, o Pnikucie, o Kresach, o Lwowie, o Wilnie, o Znanych ludziach, o tych nieznanych ale wartych - waszym zdaniem - zapamiętania, o swoim Tacie, Mamie, Babci, Dziadku, o ważnych sprawach, o Świętych, o ziołach, o roślinach, no o wszystkim co ma jakiś choć symboliczny związek z ludźmi i Pnikutem dawniej i dziś ...
e6a4621b0b737dd9acf4bccfc196d86b287fe6f5
WikiPnikuczanie:Wiki.Pnikuczanie
116
168
595
480
2014-03-13T00:44:05Z
Ffkapa
2
Ffkapa przeniósł stronę [[Wiki.Pnikuczanie]] do [[WikiPnikuczanie:Wiki.Pnikuczanie]]
wikitext
text/x-wiki
Nasza encyklopedia, to zebrana wiedza wszystkich Pnikuczan którzy jeszcze żyją, to pozyskane materiały z archiwów, to znalezione w Internecie fakty. Przede wszystkim chodzi nam o Pnikut, jego dawnych mieszkańców, dawne ale i współczesne fakty, jednak można pisac o całych Kresach, o Galicji i o Litwie, o dawnej Polsce i współczesnej.
Interesuje nas historia o pięknych ludziach i cudownych miejscach bo ... to nasze dziedzictwo, chcemy czy nie.
a524b1ac2c07d092e1c3f2f91802791143bcb347
480
2014-02-15T23:06:30Z
Ffkapa
2
nowa
wikitext
text/x-wiki
Nasza encyklopedia, to zebrana wiedza wszystkich Pnikuczan którzy jeszcze żyją, to pozyskane materiały z archiwów, to znalezione w Internecie fakty. Przede wszystkim chodzi nam o Pnikut, jego dawnych mieszkańców, dawne ale i współczesne fakty, jednak można pisac o całych Kresach, o Galicji i o Litwie, o dawnej Polsce i współczesnej.
Interesuje nas historia o pięknych ludziach i cudownych miejscach bo ... to nasze dziedzictwo, chcemy czy nie.
a524b1ac2c07d092e1c3f2f91802791143bcb347
WikiPnikuczanie:Wstęp
116
169
590
481
2014-03-13T00:42:37Z
Ffkapa
2
Ffkapa przeniósł stronę [[Wstęp]] do [[WikiPnikuczanie:Wstęp]]
wikitext
text/x-wiki
Każdy może edytować, więc tworzyć Wiki.Pnikuczanie.
fa1ab6a0d1e3a3a6264a9aa37ee519fde7031f3a
481
2014-02-15T23:07:56Z
Ffkapa
2
nowa
wikitext
text/x-wiki
Każdy może edytować, więc tworzyć Wiki.Pnikuczanie.
fa1ab6a0d1e3a3a6264a9aa37ee519fde7031f3a
WikiPnikuczanie:Zasady edycji
116
170
592
482
2014-03-13T00:43:12Z
Ffkapa
2
Ffkapa przeniósł stronę [[Zasady edycji]] na [[WikiPnikuczanie:Zasady edycji]], bez pozostawienia przekierowania pod starym tytułem
wikitext
text/x-wiki
Zasady są proste: piszemy prawdę!
5c7e8445a5fe43c038d73322db0c1c8c884f2a75
482
2014-02-15T23:08:37Z
Ffkapa
2
Utworzono nową stronę "Zasady są proste: piszemy prawdę!"
wikitext
text/x-wiki
Zasady są proste: piszemy prawdę!
5c7e8445a5fe43c038d73322db0c1c8c884f2a75